aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-10-15 11:52:07 +0200
committerFlorian Dold <florian@dold.me>2022-10-15 11:53:16 +0200
commite075134ffc94fda3582b179122bda594d91a962b (patch)
tree547920b2aa07bdb9f2c87a0c1f8c35dbcd64c8f7 /packages/taler-wallet-cli
parent4d70391f3db386766a516bdecc3d1d265c5d49a1 (diff)
wallet-core: simplify coin record
we only track the allocation now, not the remaining amount
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r--packages/taler-wallet-cli/src/index.ts4
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-wallettesting.ts9
3 files changed, 8 insertions, 7 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index 941a2f28f..b3abbac6f 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -1105,9 +1105,7 @@ advancedCli
console.log(`coin ${coin.coin_pub}`);
console.log(` exchange ${coin.exchange_base_url}`);
console.log(` denomPubHash ${coin.denom_pub_hash}`);
- console.log(
- ` remaining amount ${Amounts.stringify(coin.remaining_value)}`,
- );
+ console.log(` status ${coin.coin_status}`);
}
});
});
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts b/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts
index e4e96a180..8d1f6e873 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-refund-incremental.ts
@@ -193,7 +193,7 @@ export async function runRefundIncrementalTest(t: GlobalTestState) {
.map((x) => x.amountEffective),
).amount;
- t.assertAmountEquals("TESTKUDOS:8.33", effective);
+ t.assertAmountEquals("TESTKUDOS:8.59", effective);
}
await t.shutdown();
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-wallettesting.ts b/packages/taler-wallet-cli/src/integrationtests/test-wallettesting.ts
index c16a85f19..03c446db3 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-wallettesting.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-wallettesting.ts
@@ -22,7 +22,7 @@
/**
* Imports.
*/
-import { Amounts } from "@gnu-taler/taler-util";
+import { Amounts, CoinStatus } from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { CoinConfig, defaultCoinConfig } from "../harness/denomStructures.js";
import {
@@ -32,7 +32,7 @@ import {
MerchantService,
setupDb,
WalletCli,
- getPayto
+ getPayto,
} from "../harness/harness.js";
import { SimpleTestEnvironment } from "../harness/helpers.js";
@@ -184,7 +184,10 @@ export async function runWallettestingTest(t: GlobalTestState) {
let susp: string | undefined;
{
for (const c of coinDump.coins) {
- if (0 === Amounts.cmp(c.remaining_value, "TESTKUDOS:8")) {
+ if (
+ c.coin_status === CoinStatus.Fresh &&
+ 0 === Amounts.cmp(c.denom_value, "TESTKUDOS:8")
+ ) {
susp = c.coin_pub;
}
}