wallet-core: use canonicalized base URL when querying exchange

This commit is contained in:
Florian Dold 2023-06-30 22:00:20 +02:00
parent 5754f00399
commit 9cfc138e75
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -570,7 +570,7 @@ export async function updateExchangeFromUrl(
.mktx((x) => [x.exchanges, x.exchangeDetails]) .mktx((x) => [x.exchanges, x.exchangeDetails])
.runReadWrite(async (tx) => { .runReadWrite(async (tx) => {
let exchange = await tx.exchanges.get(canonUrl); let exchange = await tx.exchanges.get(canonUrl);
const exchangeDetails = await getExchangeDetails(tx, baseUrl); const exchangeDetails = await getExchangeDetails(tx, canonUrl);
return { exchange, exchangeDetails }; return { exchange, exchangeDetails };
}); });
if (!exchange) { if (!exchange) {