taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 2512665e9462690162a5bae5fab3337217943269
parent 51cf4180827f4560df954744f724f0bfc5d29a20
Author: Florian Dold <florian@dold.me>
Date:   Mon, 23 Oct 2023 18:15:41 +0200

move useNativeLogging to top-level

Diffstat:
Mpackages/taler-wallet-core/src/host-impl.qtart.ts | 4----
Mpackages/taler-wallet-core/src/wallet-api-types.ts | 1-
Mpackages/taler-wallet-core/src/wallet.ts | 1-
Mpackages/taler-wallet-embedded/src/wallet-qjs.ts | 7++++++-
Mpackages/taler-wallet-webextension/src/platform/api.ts | 1-
5 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/packages/taler-wallet-core/src/host-impl.qtart.ts b/packages/taler-wallet-core/src/host-impl.qtart.ts @@ -167,10 +167,6 @@ export async function createNativeWalletHost2( let dbResp: MakeDbResult; - if (args.config?.features?.useNativeLogging) { - enableNativeLogging(); - } - if ( args.persistentStoragePath && args.persistentStoragePath.endsWith(".json") diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts b/packages/taler-wallet-core/src/wallet-api-types.ts @@ -293,7 +293,6 @@ export interface WalletConfig { */ features: { allowHttp: boolean; - useNativeLogging: boolean; }; } diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts @@ -1744,7 +1744,6 @@ export class Wallet { }, features: { allowHttp: false, - useNativeLogging: false, }, testing: { preventThrottling: false, diff --git a/packages/taler-wallet-embedded/src/wallet-qjs.ts b/packages/taler-wallet-embedded/src/wallet-qjs.ts @@ -15,7 +15,7 @@ */ /** - * Entry-point for the wallet under qtart, the QuckJS-based GNU Taler runtime. + * Entry-point for the wallet under qtart, the QuickJS-based GNU Taler runtime. */ /** @@ -34,6 +34,7 @@ import { CoreApiMessageEnvelope, CoreApiResponse, CoreApiResponseSuccess, + enableNativeLogging, getErrorDetailFromException, j2s, Logger, @@ -123,6 +124,10 @@ class NativeWalletMessageHandler { if (logLevel) { setGlobalLogLevelFromString(logLevel); } + const nativeLogging = args.useNativeLogging ?? false; + if (nativeLogging) { + enableNativeLogging(); + } await reinit(); return wrapSuccessResponse({ ...initResponse, diff --git a/packages/taler-wallet-webextension/src/platform/api.ts b/packages/taler-wallet-webextension/src/platform/api.ts @@ -119,7 +119,6 @@ export const defaultSettings: Settings = { showJsonOnError: false, extendedAccountTypes: false, walletAllowHttp: false, - walletUseNativeLogging: false, }; /**