gnunet-svn
[Top][All Lists]
Advanced

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

[taler-typescript-core] branch master updated: wallet-core: refine confu


From: gnunet
Subject: [taler-typescript-core] branch master updated: wallet-core: refine confusing log
Date: Tue, 14 Jan 2025 21:16:51 +0100

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

dold pushed a commit to branch master
in repository taler-typescript-core.

The following commit(s) were added to refs/heads/master by this push:
     new ee826c157 wallet-core: refine confusing log
ee826c157 is described below

commit ee826c157605177195b6fd6c0c5c172c1066368a
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Jan 14 21:16:47 2025 +0100

    wallet-core: refine confusing log
---
 packages/taler-wallet-core/src/exchanges.ts | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/packages/taler-wallet-core/src/exchanges.ts 
b/packages/taler-wallet-core/src/exchanges.ts
index 45b136c5e..040a2cc84 100644
--- a/packages/taler-wallet-core/src/exchanges.ts
+++ b/packages/taler-wallet-core/src/exchanges.ts
@@ -255,7 +255,24 @@ async function getExchangeRecordsInternal(
   }
   const dp = r.detailsPointer;
   if (!dp) {
-    logger.warn(`no exchange details pointer for ${exchangeBaseUrl}`);
+    switch (r.updateStatus) {
+      case ExchangeEntryDbUpdateStatus.Ready:
+      case ExchangeEntryDbUpdateStatus.ReadyUpdate:
+      case ExchangeEntryDbUpdateStatus.OutdatedUpdate:
+        logger.error(
+          `Database invariant violated: no exchange details in wallet database 
for ${exchangeBaseUrl}.`,
+        );
+        break;
+      case ExchangeEntryDbUpdateStatus.Initial:
+      case ExchangeEntryDbUpdateStatus.InitialUpdate:
+      case ExchangeEntryDbUpdateStatus.Suspended:
+      case ExchangeEntryDbUpdateStatus.UnavailableUpdate:
+        // In these states, not having exchange details in the wallet DB
+        // is expected.
+        break;
+      default:
+        assertUnreachable(r.updateStatus);
+    }
     return;
   }
   const { currency, masterPublicKey } = dp;

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