UNPKG

@ledgerhq/coin-hedera

Version:
22 lines 909 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.prepareTransaction = void 0; const utils_1 = require("./utils"); /** * Gather any more neccessary information for a transaction, * potentially from a network. * * Hedera has fully client-side transactions and the fee * is not possible to estimate ahead-of-time. * * @returns {Transaction} */ const prepareTransaction = async (account, transaction) => { // explicitly calculate transaction amount to account for `useAllAmount` flag (send max flow) // i.e. if `useAllAmount` has been toggled to true, this is where it will update the transaction to reflect that action const { amount } = await (0, utils_1.calculateAmount)({ account, transaction }); transaction.amount = amount; return transaction; }; exports.prepareTransaction = prepareTransaction; //# sourceMappingURL=prepareTransaction.js.map