aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-06-06 15:23:25 +0200
committerFlorian Dold <florian@dold.me>2023-06-06 15:23:25 +0200
commit265d88b6b7eaf08ef2ab7ccb22c43205354b0f0d (patch)
treec61afb62e158907c79efe3cbee0af9d184e0d62a
parente06795debdda7071ca6998bed626d017f8a5b17a (diff)
wallet-core: fix long-polling check
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts b/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts
index 599ef658b..cc90416fb 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer-push-debit.ts
@@ -365,6 +365,7 @@ async function processPeerPushDebitReady(
peerPushInitiation.exchangeBaseUrl,
);
mergeUrl.searchParams.set("timeout_ms", "30000");
+ logger.info(`long-polling on purse status at ${mergeUrl.href}`);
const resp = await ws.http.fetch(mergeUrl.href, {
// timeout: getReserveRequestTimeout(withdrawalGroup),
cancellationToken: ct,
@@ -374,7 +375,8 @@ async function processPeerPushDebitReady(
resp,
codecForExchangePurseStatus(),
);
- if (purseStatus.deposit_timestamp) {
+ logger.info(`got purse status ${purseStatus}`);
+ if (purseStatus.merge_timestamp) {
await transitionPeerPushDebitTransaction(
ws,
peerPushInitiation.pursePub,