UNPKG

@ledgerhq/live-common

Version:
27 lines 736 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); async function getDeviceTransactionConfig({ transaction: { tag }, status: { amount, estimatedFees }, }) { const fields = []; if (!amount.isZero()) { fields.push({ type: "amount", label: "Amount", }); } if (!estimatedFees.isZero()) { fields.push({ type: "fees", label: "Fees", }); } if (typeof tag === "number") { fields.push({ type: "text", label: "Tag", value: String(tag), }); } return fields; } exports.default = getDeviceTransactionConfig; //# sourceMappingURL=deviceTransactionConfig.js.map