UNPKG

@ledgerhq/coin-hedera

Version:
20 lines 702 B
import { encodeOperationId } from "@ledgerhq/coin-framework/operation"; import { getEstimatedFees } from "./utils"; export const buildOptimisticOperation = async ({ account, transaction, }) => { const operation = { id: encodeOperationId(account.id, "", "OUT"), hash: "", type: "OUT", value: transaction.amount, fee: await getEstimatedFees(account), blockHash: null, blockHeight: null, senders: [account.freshAddress.toString()], recipients: [transaction.recipient], accountId: account.id, date: new Date(), extra: {}, }; return operation; }; //# sourceMappingURL=buildOptimisticOperation.js.map