@ledgerhq/coin-icon
Version:
Ledger Icon Coin integration
22 lines • 712 B
JavaScript
import { getMainAccount } from "@ledgerhq/coin-framework/account/index";
function getDeviceTransactionConfig({ transaction, account, parentAccount, status: { amount }, }) {
const fields = [];
const mainAccount = getMainAccount(account, parentAccount);
const { mode } = transaction;
if (!amount.isZero()) {
fields.push({
type: "amount",
label: "Amount",
});
}
if (mode !== "send") {
fields.push({
type: "address",
label: "From Address",
address: mainAccount.freshAddress,
});
}
return fields;
}
export default getDeviceTransactionConfig;
//# sourceMappingURL=deviceTransactionConfig.js.map