aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay-merchant.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-merchant.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay-merchant.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-merchant.ts b/packages/taler-wallet-core/src/operations/pay-merchant.ts
index fb8a6d898..5d58f4c2f 100644
--- a/packages/taler-wallet-core/src/operations/pay-merchant.ts
+++ b/packages/taler-wallet-core/src/operations/pay-merchant.ts
@@ -98,6 +98,7 @@ import {
WalletStoresV1,
} from "../db.js";
import {
+ getCandidateWithdrawalDenomsTx,
PendingTaskType,
RefundGroupRecord,
RefundGroupStatus,
@@ -171,11 +172,12 @@ export async function getTotalPaymentCost(
"can't calculate payment cost, denomination for coin not found",
);
}
- const allDenoms = (
- await tx.denominations.indexes.byExchangeBaseUrl.getAll(
- coin.exchangeBaseUrl,
- )
- ).filter((x) => x.currency === currency);
+ const allDenoms = await getCandidateWithdrawalDenomsTx(
+ ws,
+ tx,
+ coin.exchangeBaseUrl,
+ currency,
+ );
const amountLeft = Amounts.sub(
denom.value,
pcs.coinContributions[i],