[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 01/03: wallet-core: check for broken transactions
From: |
gnunet |
Subject: |
[taler-wallet-core] 01/03: wallet-core: check for broken transactions |
Date: |
Tue, 04 Apr 2023 15:26:23 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
commit cefec08ce7ef5d1fce0398d54b651c3a0762c788
Author: Florian Dold <florian@dold.me>
AuthorDate: Tue Apr 4 11:51:12 2023 +0200
wallet-core: check for broken transactions
---
packages/taler-wallet-core/src/operations/transactions.ts | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts
b/packages/taler-wallet-core/src/operations/transactions.ts
index 34d76c5c2..133675aa1 100644
--- a/packages/taler-wallet-core/src/operations/transactions.ts
+++ b/packages/taler-wallet-core/src/operations/transactions.ts
@@ -24,6 +24,7 @@ import {
constructPayPullUri,
constructPayPushUri,
ExtendedStatus,
+ j2s,
Logger,
OrderShortInfo,
PaymentStatus,
@@ -1348,6 +1349,18 @@ export async function getTransactions(
});
});
+ // One-off checks, because of a bug where the wallet previously
+ // did not migrate the DB correctly and caused these amounts
+ // to be missing sometimes.
+ for (let tx of transactions) {
+ if (!tx.amountEffective) {
+ logger.warn(`missing amountEffective in ${j2s(tx)}`);
+ }
+ if (!tx.amountRaw) {
+ logger.warn(`missing amountRaw in ${j2s(tx)}`);
+ }
+ }
+
const txPending = transactions.filter((x) => x.pending);
const txNotPending = transactions.filter((x) => !x.pending);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.