aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-06-28 11:36:21 -0300
committerSebastian <sebasjm@gmail.com>2023-06-28 11:36:21 -0300
commitce3c3d78392c25300d0a96e140c6092a6b8a898d (patch)
tree15454d6590a99ad360d75aa2c90d372f0b417e1c
parentf1008c966191f5b1d3bf1f7ea8af4fbba4380b46 (diff)
downloadwallet-core-ce3c3d78392c25300d0a96e140c6092a6b8a898d.tar.gz
wallet-core-ce3c3d78392c25300d0a96e140c6092a6b8a898d.tar.bz2
wallet-core-ce3c3d78392c25300d0a96e140c6092a6b8a898d.zip
check currency so it wont compare coins that are not related
-rw-r--r--packages/taler-wallet-core/src/operations/balance.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/balance.ts b/packages/taler-wallet-core/src/operations/balance.ts
index af88181c0..0fcab0542 100644
--- a/packages/taler-wallet-core/src/operations/balance.ts
+++ b/packages/taler-wallet-core/src/operations/balance.ts
@@ -551,6 +551,9 @@ export async function getPeerPaymentBalanceDetailsInTx(
});
await tx.refreshGroups.iter().forEach((r) => {
+ if (r.currency != req.currency) {
+ return;
+ }
balanceAvailable = Amounts.add(
balanceAvailable,
computeRefreshGroupAvailableAmount(r),