aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-cli
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-cli')
-rw-r--r--packages/taler-wallet-cli/src/index.ts8
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/harness.ts26
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts2
-rw-r--r--packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts15
-rw-r--r--packages/taler-wallet-cli/src/lint.ts2
5 files changed, 24 insertions, 29 deletions
diff --git a/packages/taler-wallet-cli/src/index.ts b/packages/taler-wallet-cli/src/index.ts
index 2d50e226b..0985ba884 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -40,14 +40,14 @@ import {
codecForString,
Logger,
Configuration,
+ decodeCrock,
+ rsaBlind,
} from "@gnu-taler/taler-util";
import {
NodeHttpLib,
getDefaultNodeWallet,
OperationFailedAndReportedError,
OperationFailedError,
- decodeCrock,
- rsaBlind,
NodeThreadCryptoWorkerFactory,
CryptoApi,
walletCoreDebugFlags,
@@ -810,7 +810,7 @@ advancedCli
coinPubList = coinPubListCodec.decode(
JSON.parse(args.suspendCoins.coinPubSpec),
);
- } catch (e) {
+ } catch (e: any) {
console.log("could not parse coin list:", e.message);
process.exit(1);
}
@@ -835,7 +835,7 @@ advancedCli
coinPubList = coinPubListCodec.decode(
JSON.parse(args.unsuspendCoins.coinPubSpec),
);
- } catch (e) {
+ } catch (e: any) {
console.log("could not parse coin list:", e.message);
process.exit(1);
}
diff --git a/packages/taler-wallet-cli/src/integrationtests/harness.ts b/packages/taler-wallet-cli/src/integrationtests/harness.ts
index d47dfe098..a3a6e9e1c 100644
--- a/packages/taler-wallet-cli/src/integrationtests/harness.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/harness.ts
@@ -44,11 +44,6 @@ import {
MerchantInstancesResponse,
} from "./merchantApiTypes";
import {
- createEddsaKeyPair,
- eddsaGetPublic,
- EddsaKeyPair,
- encodeCrock,
- getRandomBytes,
openPromise,
OperationFailedError,
WalletCoreApiClient,
@@ -64,6 +59,11 @@ import {
Duration,
parsePaytoUri,
CoreApiResponse,
+ createEddsaKeyPair,
+ eddsaGetPublic,
+ EddsaKeyPair,
+ encodeCrock,
+ getRandomBytes,
} from "@gnu-taler/taler-util";
import { CoinConfig } from "./denomStructures.js";
@@ -441,7 +441,7 @@ export async function pingProc(
const resp = await axios.get(url);
console.log(`service ${serviceName} available`);
return;
- } catch (e) {
+ } catch (e: any) {
console.log(`service ${serviceName} not ready:`, e.toString());
await delayMs(1000);
}
@@ -1074,8 +1074,12 @@ export class ExchangeService implements ExchangeServiceInterface {
async purgeSecmodKeys(): Promise<void> {
const cfg = Configuration.load(this.configFilename);
- const rsaKeydir = cfg.getPath("taler-exchange-secmod-rsa", "KEY_DIR").required();
- const eddsaKeydir = cfg.getPath("taler-exchange-secmod-eddsa", "KEY_DIR").required();
+ const rsaKeydir = cfg
+ .getPath("taler-exchange-secmod-rsa", "KEY_DIR")
+ .required();
+ const eddsaKeydir = cfg
+ .getPath("taler-exchange-secmod-eddsa", "KEY_DIR")
+ .required();
// Be *VERY* careful when changing this, or you will accidentally delete user data.
await sh(this.globalState, "rm-secmod-keys", `rm -rf ${rsaKeydir}/COIN_*`);
await sh(this.globalState, "rm-secmod-keys", `rm ${eddsaKeydir}/*`);
@@ -1119,11 +1123,7 @@ export class ExchangeService implements ExchangeServiceInterface {
this.exchangeHttpProc = this.globalState.spawnService(
"taler-exchange-httpd",
- [
- "-c",
- this.configFilename,
- ...this.timetravelArgArr,
- ],
+ ["-c", this.configFilename, ...this.timetravelArgArr],
`exchange-httpd-${this.name}`,
);
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts b/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts
index 6a09de77d..d6d0e2dce 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-bank-api.ts
@@ -28,7 +28,7 @@ import {
BankAccessApi,
CreditDebitIndicator,
} from "./harness";
-import { createEddsaKeyPair, encodeCrock } from "@gnu-taler/taler-wallet-core";
+import { createEddsaKeyPair, encodeCrock } from "@gnu-taler/taler-util";
import { defaultCoinConfig } from "./denomStructures";
/**
diff --git a/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts b/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts
index ab7bf1acd..867af99d5 100644
--- a/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts
+++ b/packages/taler-wallet-cli/src/integrationtests/test-merchant-spec-public-orders.ts
@@ -21,13 +21,10 @@ import {
ConfirmPayResultType,
PreparePayResultType,
URL,
-} from "@gnu-taler/taler-util";
-import {
encodeCrock,
getRandomBytes,
- NodeHttpLib,
- WalletApiOperation,
-} from "@gnu-taler/taler-wallet-core";
+} from "@gnu-taler/taler-util";
+import { NodeHttpLib, WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import {
BankService,
ExchangeService,
@@ -566,11 +563,9 @@ async function testWithoutClaimToken(
* specification of the endpoint.
*/
export async function runMerchantSpecPublicOrdersTest(t: GlobalTestState) {
- const {
- bank,
- exchange,
- merchant,
- } = await createSimpleTestkudosEnvironment(t);
+ const { bank, exchange, merchant } = await createSimpleTestkudosEnvironment(
+ t,
+ );
// Base URL for the default instance.
const merchantBaseUrl = merchant.makeInstanceBaseUrl();
diff --git a/packages/taler-wallet-cli/src/lint.ts b/packages/taler-wallet-cli/src/lint.ts
index 4b9633871..0fed68c34 100644
--- a/packages/taler-wallet-cli/src/lint.ts
+++ b/packages/taler-wallet-cli/src/lint.ts
@@ -35,9 +35,9 @@ import {
codecForExchangeKeysJson,
codecForKeysManagementResponse,
Configuration,
+ decodeCrock,
} from "@gnu-taler/taler-util";
import {
- decodeCrock,
NodeHttpLib,
readSuccessResponseJsonOrThrow,
} from "@gnu-taler/taler-wallet-core";