aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-09-19 12:19:58 +0200
committerFlorian Dold <florian@dold.me>2022-09-19 12:19:58 +0200
commite4679fba513edff73692021f5ca6bfd1a29f0398 (patch)
tree69d3d1989c3d1952916657f415b53722a67b7fdd
parentfd752f3171a76129d2f615535b90c6bebb88d842 (diff)
wallet-core: only pay with coins of offered denominations
-rw-r--r--packages/taler-wallet-core/src/operations/pay.ts4
1 files changed, 4 insertions, 0 deletions
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,