gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated (07398ee49 -> c8336c8c2)


From: gnunet
Subject: [taler-wallet-core] branch master updated (07398ee49 -> c8336c8c2)
Date: Fri, 10 Feb 2023 16:53:36 +0100

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a change to branch master
in repository wallet-core.

    from 07398ee49 fix breaking build
     new 3ade15e5e fix: Cannot read properties of undefined (reading 'ev_sig')
     new 599c6fa95 fix: not saving planchet as kyc required
     new c8336c8c2 pretty

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/taler-wallet-core/src/operations/withdraw.ts | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts 
b/packages/taler-wallet-core/src/operations/withdraw.ts
index 987a5e062..c2fcf05e8 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -549,7 +549,10 @@ async function processPlanchetExchangeBatchRequest(
     };
   }
 
-  async function handleKycRequired(resp: HttpResponse, startIdx: number) {
+  async function handleKycRequired(
+    resp: HttpResponse,
+    startIdx: number,
+  ): Promise<void> {
     logger.info("withdrawal requires KYC");
     const respJson = await resp.json();
     const uuidResp = codecForWalletKycUuid().decode(respJson);
@@ -557,7 +560,7 @@ async function processPlanchetExchangeBatchRequest(
     await ws.db
       .mktx((x) => [x.planchets, x.withdrawalGroups])
       .runReadWrite(async (tx) => {
-        for (let i = 0; i < startIdx; i++) {
+        for (let i = startIdx; i < coinIdxs.length; i++) {
           let planchet = await tx.planchets.indexes.byGroupAndIndex.get([
             withdrawalGroup.withdrawalGroupId,
             coinIdxs[i],
@@ -583,7 +586,7 @@ async function processPlanchetExchangeBatchRequest(
     return;
   }
 
-  async function storeCoinError(e: any, coinIdx: number) {
+  async function storeCoinError(e: any, coinIdx: number): Promise<void> {
     const errDetail = getErrorDetailFromException(e);
     logger.trace("withdrawal request failed", e);
     logger.trace(String(e));
@@ -794,7 +797,7 @@ async function processPlanchetVerifyAndStoreCoin(
     type: NotificationType.CoinWithdrawn,
     numTotal: wgContext.numPlanchets,
     numWithdrawn: wgContext.planchetsFinished.size,
-  }
+  };
 
   // Check if this is the first time that the whole
   // withdrawal succeeded.  If so, mark the withdrawal
@@ -1181,6 +1184,10 @@ export async function processWithdrawalGroup(
     let work: Promise<void>[] = [];
     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
+        continue;
+      }
       work.push(
         processPlanchetVerifyAndStoreCoin(
           ws,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]