summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-peer-common.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer-common.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-peer-common.ts12
1 files changed, 2 insertions, 10 deletions
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),