[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: kyc operation don't give life
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: kyc operation don't give lifeness |
Date: |
Fri, 10 Nov 2023 15:51:17 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new f73cbe71c kyc operation don't give lifeness
f73cbe71c is described below
commit f73cbe71cdb4c490a4d8bd495d159e1f56488988
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Nov 10 11:51:03 2023 -0300
kyc operation don't give lifeness
---
.../taler-wallet-core/src/operations/pending.ts | 41 +++++++++++++++++++---
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/packages/taler-wallet-core/src/operations/pending.ts
b/packages/taler-wallet-core/src/operations/pending.ts
index 49dcbd5a6..7641dcf33 100644
--- a/packages/taler-wallet-core/src/operations/pending.ts
+++ b/packages/taler-wallet-core/src/operations/pending.ts
@@ -234,6 +234,11 @@ async function gatherWithdrawalPending(
await iterRecordsForWithdrawal(tx, { onlyState: "nonfinal" }, async (wsr) =>
{
const opTag = TaskIdentifiers.forWithdrawal(wsr);
let opr = await tx.operationRetries.get(opTag);
+ /**
+ * kyc pending operation don't give lifeness
+ * since the user need to complete kyc procedure
+ */
+ const userNeedToCompleteKYC = wsr.kycUrl !== undefined
const now = AbsoluteTime.now();
if (!opr) {
opr = {
@@ -251,9 +256,9 @@ async function gatherWithdrawalPending(
ws,
opTag,
timestampOptionalAbsoluteFromDb(opr.retryInfo?.nextRetry) ??
- AbsoluteTime.now(),
+ AbsoluteTime.now(),
),
- givesLifeness: true,
+ givesLifeness: !userNeedToCompleteKYC,
withdrawalGroupId: wsr.withdrawalGroupId,
lastError: opr.lastError,
retryInfo: opr.retryInfo,
@@ -301,6 +306,11 @@ async function gatherDepositPending(
deposited = false;
}
}
+ /**
+ * kyc pending operation don't give lifeness
+ * since the user need to complete kyc procedure
+ */
+ const userNeedToCompleteKYC = dg.kycInfo !== undefined
const opId = TaskIdentifiers.forDeposit(dg);
const retryRecord = await tx.operationRetries.get(opId);
const timestampDue =
@@ -312,7 +322,7 @@ async function gatherDepositPending(
// Fully deposited operations don't give lifeness,
// because there is no reason to wait on the
// deposit tracking status.
- givesLifeness: !deposited,
+ givesLifeness: !deposited && !userNeedToCompleteKYC,
depositGroupId: dg.depositGroupId,
lastError: retryRecord?.lastError,
retryInfo: retryRecord?.retryInfo,
@@ -353,6 +363,13 @@ async function gatherRewardPending(
const timestampDue =
timestampOptionalAbsoluteFromDb(retryRecord?.retryInfo.nextRetry) ??
AbsoluteTime.now();
+
+ /**
+ * kyc pending operation don't give lifeness
+ * since the user need to complete kyc procedure
+ */
+ // const userNeedToCompleteKYC = tip.
+
if (tip.acceptedTimestamp) {
resp.pendingOperations.push({
type: PendingTaskType.RewardPickup,
@@ -532,10 +549,17 @@ async function gatherPeerPullInitiationPending(
const timestampDue =
timestampOptionalAbsoluteFromDb(retryRecord?.retryInfo.nextRetry) ??
AbsoluteTime.now();
+
+ /**
+ * kyc pending operation don't give lifeness
+ * since the user need to complete kyc procedure
+ */
+ const userNeedToCompleteKYC = pi.kycUrl !== undefined
+
resp.pendingOperations.push({
type: PendingTaskType.PeerPullCredit,
...getPendingCommon(ws, opId, timestampDue),
- givesLifeness: true,
+ givesLifeness: !userNeedToCompleteKYC,
retryInfo: retryRecord?.retryInfo,
pursePub: pi.pursePub,
internalOperationStatus: `0x${pi.status.toString(16)}`,
@@ -683,10 +707,17 @@ async function gatherPeerPushCreditPending(
const timestampDue =
timestampOptionalAbsoluteFromDb(retryRecord?.retryInfo.nextRetry) ??
AbsoluteTime.now();
+
+ /**
+ * kyc pending operation don't give lifeness
+ * since the user need to complete kyc procedure
+ */
+ const userNeedToCompleteKYC = pi.kycUrl !== undefined
+
resp.pendingOperations.push({
type: PendingTaskType.PeerPushCredit,
...getPendingCommon(ws, opId, timestampDue),
- givesLifeness: true,
+ givesLifeness: !userNeedToCompleteKYC,
retryInfo: retryRecord?.retryInfo,
peerPushCreditId: pi.peerPushCreditId,
});
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: kyc operation don't give lifeness,
gnunet <=