From 4898f50db777a68cd2ddd0c1e323ef55033f4af7 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 8 Sep 2023 13:33:21 +0200 Subject: wallet-core: more DB cleanup --- packages/taler-wallet-core/src/operations/pay-peer-common.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/pay-peer-common.ts') diff --git a/packages/taler-wallet-core/src/operations/pay-peer-common.ts b/packages/taler-wallet-core/src/operations/pay-peer-common.ts index 9e05e43d8..6d425289d 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer-common.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer-common.ts @@ -108,16 +108,8 @@ export async function getTotalPeerPaymentCost( } const allDenoms = await tx.denominations.indexes.byExchangeBaseUrl .iter(coin.exchangeBaseUrl) - .filter((x) => - Amounts.isSameCurrency( - DenominationRecord.getValue(x), - pcs[i].contribution, - ), - ); - const amountLeft = Amounts.sub( - DenominationRecord.getValue(denom), - pcs[i].contribution, - ).amount; + .filter((x) => Amounts.isSameCurrency(x.value, pcs[i].contribution)); + const amountLeft = Amounts.sub(denom.value, pcs[i].contribution).amount; const refreshCost = getTotalRefreshCost( allDenoms, DenominationRecord.toDenomInfo(denom), -- cgit v1.2.3