taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 32696be0ca0a83a60918418c20b9c94a38c702c7
parent 76d030e942fbbf5a573e03283c53e264d7bf1968
Author: Florian Dold <florian@dold.me>
Date:   Wed, 28 May 2025 01:46:19 +0200

wallet-core: fix waiter on refresh in deposit abort

Diffstat:
Mpackages/taler-wallet-core/src/deposits.ts | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/packages/taler-wallet-core/src/deposits.ts b/packages/taler-wallet-core/src/deposits.ts @@ -128,6 +128,7 @@ import { } from "./pay-merchant.js"; import { CreateRefreshGroupResult, + RefreshTransactionContext, createRefreshGroup, getTotalRefreshCost, } from "./refresh.js"; @@ -955,6 +956,8 @@ async function waitForRefreshOnDepositGroup( checkLogicInvariant(!!abortRefreshGroupId); const ctx = new DepositTransactionContext(wex, depositGroup.depositGroupId); + const refreshCtx = new RefreshTransactionContext(wex, abortRefreshGroupId); + // Wait for the refresh transaction to be in a final state. await genericWaitForState(wex, { async checkState() { @@ -975,7 +978,7 @@ async function waitForRefreshOnDepositGroup( filterNotification(notif) { return ( notif.type === NotificationType.TransactionStateTransition && - notif.transactionId === abortRefreshGroupId + notif.transactionId === refreshCtx.transactionId ); }, });