taler-typescript-core

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

commit 4d232fd56510ae69b76fef4f4ecade1e0d4b230d
parent 66ae0dd2201b48771a9fad29b080b10a5b6e598c
Author: Florian Dold <florian@dold.me>
Date:   Wed,  5 Oct 2022 11:11:51 +0200

wallet-core: canonicalize base URL from bank on withdrawal

Diffstat:
Mpackages/taler-wallet-core/src/operations/withdraw.ts | 8++++++--
1 file 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 @@ -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, );