@ledgerhq/coin-icon
Version:
Ledger Icon Coin integration
24 lines • 805 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = require("@ledgerhq/coin-framework/account/index");
async function getDeviceTransactionConfig({ transaction, account, parentAccount, status: { amount }, }) {
const fields = [];
const mainAccount = (0, index_1.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;
}
exports.default = getDeviceTransactionConfig;
//# sourceMappingURL=deviceTransactionConfig.js.map