From ce3c3d78392c25300d0a96e140c6092a6b8a898d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 28 Jun 2023 11:36:21 -0300 Subject: [PATCH] check currency so it wont compare coins that are not related --- packages/taler-wallet-core/src/operations/balance.ts | 3 +++ 1 file changed, 3 insertions(+) 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),