diff options
author | Florian Dold <florian@dold.me> | 2024-03-08 10:30:23 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-03-08 18:23:10 +0100 |
commit | 0a2540d676904e804544b95959bae223e42bc0c1 (patch) | |
tree | 71bdb3d111da72a95afdb638ef36cc13b0c30635 /packages/taler-wallet-core/src/pay-peer-pull-credit.ts | |
parent | ddd32a690bd13b1eb1aef1356a1d59fd64e254bf (diff) | |
download | wallet-core-0a2540d676904e804544b95959bae223e42bc0c1.tar.gz wallet-core-0a2540d676904e804544b95959bae223e42bc0c1.tar.bz2 wallet-core-0a2540d676904e804544b95959bae223e42bc0c1.zip |
wallet-core: notification-based waiting for dependent transactions instead of long-polling
Diffstat (limited to 'packages/taler-wallet-core/src/pay-peer-pull-credit.ts')
-rw-r--r-- | packages/taler-wallet-core/src/pay-peer-pull-credit.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/pay-peer-pull-credit.ts b/packages/taler-wallet-core/src/pay-peer-pull-credit.ts index de30f66d2..96d8f65a6 100644 --- a/packages/taler-wallet-core/src/pay-peer-pull-credit.ts +++ b/packages/taler-wallet-core/src/pay-peer-pull-credit.ts @@ -84,6 +84,7 @@ import { WalletExecutionContext } from "./wallet.js"; import { getExchangeWithdrawalInfo, internalCreateWithdrawalGroup, + waitWithdrawalFinal, } from "./withdraw.js"; const logger = new Logger("pay-peer-pull-credit.ts"); @@ -584,6 +585,7 @@ async function handlePeerPullCreditWithdrawing( if (!pullIni.withdrawalGroupId) { throw Error("invalid db state (withdrawing, but no withdrawal group ID"); } + await waitWithdrawalFinal(wex, pullIni.withdrawalGroupId); const transactionId = constructTransactionIdentifier({ tag: TransactionType.PeerPullCredit, pursePub: pullIni.pursePub, |