@ledgerhq/coin-hedera
Version:
Ledger Hedera Coin integration
22 lines • 909 B
JavaScript
;
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