@ledgerhq/coin-casper
Version:
Ledger Casper integration
37 lines • 1.02 kB
JavaScript
import { log } from "@ledgerhq/logs";
import { methodToString } from "../common-logic";
import { CASPER_NETWORK } from "../consts";
function getDeviceTransactionConfig({ transaction, }) {
const fields = [];
fields.push({
type: "text",
label: "Type",
value: methodToString(0),
});
fields.push({
type: "text",
label: "Chain ID",
value: 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,
});
}
log("debug", `Transaction config ${JSON.stringify(fields)}`);
return fields;
}
export default getDeviceTransactionConfig;
//# sourceMappingURL=deviceTransactionConfig.js.map