UNPKG

@ledgerhq/coin-stellar

Version:
39 lines 1.04 kB
async function getDeviceTransactionConfig({ status: { amount, estimatedFees }, transaction, }) { const { assetReference, assetOwner } = transaction; const fields = [ { type: "stellar.network", label: "Network", }, ]; if (!amount.isZero()) { fields.push({ type: "amount", label: "Amount", }); } if (assetReference && assetOwner) { fields.push({ type: "stellar.assetCode", label: "Asset", }); fields.push({ type: "stellar.assetIssuer", label: "Asset issuer", }); } fields.push({ type: "stellar.memo", label: "Memo", }); //NB device displays [none] for an empty memo if (estimatedFees && !estimatedFees.isZero()) { fields.push({ type: "fees", label: "Fees", }); } return fields; } export default getDeviceTransactionConfig; //# sourceMappingURL=deviceTransactionConfig.js.map