[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 02/02: fix: do not count coins with other currency
From: |
gnunet |
Subject: |
[taler-wallet-core] 02/02: fix: do not count coins with other currency |
Date: |
Thu, 19 Jan 2023 17:45:01 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit e263fe35080bcf3ef5af729b121e30dfbff81910
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Jan 19 13:37:42 2023 -0300
fix: do not count coins with other currency
---
packages/taler-wallet-core/src/operations/balance.ts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/packages/taler-wallet-core/src/operations/balance.ts
b/packages/taler-wallet-core/src/operations/balance.ts
index 2c57f8af8..27b801804 100644
--- a/packages/taler-wallet-core/src/operations/balance.ts
+++ b/packages/taler-wallet-core/src/operations/balance.ts
@@ -379,6 +379,9 @@ export async function getMerchantPaymentBalanceDetails(
])
.runReadOnly(async (tx) => {
await tx.coinAvailability.iter().forEach((ca) => {
+ if (ca.currency != req.currency) {
+ return;
+ }
const singleCoinAmount: AmountJson = {
currency: ca.currency,
fraction: ca.amountFrac,
@@ -413,6 +416,9 @@ export async function getMerchantPaymentBalanceDetails(
});
await tx.refreshGroups.iter().forEach((r) => {
+ if (r.currency != req.currency) {
+ return;
+ }
d.balanceAvailable = Amounts.add(
d.balanceAvailable,
computeRefreshGroupAvailableAmount(r),
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.