aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-04-14 18:21:23 +0200
committerFlorian Dold <florian@dold.me>2021-04-14 18:21:23 +0200
commitf4b5f3cff8c29b4aab31d1ef0d0cefd32045db63 (patch)
tree3f27375b097edeae35010d5642ea964969001f98 /packages/taler-wallet-cli
parent14f13250a01ad15d9fb1ba956fc5409c7f76a2fa (diff)
implement debug flag for allowing late withdrawal
Diffstat (limited to 'packages/taler-wallet-cli')
-rwxr-xr-xpackages/taler-wallet-cli/bin/taler-wallet-cli2
-rw-r--r--packages/taler-wallet-cli/src/index.ts39
2 files changed, 35 insertions, 6 deletions
diff --git a/packages/taler-wallet-cli/bin/taler-wallet-cli b/packages/taler-wallet-cli/bin/taler-wallet-cli
index 756de2027..ca8008e30 100755
--- a/packages/taler-wallet-cli/bin/taler-wallet-cli
+++ b/packages/taler-wallet-cli/bin/taler-wallet-cli
@@ -4,4 +4,4 @@ try {
} catch (e) {
// Do nothing.
}
-require('../dist/taler-wallet-cli.js').walletCli.run();
+require('../dist/taler-wallet-cli.js').main();
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index 8865c3303..8b203a4cd 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -22,8 +22,30 @@ import fs from "fs";
import * as clk from "./clk.js";
import { deepStrictEqual } from "assert";
import { getTestInfo, runTests } from "./integrationtests/testrunner.js";
-import { PreparePayResultType, setDangerousTimetravel, classifyTalerUri, TalerUriType, RecoveryMergeStrategy, Amounts, addPaytoQueryParams, codecForList, codecForString } from "@gnu-taler/taler-util";
-import { Logger, Wallet, NodeHttpLib, getDefaultNodeWallet, OperationFailedAndReportedError, OperationFailedError, decodeCrock, rsaBlind, NodeThreadCryptoWorkerFactory, CryptoApi } from "@gnu-taler/taler-wallet-core";
+import {
+ PreparePayResultType,
+ setDangerousTimetravel,
+ classifyTalerUri,
+ TalerUriType,
+ RecoveryMergeStrategy,
+ Amounts,
+ addPaytoQueryParams,
+ codecForList,
+ codecForString,
+} from "@gnu-taler/taler-util";
+import {
+ Logger,
+ Wallet,
+ NodeHttpLib,
+ getDefaultNodeWallet,
+ OperationFailedAndReportedError,
+ OperationFailedError,
+ decodeCrock,
+ rsaBlind,
+ NodeThreadCryptoWorkerFactory,
+ CryptoApi,
+ walletCoreDebugFlags,
+} from "@gnu-taler/taler-wallet-core";
// This module also serves as the entry point for the crypto
// thread worker, and thus must expose these two handlers.
@@ -780,10 +802,10 @@ testCli
help: "Glob pattern to select which tests to run",
})
.maybeOption("suites", ["--suites"], clk.STRING, {
- help: "Only run selected suites (string-separated list)"
+ help: "Only run selected suites (string-separated list)",
})
.flag("dryRun", ["--dry"], {
- help: "Only print tests that will be selected to run."
+ help: "Only print tests that will be selected to run.",
})
.action(async (args) => {
await runTests({
@@ -793,7 +815,6 @@ testCli
});
});
-
async function read(stream: NodeJS.ReadStream) {
const chunks = [];
for await (const chunk of stream) chunks.push(chunk);
@@ -858,3 +879,11 @@ testCli.subcommand("cryptoworker", "cryptoworker").action(async (args) => {
const res = await cryptoApi.hashString("foo");
console.log(res);
});
+
+export function main() {
+ if (process.env["TALER_WALLET_DEBUG_DENOMSEL_ALLOW_LATE"]) {
+ logger.warn("Allowing withdrawal of late denominations for debugging");
+ walletCoreDebugFlags.denomselAllowLate = true;
+ }
+ walletCli.run();
+}