gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated (e4bf114f6 -> b3cdd3409)


From: gnunet
Subject: [taler-wallet-core] branch master updated (e4bf114f6 -> b3cdd3409)
Date: Mon, 24 Apr 2023 18:13:27 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a change to branch master
in repository wallet-core.

    from e4bf114f6 fixme in wire status
     new 3004ece1f prevent http request without enable it explicitly
     new 205d7364e wallet effective config
     new 4889ae9c9 add allowHttp to the cli
     new b3cdd3409 improved log, added allow-http flag and prevent thrott

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/taler-harness/package.json                |   2 +-
 packages/taler-harness/src/bench1.ts               |   5 +-
 packages/taler-harness/src/bench2.ts               |  14 +-
 packages/taler-harness/src/bench3.ts               |   3 +-
 packages/taler-harness/src/harness/harness.ts      | 166 +++++++++++++++------
 packages/taler-harness/src/harness/helpers.ts      |   4 +-
 .../taler-harness/src/harness/libeufin-apis.ts     |   3 +-
 packages/taler-harness/src/harness/libeufin.ts     |   2 +
 packages/taler-harness/src/index.ts                |  40 ++---
 .../test-age-restrictions-merchant.ts              |   1 +
 .../integrationtests/test-age-restrictions-peer.ts |   4 +-
 .../src/integrationtests/test-bank-api.ts          |   1 +
 .../src/integrationtests/test-exchange-deposit.ts  |  10 +-
 .../integrationtests/test-exchange-timetravel.ts   |  10 +-
 .../taler-harness/src/integrationtests/test-kyc.ts |   5 +-
 .../test-merchant-spec-public-orders.ts            |   5 +-
 .../src/integrationtests/test-tipping.ts           |   1 +
 .../src/integrationtests/test-wallet-dbless.ts     |  18 ++-
 .../src/integrationtests/test-withdrawal-manual.ts |   1 +
 .../src/integrationtests/testrunner.ts             |  27 ++--
 packages/taler-harness/src/lint.ts                 |   5 +-
 packages/taler-util/package.json                   |   4 +-
 packages/taler-util/src/http-common.ts             |   1 +
 packages/taler-util/src/http-impl.node.ts          |  12 ++
 packages/taler-util/src/http-impl.qtart.ts         |  12 ++
 packages/taler-wallet-cli/src/index.ts             |   5 +
 packages/taler-wallet-core/src/bank-api-client.ts  |  35 ++++-
 packages/taler-wallet-core/src/host-impl.node.ts   |   1 +
 packages/taler-wallet-core/src/host-impl.qtart.ts  |   5 +-
 packages/taler-wallet-core/src/wallet-api-types.ts |   1 +
 packages/taler-wallet-core/src/wallet.ts           |  61 ++++----
 31 files changed, 325 insertions(+), 139 deletions(-)

diff --git a/packages/taler-harness/package.json 
b/packages/taler-harness/package.json
index 3af8b73e3..eee369f66 100644
--- a/packages/taler-harness/package.json
+++ b/packages/taler-harness/package.json
@@ -16,7 +16,7 @@
   },
   "type": "module",
   "scripts": {
-    "compile": "./build.mjs",
+    "compile": "tsc && ./build.mjs",
     "check": "tsc",
     "test": "tsc",
     "clean": "rimraf lib dist tsconfig.tsbuildinfo",
diff --git a/packages/taler-harness/src/bench1.ts 
b/packages/taler-harness/src/bench1.ts
index 941d9244a..fb7cc9e1f 100644
--- a/packages/taler-harness/src/bench1.ts
+++ b/packages/taler-harness/src/bench1.ts
@@ -48,6 +48,7 @@ export async function runBench1(configJson: any): 
Promise<void> {
 
   const myHttpLib = createPlatformHttpLib({
     enableThrottling: false,
+    allowHttp: true,
   });
 
   const numIter = b1conf.iterations ?? 1;
@@ -92,8 +93,8 @@ export async function runBench1(configJson: any): 
Promise<void> {
           },
           features: {
             batchWithdrawal,
-          }
-        }
+          },
+        },
       });
       wallet = res.wallet;
       getDbStats = res.getDbStats;
diff --git a/packages/taler-harness/src/bench2.ts 
b/packages/taler-harness/src/bench2.ts
index ff87da52a..48ac76b9f 100644
--- a/packages/taler-harness/src/bench2.ts
+++ b/packages/taler-harness/src/bench2.ts
@@ -34,6 +34,7 @@ import {
   findDenomOrThrow,
   refreshCoin,
   SynchronousCryptoWorkerFactoryPlain,
+  Wallet,
   withdrawCoin,
 } from "@gnu-taler/taler-wallet-core";
 
@@ -56,6 +57,7 @@ export async function runBench2(configJson: any): 
Promise<void> {
 
   const http = createPlatformHttpLib({
     enableThrottling: false,
+    allowHttp: true,
   });
 
   const numIter = benchConf.iterations ?? 1;
@@ -84,7 +86,9 @@ export async function runBench2(configJson: any): 
Promise<void> {
 
     console.log("reserve found");
 
-    const d1 = findDenomOrThrow(exchangeInfo, `${curr}:8`);
+    const d1 = findDenomOrThrow(exchangeInfo, `${curr}:8`, {
+      denomselAllowLate: Wallet.defaultConfig.testing.denomselAllowLate,
+    });
 
     for (let j = 0; j < numDeposits; j++) {
       console.log("withdrawing coin");
@@ -111,8 +115,12 @@ export async function runBench2(configJson: any): 
Promise<void> {
       });
 
       const refreshDenoms = [
-        findDenomOrThrow(exchangeInfo, `${curr}:1`),
-        findDenomOrThrow(exchangeInfo, `${curr}:1`),
+        findDenomOrThrow(exchangeInfo, `${curr}:1`, {
+          denomselAllowLate: Wallet.defaultConfig.testing.denomselAllowLate,
+        }),
+        findDenomOrThrow(exchangeInfo, `${curr}:1`, {
+          denomselAllowLate: Wallet.defaultConfig.testing.denomselAllowLate,
+        }),
       ];
 
       console.log("refreshing coin");
diff --git a/packages/taler-harness/src/bench3.ts 
b/packages/taler-harness/src/bench3.ts
index 2573aec14..ffafc75d2 100644
--- a/packages/taler-harness/src/bench3.ts
+++ b/packages/taler-harness/src/bench3.ts
@@ -52,6 +52,7 @@ export async function runBench3(configJson: any): 
Promise<void> {
 
   const myHttpLib = createPlatformHttpLib({
     enableThrottling: false,
+    allowHttp: true,
   });
 
   const numIter = b3conf.iterations ?? 1;
@@ -96,7 +97,7 @@ export async function runBench3(configJson: any): 
Promise<void> {
         httpLib: myHttpLib,
         config: {
           features: {
-            batchWithdrawal: batchWithdrawal,
+            batchWithdrawal,
           },
           testing: {
             insecureTrustExchange: trustExchange,
diff --git a/packages/taler-harness/src/harness/harness.ts 
b/packages/taler-harness/src/harness/harness.ts
index b6e80cfb7..0ee0d7960 100644
--- a/packages/taler-harness/src/harness/harness.ts
+++ b/packages/taler-harness/src/harness/harness.ts
@@ -102,6 +102,21 @@ interface WaitResult {
   signal: NodeJS.Signals | null;
 }
 
+class CommandError extends Error {
+  constructor(
+    public message: string,
+    public logName: string,
+    public command: string,
+    public args: string[],
+    public env: Env,
+    public code: number | null,
+  ) {
+    super(message);
+  }
+}
+interface Env {
+  [index: string]: string | undefined;
+}
 /**
  * Run a shell command, return stdout.
  */
@@ -109,15 +124,15 @@ export async function sh(
   t: GlobalTestState,
   logName: string,
   command: string,
-  env: { [index: string]: string | undefined } = process.env,
+  env: Env = process.env,
 ): Promise<string> {
-  logger.info(`running command ${command}`);
+  logger.trace(`running command ${command}`);
   return new Promise((resolve, reject) => {
     const stdoutChunks: Buffer[] = [];
     const proc = spawn(command, {
       stdio: ["inherit", "pipe", "pipe"],
       shell: true,
-      env: env,
+      env,
     });
     proc.stdout.on("data", (x) => {
       if (x instanceof Buffer) {
@@ -132,16 +147,34 @@ export async function sh(
     });
     proc.stderr.pipe(stderrLog);
     proc.on("exit", (code, signal) => {
-      logger.info(`child process exited (${code} / ${signal})`);
+      logger.info(`child process ${logName} exited (${code} / ${signal})`);
       if (code != 0) {
-        reject(Error(`Unexpected exit code ${code} for '${command}'`));
+        reject(
+          new CommandError(
+            `Unexpected exit code ${code}`,
+            logName,
+            command,
+            [],
+            env,
+            code,
+          ),
+        );
         return;
       }
       const b = Buffer.concat(stdoutChunks).toString("utf-8");
       resolve(b);
     });
-    proc.on("error", () => {
-      reject(Error("Child process had error"));
+    proc.on("error", (err) => {
+      reject(
+        new CommandError(
+          "Child process had error:" + err.message,
+          logName,
+          command,
+          [],
+          env,
+          null,
+        ),
+      );
     });
   });
 }
@@ -170,6 +203,7 @@ export async function runCommand(
   env: { [index: string]: string | undefined } = process.env,
 ): Promise<string> {
   logger.info(`running command ${shellescape([command, ...args])}`);
+
   return new Promise((resolve, reject) => {
     const stdoutChunks: Buffer[] = [];
     const proc = spawn(command, args, {
@@ -190,16 +224,34 @@ export async function runCommand(
     });
     proc.stderr.pipe(stderrLog);
     proc.on("exit", (code, signal) => {
-      logger.info(`child process exited (${code} / ${signal})`);
+      logger.trace(`child process exited (${code} / ${signal})`);
       if (code != 0) {
-        reject(Error(`Unexpected exit code ${code} for '${command}'`));
+        reject(
+          new CommandError(
+            `Unexpected exit code ${code}`,
+            logName,
+            command,
+            [],
+            env,
+            code,
+          ),
+        );
         return;
       }
       const b = Buffer.concat(stdoutChunks).toString("utf-8");
       resolve(b);
     });
-    proc.on("error", () => {
-      reject(Error("Child process had error"));
+    proc.on("error", (err) => {
+      reject(
+        new CommandError(
+          "Child process had error:" + err.message,
+          logName,
+          command,
+          [],
+          env,
+          null,
+        ),
+      );
     });
   });
 }
@@ -321,14 +373,14 @@ export class GlobalTestState {
     logName: string,
     env: { [index: string]: string | undefined } = process.env,
   ): ProcessWrapper {
-    logger.info(
+    logger.trace(
       `spawning process (${logName}): ${shellescape([command, ...args])}`,
     );
     const proc = spawn(command, args, {
       stdio: ["inherit", "pipe", "pipe"],
       env: env,
     });
-    logger.info(`spawned process (${logName}) with pid ${proc.pid}`);
+    logger.trace(`spawned process (${logName}) with pid ${proc.pid}`);
     proc.on("error", (err) => {
       logger.warn(`could not start process (${command})`, err);
     });
@@ -355,18 +407,18 @@ export class GlobalTestState {
       return;
     }
     if (shouldLingerInTest()) {
-      logger.info("refusing to shut down, lingering was requested");
+      logger.trace("refusing to shut down, lingering was requested");
       return;
     }
     this.inShutdown = true;
-    logger.info("shutting down");
+    logger.trace("shutting down");
     for (const s of this.servers) {
       s.close();
       s.removeAllListeners();
     }
     for (const p of this.procs) {
       if (p.proc.exitCode == null) {
-        logger.info(`killing process ${p.proc.pid}`);
+        logger.trace(`killing process ${p.proc.pid}`);
         p.proc.kill("SIGTERM");
         await p.wait();
       }
@@ -473,12 +525,12 @@ export async function pingProc(
   }
   while (true) {
     try {
-      logger.info(`pinging ${serviceName} at ${url}`);
+      logger.trace(`pinging ${serviceName} at ${url}`);
       const resp = await axios.get(url);
-      logger.info(`service ${serviceName} available`);
+      logger.trace(`service ${serviceName} available`);
       return;
     } catch (e: any) {
-      logger.info(`service ${serviceName} not ready:`, e.toString());
+      logger.warn(`service ${serviceName} not ready:`, e.toString());
       //console.log(e);
       await delayMs(1000);
     }
@@ -506,7 +558,10 @@ class LibEuFinBankService extends BankServiceBase 
implements BankServiceHandle {
   sandboxProc: ProcessWrapper | undefined;
   nexusProc: ProcessWrapper | undefined;
 
-  http = createPlatformHttpLib();
+  http = createPlatformHttpLib({
+    allowHttp: true,
+    enableThrottling: false,
+  });
 
   static async create(
     gc: GlobalTestState,
@@ -539,12 +594,6 @@ class LibEuFinBankService extends BankServiceBase 
implements BankServiceHandle {
     return url.href;
   }
 
-  // FIXME: Duplicate?  Where is this needed?
-  get baseUrlAccessApi(): string {
-    let url = new URL("access-api/", this.baseUrlDemobank);
-    return url.href;
-  }
-
   get bankAccessApiBaseUrl(): string {
     let url = new URL("access-api/", this.baseUrlDemobank);
     return url.href;
@@ -555,7 +604,7 @@ class LibEuFinBankService extends BankServiceBase 
implements BankServiceHandle {
   }
 
   get baseUrl(): string {
-    return this.baseUrlAccessApi;
+    return this.bankAccessApiBaseUrl;
   }
 
   async setSuggestedExchange(
@@ -587,7 +636,7 @@ class LibEuFinBankService extends BankServiceBase 
implements BankServiceHandle {
     await this.start();
     await this.pingUntilAvailable();
     await LibeufinSandboxApi.createDemobankAccount(accountName, password, {
-      baseUrl: this.baseUrlAccessApi,
+      baseUrl: this.bankAccessApiBaseUrl,
     });
     let bankAccountLabel = accountName;
     await LibeufinSandboxApi.createDemobankEbicsSubscriber(
@@ -697,7 +746,7 @@ class LibEuFinBankService extends BankServiceBase 
implements BankServiceHandle {
     let accountInfoResp = await LibeufinSandboxApi.demobankAccountInfo(
       "admin",
       "secret",
-      { baseUrl: this.baseUrlAccessApi },
+      { baseUrl: this.bankAccessApiBaseUrl },
       accountName, // bank account label.
     );
     return {
@@ -793,7 +842,7 @@ export class FakebankService
 {
   proc: ProcessWrapper | undefined;
 
-  http = createPlatformHttpLib();
+  http = createPlatformHttpLib({ allowHttp: true, enableThrottling: false });
 
   // We store "created" accounts during setup and
   // register them after startup.
@@ -1282,7 +1331,9 @@ export class ExchangeService implements 
ExchangeServiceInterface {
       }
     }
 
-    logger.info("configuring bank accounts", accounts);
+    const accountsDescription = accounts.map((acc) => ` * ${acc}`).join("\n");
+    logger.info("configuring bank accounts:");
+    logger.info(accountsDescription);
 
     for (const acc of accounts) {
       await runCommand(
@@ -1494,7 +1545,7 @@ export class MerchantApiClient {
   ) {}
 
   // FIXME: Migrate everything to this in favor of axios
-  http = createPlatformHttpLib();
+  http = createPlatformHttpLib({ allowHttp: true, enableThrottling: false });
 
   async changeAuth(auth: MerchantAuthConfiguration): Promise<void> {
     const url = new URL("private/auth", this.baseUrl);
@@ -2052,6 +2103,7 @@ export async function runTestWithState(
   try {
     logger.info("running test in directory", gc.testDir);
     await Promise.race([testMain(gc), p.promise]);
+    logger.info("completed test in directory", gc.testDir);
     status = "pass";
     if (linger) {
       const rl = readline.createInterface({
@@ -2068,9 +2120,22 @@ export async function runTestWithState(
       rl.close();
     }
   } catch (e) {
-    console.error("FATAL: test failed with exception", e);
-    if (e instanceof TalerError) {
-      console.error(`error detail: ${j2s(e.errorDetail)}`);
+    if (e instanceof CommandError) {
+      console.error("FATAL: test failed for", e.logName);
+      const errorLog = fs.readFileSync(
+        path.join(gc.testDir, `${e.logName}-stderr.log`),
+      );
+      console.error(`${e.message}: "${e.command}"`);
+      console.error(errorLog.toString());
+      console.error(e);
+    } else if (e instanceof TalerError) {
+      console.error(
+        "FATAL: test failed",
+        e.message,
+        `error detail: ${j2s(e.errorDetail)}`,
+      );
+    } else {
+      console.error("FATAL: test failed with exception", e);
     }
     status = "fail";
   } finally {
@@ -2243,23 +2308,28 @@ export class WalletCli {
         const cryptoWorkerArg = cliOpts.cryptoWorkerType
           ? `--crypto-worker=${cliOpts.cryptoWorkerType}`
           : "";
-        const resp = await sh(
-          self.globalTestState,
-          `wallet-${self.name}`,
-          `taler-wallet-cli ${
-            self.timetravelArg ?? ""
-          } ${cryptoWorkerArg} --no-throttle -LTRACE --skip-defaults 
--wallet-db '${
-            self.dbfile
-          }' api '${op}' ${shellWrap(JSON.stringify(payload))}`,
-        );
+        const logName = `wallet-${self.name}`;
+        const command = `taler-wallet-cli ${
+          self.timetravelArg ?? ""
+        } ${cryptoWorkerArg} --allow-http --no-throttle -LTRACE 
--skip-defaults --wallet-db '${
+          self.dbfile
+        }' api '${op}' ${shellWrap(JSON.stringify(payload))}`;
+        const resp = await sh(self.globalTestState, logName, command);
         logger.info("--- wallet core response ---");
         logger.info(resp);
         logger.info("--- end of response ---");
-        let ar: any;
+        let ar: CoreApiResponse;
         try {
-          ar = JSON.parse(resp) as CoreApiResponse;
+          ar = JSON.parse(resp);
         } catch (e) {
-          throw new Error("wallet CLI did not return a proper JSON response");
+          throw new CommandError(
+            "wallet CLI did not return a proper JSON response",
+            logName,
+            command,
+            [],
+            {},
+            null,
+          );
         }
         if (ar.type === "error") {
           throw TalerError.fromUncheckedDetail(ar.error);
@@ -2295,6 +2365,7 @@ export class WalletCli {
       `wallet-${this.name}`,
       "taler-wallet-cli",
       [
+        "--allow-http",
         "--no-throttle",
         ...this.timetravelArgArr,
         "-LTRACE",
@@ -2313,6 +2384,7 @@ export class WalletCli {
       `wallet-${this.name}`,
       "taler-wallet-cli",
       [
+        "--allow-http",
         "--no-throttle",
         "--skip-defaults",
         "-LTRACE",
diff --git a/packages/taler-harness/src/harness/helpers.ts 
b/packages/taler-harness/src/harness/helpers.ts
index 516312ed8..b13fa9cf4 100644
--- a/packages/taler-harness/src/harness/helpers.ts
+++ b/packages/taler-harness/src/harness/helpers.ts
@@ -99,7 +99,7 @@ export interface EnvOptions {
 /**
  * Run a test case with a simple TESTKUDOS Taler environment, consisting
  * of one exchange, one bank and one merchant.
- * 
+ *
  * @deprecated use {@link createSimpleTestkudosEnvironmentV2} instead
  */
 export async function createSimpleTestkudosEnvironment(
@@ -557,7 +557,7 @@ export async function withdrawViaBankV2(
 
 /**
  * Withdraw balance.
- * 
+ *
  * @deprecated use {@link withdrawViaBankV2 instead}
  */
 export async function withdrawViaBank(
diff --git a/packages/taler-harness/src/harness/libeufin-apis.ts 
b/packages/taler-harness/src/harness/libeufin-apis.ts
index 4ef588fb5..cb9acdaa4 100644
--- a/packages/taler-harness/src/harness/libeufin-apis.ts
+++ b/packages/taler-harness/src/harness/libeufin-apis.ts
@@ -5,10 +5,9 @@
  * the services get actually started and managed.
  */
 
+import { URL } from "@gnu-taler/taler-util";
 import axiosImp from "axios";
 const axios = axiosImp.default;
-import { AmountString, Logger, URL } from "@gnu-taler/taler-util";
-import { createPlatformHttpLib } from "@gnu-taler/taler-util/http";
 
 export interface LibeufinSandboxServiceInterface {
   baseUrl: string;
diff --git a/packages/taler-harness/src/harness/libeufin.ts 
b/packages/taler-harness/src/harness/libeufin.ts
index 001fb613b..8fd276fad 100644
--- a/packages/taler-harness/src/harness/libeufin.ts
+++ b/packages/taler-harness/src/harness/libeufin.ts
@@ -899,6 +899,8 @@ export function findNexusPayment(
 ): LibeufinNexusMoneyMovement | void {
   let transactions = payments["transactions"];
   for (let i = 0; i < transactions.length; i++) {
+    //FIXME: last line won't compile with the current definition of the type
+    //@ts-ignore
     let batches = transactions[i]["camtData"]["batches"];
     for (let y = 0; y < batches.length; y++) {
       let movements = batches[y]["batchTransactions"];
diff --git a/packages/taler-harness/src/index.ts 
b/packages/taler-harness/src/index.ts
index 30b557986..bd58a7fd6 100644
--- a/packages/taler-harness/src/index.ts
+++ b/packages/taler-harness/src/index.ts
@@ -17,10 +17,6 @@
 /**
  * Imports.
  */
-import { deepStrictEqual } from "assert";
-import fs from "fs";
-import os from "os";
-import path from "path";
 import {
   addPaytoQueryParams,
   Amounts,
@@ -28,33 +24,34 @@ import {
   decodeCrock,
   j2s,
   Logger,
-  parsePaytoUri,
   rsaBlind,
   setGlobalLogLevelFromString,
 } from "@gnu-taler/taler-util";
+import { clk } from "@gnu-taler/taler-util/clk";
+import { createPlatformHttpLib } from "@gnu-taler/taler-util/http";
+import {
+  BankAccessApiClient,
+  CryptoDispatcher,
+  downloadExchangeInfo,
+  SynchronousCryptoWorkerFactoryPlain,
+  topupReserveWithDemobank,
+} from "@gnu-taler/taler-wallet-core";
+import { deepStrictEqual } from "assert";
+import fs from "fs";
+import os from "os";
+import path from "path";
 import { runBench1 } from "./bench1.js";
 import { runBench2 } from "./bench2.js";
 import { runBench3 } from "./bench3.js";
+import { runEnvFull } from "./env-full.js";
 import { runEnv1 } from "./env1.js";
 import {
   GlobalTestState,
   MerchantApiClient,
-  MerchantPrivateApi,
   runTestWithState,
 } from "./harness/harness.js";
 import { getTestInfo, runTests } from "./integrationtests/testrunner.js";
 import { lintExchangeDeployment } from "./lint.js";
-import { runEnvFull } from "./env-full.js";
-import { clk } from "@gnu-taler/taler-util/clk";
-import { createPlatformHttpLib } from "@gnu-taler/taler-util/http";
-import {
-  BankAccessApiClient,
-  checkReserve,
-  CryptoDispatcher,
-  downloadExchangeInfo,
-  SynchronousCryptoWorkerFactoryPlain,
-  topupReserveWithDemobank,
-} from "@gnu-taler/taler-wallet-core";
 
 const logger = new Logger("taler-harness:index.ts");
 
@@ -213,6 +210,7 @@ deploymentCli
       baseUrl: args.tipTopup.bankAccessUrl,
       username: args.tipTopup.bankAccount,
       password: args.tipTopup.bankPassword,
+      allowHttp: true,
     });
 
     const paytoUri = addPaytoQueryParams(tipReserveResp.payto_uri, {
@@ -495,6 +493,12 @@ testingCli
   .flag("experimental", ["--experimental"], {
     help: "Include tests marked as experimental",
   })
+  .flag("failFast", ["--fail-fast"], {
+    help: "Exit after the first error",
+  })
+  .flag("waitOnFail", ["--wait-on-fail"], {
+    help: "Exit after the first error",
+  })
   .flag("quiet", ["--quiet"], {
     help: "Produce less output.",
   })
@@ -504,6 +508,8 @@ testingCli
   .action(async (args) => {
     await runTests({
       includePattern: args.runIntegrationtests.pattern,
+      failFast: args.runIntegrationtests.failFast,
+      waitOnFail: args.runIntegrationtests.waitOnFail,
       suiteSpec: args.runIntegrationtests.suites,
       dryRun: args.runIntegrationtests.dryRun,
       verbosity: args.runIntegrationtests.quiet ? 0 : 1,
diff --git 
a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts 
b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts
index 561a10e6d..38cbd6925 100644
--- 
a/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts
+++ 
b/packages/taler-harness/src/integrationtests/test-age-restrictions-merchant.ts
@@ -166,6 +166,7 @@ export async function runAgeRestrictionsMerchantTest(t: 
GlobalTestState) {
       wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl,
       accountName: exchangeBankAccount.accountName,
       accountPassword: exchangeBankAccount.accountPassword,
+      allowHttp: true,
     });
 
     await wireGatewayApiClient.adminAddIncoming({
diff --git 
a/packages/taler-harness/src/integrationtests/test-age-restrictions-peer.ts 
b/packages/taler-harness/src/integrationtests/test-age-restrictions-peer.ts
index d129a5217..0bb811f39 100644
--- a/packages/taler-harness/src/integrationtests/test-age-restrictions-peer.ts
+++ b/packages/taler-harness/src/integrationtests/test-age-restrictions-peer.ts
@@ -18,9 +18,7 @@
  * Imports.
  */
 import { AbsoluteTime, Duration } from "@gnu-taler/taler-util";
-import {
-  WalletApiOperation,
-} from "@gnu-taler/taler-wallet-core";
+import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
 import { defaultCoinConfig } from "../harness/denomStructures.js";
 import { GlobalTestState, WalletCli } from "../harness/harness.js";
 import {
diff --git a/packages/taler-harness/src/integrationtests/test-bank-api.ts 
b/packages/taler-harness/src/integrationtests/test-bank-api.ts
index d97860a2c..5e3448625 100644
--- a/packages/taler-harness/src/integrationtests/test-bank-api.ts
+++ b/packages/taler-harness/src/integrationtests/test-bank-api.ts
@@ -126,6 +126,7 @@ export async function runBankApiTest(t: GlobalTestState) {
     wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl,
     accountName: exchangeBankAccount.accountName,
     accountPassword: exchangeBankAccount.accountPassword,
+    allowHttp: true,
   });
 
   await wireGatewayApiClient.adminAddIncoming({
diff --git 
a/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts 
b/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts
index 18a3c172a..6c0d070d0 100644
--- a/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts
+++ b/packages/taler-harness/src/integrationtests/test-exchange-deposit.ts
@@ -33,6 +33,7 @@ import {
   refreshCoin,
   SynchronousCryptoWorkerFactoryPlain,
   topupReserveWithDemobank,
+  Wallet,
   withdrawCoin,
 } from "@gnu-taler/taler-wallet-core";
 import { GlobalTestState } from "../harness/harness.js";
@@ -46,7 +47,10 @@ export async function runExchangeDepositTest(t: 
GlobalTestState) {
 
   const { bank, exchange } = await createSimpleTestkudosEnvironment(t);
 
-  const http = createPlatformHttpLib();
+  const http = createPlatformHttpLib({
+    allowHttp: true,
+    enableThrottling: false,
+  });
   const cryptiDisp = new CryptoDispatcher(
     new SynchronousCryptoWorkerFactoryPlain(),
   );
@@ -71,7 +75,9 @@ export async function runExchangeDepositTest(t: 
GlobalTestState) {
 
     await checkReserve(http, exchange.baseUrl, reserveKeyPair.pub);
 
-    const d1 = findDenomOrThrow(exchangeInfo, "TESTKUDOS:8");
+    const d1 = findDenomOrThrow(exchangeInfo, "TESTKUDOS:8", {
+      denomselAllowLate: Wallet.defaultConfig.testing.denomselAllowLate,
+    });
 
     const coin = await withdrawCoin({
       http,
diff --git 
a/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts 
b/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts
index 20285cb6a..7f94628a6 100644
--- a/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts
+++ b/packages/taler-harness/src/integrationtests/test-exchange-timetravel.ts
@@ -24,7 +24,10 @@ import {
   Duration,
   durationFromSpec,
 } from "@gnu-taler/taler-util";
-import { createPlatformHttpLib, readSuccessResponseJsonOrThrow } from 
"@gnu-taler/taler-util/http";
+import {
+  createPlatformHttpLib,
+  readSuccessResponseJsonOrThrow,
+} from "@gnu-taler/taler-util/http";
 import { makeNoFeeCoinConfig } from "../harness/denomStructures.js";
 import {
   BankService,
@@ -65,7 +68,10 @@ async function applyTimeTravel(
   }
 }
 
-const http = createPlatformHttpLib();
+const http = createPlatformHttpLib({
+  allowHttp: true,
+  enableThrottling: false,
+});
 
 /**
  * Basic time travel test.
diff --git a/packages/taler-harness/src/integrationtests/test-kyc.ts 
b/packages/taler-harness/src/integrationtests/test-kyc.ts
index b7ea0ff77..b86c8dd5b 100644
--- a/packages/taler-harness/src/integrationtests/test-kyc.ts
+++ b/packages/taler-harness/src/integrationtests/test-kyc.ts
@@ -340,7 +340,10 @@ export async function runKycTest(t: GlobalTestState) {
   // We now simulate the user interacting with the KYC service,
   // which would usually done in the browser.
 
-  const httpLib = createPlatformHttpLib();
+  const httpLib = createPlatformHttpLib({
+    allowHttp: true,
+    enableThrottling: false,
+  });
   const kycServerResp = await httpLib.get(kycNotif.kycUrl);
   const kycLoginResp = await kycServerResp.json();
   console.log("kyc server resp:", j2s(kycLoginResp));
diff --git 
a/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts
 
b/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts
index 2fafe7584..975ba707b 100644
--- 
a/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts
+++ 
b/packages/taler-harness/src/integrationtests/test-merchant-spec-public-orders.ts
@@ -39,7 +39,10 @@ import {
   withdrawViaBank,
 } from "../harness/helpers.js";
 
-const httpLib = createPlatformHttpLib();
+const httpLib = createPlatformHttpLib({
+  allowHttp: true,
+  enableThrottling: false,
+});
 
 interface Context {
   merchant: MerchantService;
diff --git a/packages/taler-harness/src/integrationtests/test-tipping.ts 
b/packages/taler-harness/src/integrationtests/test-tipping.ts
index 69afad6fd..b124fbf0d 100644
--- a/packages/taler-harness/src/integrationtests/test-tipping.ts
+++ b/packages/taler-harness/src/integrationtests/test-tipping.ts
@@ -61,6 +61,7 @@ export async function runTippingTest(t: GlobalTestState) {
     wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl,
     accountName: exchangeBankAccount.accountName,
     accountPassword: exchangeBankAccount.accountPassword,
+    allowHttp: true,
   });
 
   await wireGatewayApiClient.adminAddIncoming({
diff --git a/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts 
b/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts
index 37be9dcf8..c384a6e74 100644
--- a/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts
+++ b/packages/taler-harness/src/integrationtests/test-wallet-dbless.ts
@@ -33,6 +33,7 @@ import {
   refreshCoin,
   SynchronousCryptoWorkerFactoryPlain,
   topupReserveWithDemobank,
+  Wallet,
   withdrawCoin,
 } from "@gnu-taler/taler-wallet-core";
 import { GlobalTestState } from "../harness/harness.js";
@@ -46,7 +47,10 @@ export async function runWalletDblessTest(t: 
GlobalTestState) {
 
   const { bank, exchange } = await createSimpleTestkudosEnvironment(t);
 
-  const http = createPlatformHttpLib();
+  const http = createPlatformHttpLib({
+    allowHttp: true,
+    enableThrottling: false,
+  });
   const cryptiDisp = new CryptoDispatcher(
     new SynchronousCryptoWorkerFactoryPlain(),
   );
@@ -84,7 +88,9 @@ export async function runWalletDblessTest(t: GlobalTestState) 
{
 
     await checkReserve(http, exchange.baseUrl, reserveKeyPair.pub);
 
-    const d1 = findDenomOrThrow(exchangeInfo, "TESTKUDOS:8");
+    const d1 = findDenomOrThrow(exchangeInfo, "TESTKUDOS:8", {
+      denomselAllowLate: Wallet.defaultConfig.testing.denomselAllowLate,
+    });
 
     const coin = await withdrawCoin({
       http,
@@ -125,8 +131,12 @@ export async function runWalletDblessTest(t: 
GlobalTestState) {
     });
 
     const refreshDenoms = [
-      findDenomOrThrow(exchangeInfo, "TESTKUDOS:1"),
-      findDenomOrThrow(exchangeInfo, "TESTKUDOS:1"),
+      findDenomOrThrow(exchangeInfo, "TESTKUDOS:1", {
+        denomselAllowLate: Wallet.defaultConfig.testing.denomselAllowLate,
+      }),
+      findDenomOrThrow(exchangeInfo, "TESTKUDOS:1", {
+        denomselAllowLate: Wallet.defaultConfig.testing.denomselAllowLate,
+      }),
     ];
 
     await refreshCoin({
diff --git 
a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts 
b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
index 4a79d2c21..a356a5c1a 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
@@ -73,6 +73,7 @@ export async function runWithdrawalManualTest(t: 
GlobalTestState) {
     wireGatewayApiBaseUrl: exchangeBankAccount.wireGatewayApiBaseUrl,
     accountName: exchangeBankAccount.accountName,
     accountPassword: exchangeBankAccount.accountPassword,
+    allowHttp: true,
   });
 
   await wireGatewayApiClient.adminAddIncoming({
diff --git a/packages/taler-harness/src/integrationtests/testrunner.ts 
b/packages/taler-harness/src/integrationtests/testrunner.ts
index f845f4e99..c76ce1b18 100644
--- a/packages/taler-harness/src/integrationtests/testrunner.ts
+++ b/packages/taler-harness/src/integrationtests/testrunner.ts
@@ -14,7 +14,7 @@
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
-import { CancellationToken, minimatch } from "@gnu-taler/taler-util";
+import { CancellationToken, Logger, minimatch } from "@gnu-taler/taler-util";
 import * as child_process from "child_process";
 import * as fs from "fs";
 import * as os from "os";
@@ -105,6 +105,7 @@ import { runExchangeDepositTest } from 
"./test-exchange-deposit.js";
 /**
  * Test runner.
  */
+const logger = new Logger("testrunner.ts");
 
 /**
  * Spec for one test.
@@ -199,6 +200,8 @@ export interface TestRunSpec {
   includePattern?: string;
   suiteSpec?: string;
   dryRun?: boolean;
+  failFast?: boolean;
+  waitOnFail?: boolean;
   includeExperimental: boolean;
   noTimeout: boolean;
   verbosity: number;
@@ -357,7 +360,7 @@ export async function runTests(spec: TestRunSpec) {
           if (token.isCancelled) {
             return;
           }
-          console.log(`process exited code=${code} signal=${signal}`);
+          logger.info(`process exited code=${code} signal=${signal}`);
           if (signal) {
             reject(new Error(`test worker exited with signal ${signal}`));
           } else if (code != 0) {
@@ -385,6 +388,10 @@ export async function runTests(spec: TestRunSpec) {
 
     try {
       result = await token.racePromise(resultPromise);
+      if (result.status === "fail" && spec.failFast) {
+        logger.error("test failed and failing fast, exit!");
+        throw Error("exit on fail fast");
+      }
     } catch (e: any) {
       console.error(`test ${testName} timed out`);
       if (token.isCancelled) {
@@ -469,10 +476,9 @@ if (runTestInstrStr && 
process.argv.includes("__TWCLI_TESTWORKER")) {
   const { testRootDir, testName } = JSON.parse(
     runTestInstrStr,
   ) as RunTestChildInstruction;
-  console.log(`running test ${testName} in worker process`);
 
   process.on("disconnect", () => {
-    console.log("got disconnect from parent");
+    logger.trace("got disconnect from parent");
     process.exit(3);
   });
 
@@ -486,35 +492,36 @@ if (runTestInstrStr && 
process.argv.includes("__TWCLI_TESTWORKER")) {
     }
 
     if (!process.send) {
-      console.error("can't communicate with parent");
+      logger.error("can't communicate with parent");
       process.exit(2);
     }
 
     if (!testMain) {
-      console.log(`test ${testName} not found`);
+      logger.info(`test ${testName} not found`);
       process.exit(2);
     }
 
     const testDir = path.join(testRootDir, testName);
-    console.log(`running test ${testName}`);
+    logger.info(`running test ${testName}`);
     const gc = new GlobalTestState({
       testDir,
     });
     const testResult = await runTestWithState(gc, testMain, testName);
+    logger.info(`done test ${testName}: ${testResult.status}`);
     process.send(testResult);
   };
 
   runTest()
     .then(() => {
-      console.log(`test ${testName} finished in worker`);
+      logger.trace(`test ${testName} finished in worker`);
       if (shouldLingerInTest()) {
-        console.log("lingering ...");
+        logger.trace("lingering ...");
         return;
       }
       process.exit(0);
     })
     .catch((e) => {
-      console.log(e);
+      logger.error(e);
       process.exit(1);
     });
 }
diff --git a/packages/taler-harness/src/lint.ts 
b/packages/taler-harness/src/lint.ts
index 3d3805e79..715227c7f 100644
--- a/packages/taler-harness/src/lint.ts
+++ b/packages/taler-harness/src/lint.ts
@@ -53,7 +53,10 @@ interface PubkeyConf {
   masterPublicKey: string;
 }
 
-const httpLib = createPlatformHttpLib();
+const httpLib = createPlatformHttpLib({
+  enableThrottling: false,
+  allowHttp: true,
+});
 
 interface ShellResult {
   stdout: string;
diff --git a/packages/taler-util/package.json b/packages/taler-util/package.json
index e7df2889f..26ca9b6b3 100644
--- a/packages/taler-util/package.json
+++ b/packages/taler-util/package.json
@@ -74,7 +74,7 @@
   },
   "ava": {
     "files": [
-      "lib/*test.js"
+      "lib/**/*test.js"
     ]
-  }
+}
 }
diff --git a/packages/taler-util/src/http-common.ts 
b/packages/taler-util/src/http-common.ts
index 9aaad12c7..8da4003b5 100644
--- a/packages/taler-util/src/http-common.ts
+++ b/packages/taler-util/src/http-common.ts
@@ -423,6 +423,7 @@ export function getExpiry(
 
 export interface HttpLibArgs {
   enableThrottling?: boolean;
+  allowHttp?: boolean;
 }
 
 export function encodeBody(body: any): ArrayBuffer {
diff --git a/packages/taler-util/src/http-impl.node.ts 
b/packages/taler-util/src/http-impl.node.ts
index 6dfce934f..4df1feaf0 100644
--- a/packages/taler-util/src/http-impl.node.ts
+++ b/packages/taler-util/src/http-impl.node.ts
@@ -49,9 +49,11 @@ const textDecoder = new TextDecoder();
 export class HttpLibImpl implements HttpRequestLibrary {
   private throttle = new RequestThrottler();
   private throttlingEnabled = true;
+  private allowHttp = false;
 
   constructor(args?: HttpLibArgs) {
     this.throttlingEnabled = args?.enableThrottling ?? false;
+    this.allowHttp = args?.allowHttp ?? false;
   }
 
   /**
@@ -78,6 +80,16 @@ export class HttpLibImpl implements HttpRequestLibrary {
         `request to origin ${parsedUrl.origin} was throttled`,
       );
     }
+    if (!this.allowHttp && parsedUrl.protocol !== "https:") {
+      throw TalerError.fromDetail(
+        TalerErrorCode.WALLET_NETWORK_ERROR,
+        {
+          requestMethod: method,
+          requestUrl: url,
+        },
+        `request to ${parsedUrl.origin} is not possible with protocol 
${parsedUrl.protocol}`,
+      );
+    }
     let timeoutMs: number | undefined;
     if (typeof opt?.timeout?.d_ms === "number") {
       timeoutMs = opt.timeout.d_ms;
diff --git a/packages/taler-util/src/http-impl.qtart.ts 
b/packages/taler-util/src/http-impl.qtart.ts
index ee3d1f725..3a963b35a 100644
--- a/packages/taler-util/src/http-impl.qtart.ts
+++ b/packages/taler-util/src/http-impl.qtart.ts
@@ -41,9 +41,11 @@ const textDecoder = new TextDecoder();
 export class HttpLibImpl implements HttpRequestLibrary {
   private throttle = new RequestThrottler();
   private throttlingEnabled = true;
+  private allowHttp = false;
 
   constructor(args?: HttpLibArgs) {
     this.throttlingEnabled = args?.enableThrottling ?? false;
+    this.allowHttp = args?.allowHttp ?? false;
   }
 
   /**
@@ -70,6 +72,16 @@ export class HttpLibImpl implements HttpRequestLibrary {
         `request to origin ${parsedUrl.origin} was throttled`,
       );
     }
+    if (!this.allowHttp && parsedUrl.protocol !== "https") {
+      throw TalerError.fromDetail(
+        TalerErrorCode.WALLET_NETWORK_ERROR,
+        {
+          requestMethod: method,
+          requestUrl: url,
+        },
+        `request to ${parsedUrl.origin} is not possible with protocol 
${parsedUrl.protocol}`,
+      );
+    }
 
     let data: ArrayBuffer | undefined = undefined;
     const requestHeadersMap = { ...getDefaultHeaders(method), ...opt?.headers 
};
diff --git a/packages/taler-wallet-cli/src/index.ts 
b/packages/taler-wallet-cli/src/index.ts
index a31aec2eb..0f378f360 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -190,6 +190,9 @@ export const walletCli = clk
   .flag("noThrottle", ["--no-throttle"], {
     help: "Don't do any request throttling.",
   })
+  .flag("allowHttp", ["--allow-http"], {
+    help: "Allow unsafe http connections.",
+  })
   .flag("version", ["-v", "--version"], {
     onPresentHandler: printVersion,
   })
@@ -240,6 +243,7 @@ async function createLocalWallet(
   const dbPath = walletCliArgs.wallet.walletDbFile ?? defaultWalletDbPath;
   const myHttpLib = createPlatformHttpLib({
     enableThrottling: walletCliArgs.wallet.noThrottle ? false : true,
+    allowHttp: walletCliArgs.wallet.allowHttp ? true : false,
   });
   const wallet = await createNativeWalletHost({
     persistentStoragePath: dbPath !== ":memory:" ? dbPath : undefined,
@@ -1269,6 +1273,7 @@ advancedCli
   .action(async (args) => {
     const myHttpLib = createPlatformHttpLib({
       enableThrottling: false,
+      allowHttp: true,
     });
     const res = await createNativeWalletHost2({
       // No persistent DB storage.
diff --git a/packages/taler-wallet-core/src/bank-api-client.ts 
b/packages/taler-wallet-core/src/bank-api-client.ts
index 94ca2271b..677581e22 100644
--- a/packages/taler-wallet-core/src/bank-api-client.ts
+++ b/packages/taler-wallet-core/src/bank-api-client.ts
@@ -257,6 +257,8 @@ export interface BankAccessApiClientArgs {
   baseUrl: string;
   username: string;
   password: string;
+  enableThrottling?: boolean;
+  allowHttp?: boolean;
 }
 
 export interface BankAccessApiCreateTransactionRequest {
@@ -268,22 +270,30 @@ export class WireGatewayApiClientArgs {
   accountName: string;
   accountPassword: string;
   wireGatewayApiBaseUrl: string;
+  enableThrottling?: boolean;
+  allowHttp?: boolean;
 }
 
+/**
+ * This API look like it belongs to harness
+ * but it will be nice to have in utils to be used by others
+ */
 export class WireGatewayApiClient {
-  httpLib = createPlatformHttpLib();
+  httpLib;
 
-  constructor(private args: WireGatewayApiClientArgs) {}
+  constructor(private args: WireGatewayApiClientArgs) {
+    this.httpLib = createPlatformHttpLib({
+      enableThrottling: !!args.enableThrottling,
+      allowHttp: !!args.allowHttp,
+    });
+  }
 
   async adminAddIncoming(params: {
     amount: string;
     reservePub: string;
     debitAccountPayto: string;
   }): Promise<void> {
-    let url = new URL(
-      `admin/add-incoming`,
-      this.args.wireGatewayApiBaseUrl,
-    );
+    let url = new URL(`admin/add-incoming`, this.args.wireGatewayApiBaseUrl);
     const resp = await this.httpLib.fetch(url.href, {
       method: "POST",
       body: {
@@ -303,10 +313,19 @@ export class WireGatewayApiClient {
   }
 }
 
+/**
+ * This API look like it belongs to harness
+ * but it will be nice to have in utils to be used by others
+ */
 export class BankAccessApiClient {
-  httpLib = createPlatformHttpLib();
+  httpLib;
 
-  constructor(private args: BankAccessApiClientArgs) {}
+  constructor(private args: BankAccessApiClientArgs) {
+    this.httpLib = createPlatformHttpLib({
+      enableThrottling: !!args.enableThrottling,
+      allowHttp: !!args.allowHttp,
+    });
+  }
 
   async getTransactions(): Promise<void> {
     const reqUrl = new URL(
diff --git a/packages/taler-wallet-core/src/host-impl.node.ts 
b/packages/taler-wallet-core/src/host-impl.node.ts
index bf5c14f99..150bba49a 100644
--- a/packages/taler-wallet-core/src/host-impl.node.ts
+++ b/packages/taler-wallet-core/src/host-impl.node.ts
@@ -104,6 +104,7 @@ export async function createNativeWalletHost2(
   } else {
     myHttpLib = createPlatformHttpLib({
       enableThrottling: true,
+      allowHttp: args.config?.features?.allowHttp,
     });
   }
 
diff --git a/packages/taler-wallet-core/src/host-impl.qtart.ts 
b/packages/taler-wallet-core/src/host-impl.qtart.ts
index db7a1fa5c..d10914b10 100644
--- a/packages/taler-wallet-core/src/host-impl.qtart.ts
+++ b/packages/taler-wallet-core/src/host-impl.qtart.ts
@@ -89,7 +89,10 @@ export async function createNativeWalletHost2(
   if (args.httpLib) {
     myHttpLib = args.httpLib;
   } else {
-    myHttpLib = createPlatformHttpLib();
+    myHttpLib = createPlatformHttpLib({
+      enableThrottling: true,
+      allowHttp: args.config?.features?.allowHttp,
+    });
   }
 
   const myVersionChange = (): Promise<void> => {
diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts 
b/packages/taler-wallet-core/src/wallet-api-types.ts
index e85c6ffc3..9ddf82319 100644
--- a/packages/taler-wallet-core/src/wallet-api-types.ts
+++ b/packages/taler-wallet-core/src/wallet-api-types.ts
@@ -247,6 +247,7 @@ export interface WalletConfig {
     denomselAllowLate: boolean;
     devModeActive: boolean;
     insecureTrustExchange: boolean;
+    preventThrottling: boolean;
   };
 
   /**
diff --git a/packages/taler-wallet-core/src/wallet.ts 
b/packages/taler-wallet-core/src/wallet.ts
index 435a4e241..ab9f43004 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -1564,7 +1564,7 @@ export class Wallet {
       http,
       timer,
       cryptoWorkerFactory,
-      config ?? {},
+      Wallet.getEffectiveConfig(config),
     );
   }
 
@@ -1587,8 +1587,34 @@ export class Wallet {
     return w;
   }
 
-  static getDefaultConfig(): Readonly<WalletConfig> {
-    return InternalWalletStateImpl.defaultConfig;
+  public static defaultConfig: Readonly<WalletConfig> = {
+    builtin: {
+      exchanges: ["https://exchange.demo.taler.net/";],
+      auditors: [
+        {
+          currency: "KUDOS",
+          auditorPub: "BW9DC48PHQY4NH011SHHX36DZZ3Q22Y6X7FZ1VD1CMZ2PTFZ6PN0",
+          auditorBaseUrl: "https://auditor.demo.taler.net/";,
+          uids: ["5P25XF8TVQP9AW6VYGY2KV47WT5Y3ZXFSJAA570GJPX5SVJXKBVG"],
+        },
+      ],
+    },
+    features: {
+      batchWithdrawal: false,
+      allowHttp: false,
+    },
+    testing: {
+      preventThrottling: false,
+      devModeActive: false,
+      insecureTrustExchange: false,
+      denomselAllowLate: false,
+    },
+  };
+
+  static getEffectiveConfig(
+    param?: WalletConfigParameter,
+  ): Readonly<WalletConfig> {
+    return deepMerge(Wallet.defaultConfig, param ?? {});
   }
 
   addNotificationListener(f: (n: WalletNotification) => void): void {
@@ -1674,29 +1700,6 @@ class InternalWalletStateImpl implements 
InternalWalletState {
 
   config: Readonly<WalletConfig>;
 
-  public static defaultConfig: Readonly<WalletConfig> = {
-    builtin: {
-      exchanges: ["https://exchange.demo.taler.net/";],
-      auditors: [
-        {
-          currency: "KUDOS",
-          auditorPub: "BW9DC48PHQY4NH011SHHX36DZZ3Q22Y6X7FZ1VD1CMZ2PTFZ6PN0",
-          auditorBaseUrl: "https://auditor.demo.taler.net/";,
-          uids: ["5P25XF8TVQP9AW6VYGY2KV47WT5Y3ZXFSJAA570GJPX5SVJXKBVG"],
-        },
-      ],
-    },
-    features: {
-      batchWithdrawal: false,
-      allowHttp: false,
-    },
-    testing: {
-      devModeActive: false,
-      insecureTrustExchange: false,
-      denomselAllowLate: false,
-    },
-  };
-
   constructor(
     // FIXME: Make this a getter and make
     // the actual value nullable.
@@ -1706,12 +1709,12 @@ class InternalWalletStateImpl implements 
InternalWalletState {
     public http: HttpRequestLibrary,
     public timer: TimerAPI,
     cryptoWorkerFactory: CryptoWorkerFactory,
-    config: WalletConfigParameter,
+    configParam: WalletConfig,
   ) {
     this.cryptoDispatcher = new CryptoDispatcher(cryptoWorkerFactory);
     this.cryptoApi = this.cryptoDispatcher.cryptoApi;
     this.timerGroup = new TimerGroup(timer);
-    this.config = deepMerge(InternalWalletStateImpl.defaultConfig, config);
+    this.config = configParam;
     if (this.config.testing.devModeActive) {
       this.http = new DevExperimentHttpLib(this.http);
     }
@@ -1823,7 +1826,7 @@ class InternalWalletStateImpl implements 
InternalWalletState {
  * @param override
  * @returns
  */
-function deepMerge<T extends object>(full: T, override: any): T {
+function deepMerge<T extends object>(full: T, override: object): T {
   const keys = Object.keys(full);
   const result = { ...full };
   for (const k of keys) {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]