commit c6dd41b63c9e5c88d5e916bacb258c37b1efc11b
parent 97f0842cdd5072cf5eaa5284d333541dbf2e034a
Author: Florian Dold <florian@dold.me>
Date: Sat, 3 May 2025 22:49:15 +0200
wallet-core: fix long-polling in balance KYC
We now specify the right long-polling target
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/packages/taler-wallet-core/src/exchanges.ts b/packages/taler-wallet-core/src/exchanges.ts
@@ -3661,7 +3661,7 @@ async function handleExchangeKycRespLegi(
},
});
- logger.info(`kyc-check (long-poll) response status ${resp.status}`);
+ logger.info(`kyc-check response status ${resp.status}`);
switch (resp.status) {
case HttpStatusCode.Ok: {
@@ -3757,6 +3757,9 @@ async function handleExchangeKycPendingLegitimization(
const paytoHash = encodeCrock(hashFullPaytoUri(reservePayto));
const reqUrl = new URL(`kyc-check/${paytoHash}`, exchange.baseUrl);
+ // We already have the access token.
+ // Long-poll for target 3 <-> KYC status to be OK
+ reqUrl.searchParams.set("lpt", "3");
logger.info(`long-polling wallet KYC status at ${reqUrl.href}`);
const resp = await cancelableLongPoll(wex, reqUrl, {
headers: {