diff options
author | Iván Ávalos <avalos@disroot.org> | 2024-03-27 13:55:42 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2024-03-27 13:55:42 -0600 |
commit | 494afdab78b2b443251bb1b07ca13773882a9377 (patch) | |
tree | 41349cb0dd617c2c33287d5fe82e2bd439fb3a6c /packages/taler-wallet-embedded/src/wallet-qjs.ts | |
parent | d13d465c4bdcd2462c916676ac9247fd241dbd9c (diff) | |
download | wallet-core-494afdab78b2b443251bb1b07ca13773882a9377.tar.xz |
embedded: make wallet config settable from qtart
Diffstat (limited to 'packages/taler-wallet-embedded/src/wallet-qjs.ts')
-rw-r--r-- | packages/taler-wallet-embedded/src/wallet-qjs.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/taler-wallet-embedded/src/wallet-qjs.ts b/packages/taler-wallet-embedded/src/wallet-qjs.ts index 384dd3a2a..8502c779a 100644 --- a/packages/taler-wallet-embedded/src/wallet-qjs.ts +++ b/packages/taler-wallet-embedded/src/wallet-qjs.ts @@ -35,6 +35,7 @@ import { CoreApiResponse, CoreApiResponseSuccess, Logger, + PartialWalletRunConfig, WalletNotification, enableNativeLogging, getErrorDetailFromException, @@ -68,6 +69,7 @@ function sendNativeMessage(ev: CoreApiMessageEnvelope): void { class NativeWalletMessageHandler { walletArgs: DefaultNodeWalletArgs | undefined; + walletConfig: PartialWalletRunConfig | undefined; maybeWallet: Wallet | undefined; wp = openPromise<Wallet>(); httpLib = createPlatformHttpLib(); @@ -99,7 +101,9 @@ class NativeWalletMessageHandler { const resp = await w.handleCoreApiRequest( "initWallet", "native-init", - {}, + { + config: this.walletConfig + }, ); initResponse = resp.type == "response" ? resp.result : resp.error; w.runTaskLoop().catch((e) => { @@ -121,6 +125,7 @@ class NativeWalletMessageHandler { cryptoWorkerType: args.cryptoWorkerType, ...args, }; + this.walletConfig = args.config ?? {}; const logLevel = args.logLevel; if (logLevel) { setGlobalLogLevelFromString(logLevel); |