commit 78484b114dba78c4c553e2d18fc95c48bed4e408
parent 8b5e3eb7e42cfb4d33d7a72b506266515196a42f
Author: Florian Dold <florian@dold.me>
Date: Wed, 3 Dec 2025 16:19:21 +0100
-fix use before init
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/taler-wallet-core/src/pay-peer-push-credit.ts b/packages/taler-wallet-core/src/pay-peer-push-credit.ts
@@ -592,6 +592,8 @@ export async function preparePeerPushCredit(
);
}
+ const currency = Amounts.currencyOf(wi.withdrawalAmountRaw);
+
const ctx = new PeerPushCreditTransactionContext(wex, peerPushCreditId);
const res = await wex.db.runAllStoresReadWriteTx({}, async (tx) => {
@@ -626,7 +628,6 @@ export async function preparePeerPushCredit(
wex.taskScheduler.startShepherdTask(ctx.taskId);
- const currency = Amounts.currencyOf(wi.withdrawalAmountRaw);
return {
amount: purseStatus.balance,
amountEffective: wi.withdrawalAmountEffective,