@ledgerhq/coin-casper
Version:
Ledger Casper integration
39 lines • 1.15 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const logs_1 = require("@ledgerhq/logs");
const common_logic_1 = require("../common-logic");
const consts_1 = require("../consts");
function getDeviceTransactionConfig({ transaction, }) {
const fields = [];
fields.push({
type: "text",
label: "Type",
value: (0, common_logic_1.methodToString)(0),
});
fields.push({
type: "text",
label: "Chain ID",
value: consts_1.CASPER_NETWORK,
});
fields.push({
type: "casper.extendedAmount",
label: "Fee",
value: transaction.fees,
});
fields.push({
type: "casper.extendedAmount",
label: "Amount",
value: transaction.amount,
});
if (transaction.transferId) {
fields.push({
type: "text",
label: "Transfer ID",
value: transaction.transferId,
});
}
(0, logs_1.log)("debug", `Transaction config ${JSON.stringify(fields)}`);
return fields;
}
exports.default = getDeviceTransactionConfig;
//# sourceMappingURL=deviceTransactionConfig.js.map