diff options
author | Florian Dold <florian@dold.me> | 2022-09-19 12:19:58 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-09-19 12:19:58 +0200 |
commit | e4679fba513edff73692021f5ca6bfd1a29f0398 (patch) | |
tree | 69d3d1989c3d1952916657f415b53722a67b7fdd /packages/taler-wallet-core/src/operations/pay.ts | |
parent | fd752f3171a76129d2f615535b90c6bebb88d842 (diff) | |
download | wallet-core-e4679fba513edff73692021f5ca6bfd1a29f0398.tar.xz |
wallet-core: only pay with coins of offered denominations
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay.ts | 4 |
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, |