UNPKG

@ledgerhq/coin-hedera

Version:
18 lines 747 B
import { calculateAmount } from "./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} */ export 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 calculateAmount({ account, transaction }); transaction.amount = amount; return transaction; }; //# sourceMappingURL=prepareTransaction.js.map