aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-peer-common.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-08 13:33:21 +0200
committerFlorian Dold <florian@dold.me>2023-09-08 13:33:21 +0200
commit4898f50db777a68cd2ddd0c1e323ef55033f4af7 (patch)
tree82b241ffc35413c6653d781e381f3d47f7ffd544 /packages/taler-wallet-core/src/operations/pay-peer-common.ts
parent2ae952cdfa8f38a650be8e4438c21bace2f24c19 (diff)
downloadwallet-core-4898f50db777a68cd2ddd0c1e323ef55033f4af7.tar.gz
wallet-core-4898f50db777a68cd2ddd0c1e323ef55033f4af7.tar.bz2
wallet-core-4898f50db777a68cd2ddd0c1e323ef55033f4af7.zip
wallet-core: more DB cleanup
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),