wallet-core: canonicalize base URL from bank on withdrawal
This commit is contained in:
parent
66ae0dd220
commit
4d232fd565
@ -1844,6 +1844,10 @@ export async function acceptWithdrawalFromUri(
|
|||||||
restrictAge?: number;
|
restrictAge?: number;
|
||||||
},
|
},
|
||||||
): Promise<AcceptWithdrawalResponse> {
|
): Promise<AcceptWithdrawalResponse> {
|
||||||
|
const selectedExchange = canonicalizeBaseUrl(req.selectedExchange);
|
||||||
|
logger.info(
|
||||||
|
`accepting withdrawal via ${req.talerWithdrawUri}, canonicalized selected exchange ${selectedExchange}`,
|
||||||
|
);
|
||||||
const existingWithdrawalGroup = await ws.db
|
const existingWithdrawalGroup = await ws.db
|
||||||
.mktx((x) => [x.withdrawalGroups])
|
.mktx((x) => [x.withdrawalGroups])
|
||||||
.runReadOnly(async (tx) => {
|
.runReadOnly(async (tx) => {
|
||||||
@ -1870,14 +1874,14 @@ export async function acceptWithdrawalFromUri(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
await updateExchangeFromUrl(ws, req.selectedExchange);
|
await updateExchangeFromUrl(ws, selectedExchange);
|
||||||
const withdrawInfo = await getBankWithdrawalInfo(
|
const withdrawInfo = await getBankWithdrawalInfo(
|
||||||
ws.http,
|
ws.http,
|
||||||
req.talerWithdrawUri,
|
req.talerWithdrawUri,
|
||||||
);
|
);
|
||||||
const exchangePaytoUri = await getExchangePaytoUri(
|
const exchangePaytoUri = await getExchangePaytoUri(
|
||||||
ws,
|
ws,
|
||||||
req.selectedExchange,
|
selectedExchange,
|
||||||
withdrawInfo.wireTypes,
|
withdrawInfo.wireTypes,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user