check currency so it wont compare coins that are not related

This commit is contained in:
Sebastian 2023-06-28 11:36:21 -03:00
parent f1008c9661
commit ce3c3d7839
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069

View File

@ -551,6 +551,9 @@ export async function getPeerPaymentBalanceDetailsInTx(
}); });
await tx.refreshGroups.iter().forEach((r) => { await tx.refreshGroups.iter().forEach((r) => {
if (r.currency != req.currency) {
return;
}
balanceAvailable = Amounts.add( balanceAvailable = Amounts.add(
balanceAvailable, balanceAvailable,
computeRefreshGroupAvailableAmount(r), computeRefreshGroupAvailableAmount(r),