diff options
author | Florian Dold <florian@dold.me> | 2022-03-29 21:21:57 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-03-29 21:22:03 +0200 |
commit | bbd6ccf1c7c0baea44234863967e640f5cb10a3a (patch) | |
tree | 219086b57e229b79e674619180200284762c3f4b /packages/taler-wallet-core/src/wallet.ts | |
parent | fdd272af203d7048f980a2f2b5d405e5c94ebec2 (diff) | |
download | wallet-core-bbd6ccf1c7c0baea44234863967e640f5cb10a3a.tar.xz |
wallet: allow forced denom selection for tests
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index b0bd2a2cb..673a86167 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -598,18 +598,6 @@ async function getExchanges( return { exchanges }; } -async function acceptWithdrawal( - ws: InternalWalletState, - talerWithdrawUri: string, - selectedExchange: string, -): Promise<AcceptWithdrawalResponse> { - try { - return createTalerWithdrawReserve(ws, talerWithdrawUri, selectedExchange); - } finally { - ws.latch.trigger(); - } -} - /** * Inform the wallet that the status of a reserve has changed (e.g. due to a * confirmation from the bank.). @@ -849,10 +837,13 @@ async function dispatchRequestInternal( case "acceptBankIntegratedWithdrawal": { const req = codecForAcceptBankIntegratedWithdrawalRequest().decode(payload); - return await acceptWithdrawal( + return await createTalerWithdrawReserve( ws, req.talerWithdrawUri, req.exchangeBaseUrl, + { + forcedDenomSel: req.forcedDenomSel, + }, ); } case "getExchangeTos": { |