gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (f1f332e0a -> d34f8e48d)


From: gnunet
Subject: [taler-wallet-core] branch master updated (f1f332e0a -> d34f8e48d)
Date: Mon, 19 Sep 2022 12:48:17 +0200

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

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

    from f1f332e0a -also check for revoked
     new d759c7e78 -comment
     new d34f8e48d wallet-core: make coin availability accounting idempotent

The 2 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/pay.ts     | 1 -
 packages/taler-wallet-core/src/operations/refresh.ts | 4 +++-
 packages/taler-wallet-core/src/wallet.ts             | 4 ++++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/pay.ts 
b/packages/taler-wallet-core/src/operations/pay.ts
index 18be0fe65..415100160 100644
--- a/packages/taler-wallet-core/src/operations/pay.ts
+++ b/packages/taler-wallet-core/src/operations/pay.ts
@@ -963,7 +963,6 @@ export async function selectCandidates(
           if (denom.isRevoked || !denom.isOffered) {
             continue;
           }
-          // FIXME: validation status and isOffered!
           denoms.push({
             ...DenominationRecord.toDenomInfo(denom),
             numAvailable: denomAvail.freshCoinCount ?? 0,
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts 
b/packages/taler-wallet-core/src/operations/refresh.ts
index eeb492499..9560a3543 100644
--- a/packages/taler-wallet-core/src/operations/refresh.ts
+++ b/packages/taler-wallet-core/src/operations/refresh.ts
@@ -522,7 +522,9 @@ async function refreshReveal(
   refreshGroupId: string,
   coinIndex: number,
 ): Promise<void> {
-  logger.info("doing refresh reveal");
+  logger.info(
+    `doing refresh reveal for ${refreshGroupId} (old coin ${coinIndex})`,
+  );
   const d = await ws.db
     .mktx((x) => [x.refreshGroups, x.coins, x.denominations])
     .runReadOnly(async (tx) => {
diff --git a/packages/taler-wallet-core/src/wallet.ts 
b/packages/taler-wallet-core/src/wallet.ts
index 0208f24ac..c615bc81d 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -810,6 +810,10 @@ export async function makeCoinAvailable(
   }>,
   coinRecord: CoinRecord,
 ): Promise<void> {
+  const existingCoin = await tx.coins.get(coinRecord.coinPub);
+  if (existingCoin) {
+    return;
+  }
   const denom = await tx.denominations.get([
     coinRecord.exchangeBaseUrl,
     coinRecord.denomPubHash,

-- 
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]