commit a7d034920ed7e81624e8e83808f2ee93dfc321f3
parent 12cecf2bce937dcd295db0443635c4bdf645e1f1
Author: Florian Dold <florian@dold.me>
Date: Wed, 6 Mar 2024 08:23:32 +0100
wallet-core: enable deposit long-polling
Diffstat:
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/packages/taler-wallet-core/src/deposits.ts b/packages/taler-wallet-core/src/deposits.ts
@@ -109,11 +109,7 @@ import {
notifyTransition,
parseTransactionIdentifier,
} from "./transactions.js";
-import {
- InternalWalletState,
- WalletExecutionContext,
- getDenomInfo,
-} from "./wallet.js";
+import { WalletExecutionContext, getDenomInfo } from "./wallet.js";
import { getCandidateWithdrawalDenomsTx } from "./withdraw.js";
/**
@@ -891,9 +887,7 @@ async function processDepositGroupPendingTrack(
});
return TaskRunResult.finished();
} else {
- // Backing off until deposit long-polling works in the exchange.
- return TaskRunResult.backoff();
- // return TaskRunResult.longpollReturnedPending();
+ return TaskRunResult.longpollReturnedPending();
}
}
@@ -1128,8 +1122,7 @@ async function trackDeposit(
wireHash,
});
url.searchParams.set("merchant_sig", sigResp.sig);
- // Not doing long-polling yet as it looks like it's broken in the exchange (2024-02-20)
- // url.searchParams.set("timeout_ms", "30000");
+ url.searchParams.set("timeout_ms", "30000");
const httpResp = await wex.http.fetch(url.href, {
method: "GET",
cancellationToken: wex.cancellationToken,