commit b609f48ae664618b6f4e75e42221f1240c8f61f0
parent f5771cc7b99dc938fd606dcbee350b66ec8027c9
Author: Florian Dold <florian@dold.me>
Date: Wed, 10 Jan 2024 13:48:48 +0100
-don't use deprecated method
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -731,6 +731,7 @@ interface WithdrawalBatchResult {
coinIdxs: number[];
batchResp: ExchangeWithdrawBatchResponse;
}
+
enum AmlStatus {
normal = 0,
pending = 1,
@@ -999,7 +1000,10 @@ async function processPlanchetExchangeBatchRequest(
).href;
try {
- const resp = await ws.http.postJson(reqUrl, batchReq);
+ const resp = await ws.http.fetch(reqUrl, {
+ method: "PATCH",
+ body: batchReq,
+ });
if (resp.status === HttpStatusCode.UnavailableForLegalReasons) {
await handleKycRequired(ws, withdrawalGroup, resp, 0, requestCoinIdxs);
return {
@@ -1583,7 +1587,7 @@ async function processWithdrawalGroupPendingReady(
work = [];
for (let j = 0; j < resp.coinIdxs.length; j++) {
if (!resp.batchResp.ev_sigs[j]) {
- //response may not be available when there is kyc needed
+ // response may not be available when there is kyc needed
continue;
}
work.push(