diff options
author | Florian Dold <florian@dold.me> | 2022-10-05 11:11:51 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-10-05 11:11:51 +0200 |
commit | 4d232fd56510ae69b76fef4f4ecade1e0d4b230d (patch) | |
tree | e5f6f66de9dd741c35b47bf3ccaef97ea5968856 /packages/taler-wallet-core/src | |
parent | 66ae0dd2201b48771a9fad29b080b10a5b6e598c (diff) | |
download | wallet-core-4d232fd56510ae69b76fef4f4ecade1e0d4b230d.tar.xz |
wallet-core: canonicalize base URL from bank on withdrawal
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/operations/withdraw.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index e7760174e..143f9ce33 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -1844,6 +1844,10 @@ export async function acceptWithdrawalFromUri( restrictAge?: number; }, ): Promise<AcceptWithdrawalResponse> { + const selectedExchange = canonicalizeBaseUrl(req.selectedExchange); + logger.info( + `accepting withdrawal via ${req.talerWithdrawUri}, canonicalized selected exchange ${selectedExchange}`, + ); const existingWithdrawalGroup = await ws.db .mktx((x) => [x.withdrawalGroups]) .runReadOnly(async (tx) => { @@ -1870,14 +1874,14 @@ export async function acceptWithdrawalFromUri( }; } - await updateExchangeFromUrl(ws, req.selectedExchange); + await updateExchangeFromUrl(ws, selectedExchange); const withdrawInfo = await getBankWithdrawalInfo( ws.http, req.talerWithdrawUri, ); const exchangePaytoUri = await getExchangePaytoUri( ws, - req.selectedExchange, + selectedExchange, withdrawInfo.wireTypes, ); |