summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pay.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-08-23 22:28:36 +0200
committerFlorian Dold <florian@dold.me>2021-08-23 22:28:46 +0200
commit828e65b0eba66b7c999d9867396797a239449a6d (patch)
tree2dcb55dfb5c9854c196fc21d0d5282928de12ff6 /packages/taler-wallet-core/src/operations/pay.ts
parent67e511d719cbc3e7f2b391a8d6914406caa2fb24 (diff)
downloadwallet-core-828e65b0eba66b7c999d9867396797a239449a6d.tar.gz
wallet-core-828e65b0eba66b7c999d9867396797a239449a6d.tar.bz2
wallet-core-828e65b0eba66b7c999d9867396797a239449a6d.zip
fix un-offered denom situation, test case almost works
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pay.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts
index 54049feb2..a201e6f8d 100644
--- a/packages/taler-wallet-core/src/operations/pay.ts
+++ b/packages/taler-wallet-core/src/operations/pay.ts
@@ -211,6 +211,12 @@ function isSpendableCoin(coin: CoinRecord, denom: DenominationRecord): boolean {
if (coin.suspended) {
return false;
}
+ if (denom.isRevoked) {
+ return false;
+ }
+ if (!denom.isOffered) {
+ return false;
+ }
if (coin.status !== CoinStatus.Fresh) {
return false;
}