fix: do not count coins with other currency
This commit is contained in:
parent
928fe2d019
commit
e263fe3508
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user