From e4679fba513edff73692021f5ca6bfd1a29f0398 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 19 Sep 2022 12:19:58 +0200 Subject: wallet-core: only pay with coins of offered denominations --- packages/taler-wallet-core/src/operations/pay.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'packages/taler-wallet-core') diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts index fb22d0fad..bc8cb3768 100644 --- a/packages/taler-wallet-core/src/operations/pay.ts +++ b/packages/taler-wallet-core/src/operations/pay.ts @@ -960,6 +960,10 @@ export async function selectCandidates( denomAvail.denomPubHash, ]); checkDbInvariant(!!denom); + if (!denom.isOffered) { + continue; + } + // FIXME: validation status and isOffered! denoms.push({ ...DenominationRecord.toDenomInfo(denom), numAvailable: denomAvail.freshCoinCount ?? 0, -- cgit v1.2.3