[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: embedded wallet: pass argumen
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: embedded wallet: pass arguments to wallet initialization |
Date: |
Mon, 23 Oct 2023 16:27:35 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 9515979bb embedded wallet: pass arguments to wallet initialization
9515979bb is described below
commit 9515979bb6351ed6325541d1dfa4375463ae9428
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Oct 23 16:27:32 2023 +0200
embedded wallet: pass arguments to wallet initialization
---
packages/taler-wallet-embedded/src/wallet-qjs.ts | 33 +++++++++++-------------
1 file changed, 15 insertions(+), 18 deletions(-)
diff --git a/packages/taler-wallet-embedded/src/wallet-qjs.ts
b/packages/taler-wallet-embedded/src/wallet-qjs.ts
index fff86aeb2..066062f23 100644
--- a/packages/taler-wallet-embedded/src/wallet-qjs.ts
+++ b/packages/taler-wallet-embedded/src/wallet-qjs.ts
@@ -21,13 +21,20 @@
/**
* Imports.
*/
+import {
+ discoverPolicies,
+ getBackupStartState,
+ getRecoveryStartState,
+ mergeDiscoveryAggregate,
+ reduceAction,
+} from "@gnu-taler/anastasis-core";
+import { userIdentifierDerive } from "@gnu-taler/anastasis-core/lib/crypto.js";
import {
AmountString,
CoreApiMessageEnvelope,
CoreApiResponse,
CoreApiResponseSuccess,
getErrorDetailFromException,
- InitRequest,
j2s,
Logger,
setGlobalLogLevelFromString,
@@ -42,14 +49,6 @@ import {
Wallet,
WalletApiOperation,
} from "@gnu-taler/taler-wallet-core";
-import {
- reduceAction,
- getBackupStartState,
- getRecoveryStartState,
- discoverPolicies,
- mergeDiscoveryAggregate,
-} from "@gnu-taler/anastasis-core";
-import { userIdentifierDerive } from "@gnu-taler/anastasis-core/lib/crypto.js";
setGlobalLogLevelFromString("trace");
@@ -67,7 +66,6 @@ function sendNativeMessage(ev: CoreApiMessageEnvelope): void {
class NativeWalletMessageHandler {
walletArgs: DefaultNodeWalletArgs | undefined;
- initRequest: InitRequest = {};
maybeWallet: Wallet | undefined;
wp = openPromise<Wallet>();
httpLib = createPlatformHttpLib();
@@ -96,9 +94,11 @@ class NativeWalletMessageHandler {
const wR = await createNativeWalletHost2(this.walletArgs);
const w = wR.wallet;
this.maybeWallet = w;
- const resp = await w.handleCoreApiRequest("initWallet", "native-init", {
- ...this.initRequest,
- });
+ const resp = await w.handleCoreApiRequest(
+ "initWallet",
+ "native-init",
+ {},
+ );
initResponse = resp.type == "response" ? resp.result : resp.error;
w.runTaskLoop().catch((e) => {
logger.error(
@@ -110,9 +110,6 @@ class NativeWalletMessageHandler {
switch (operation) {
case "init": {
- this.initRequest = {
- ...args,
- };
this.walletArgs = {
notifyHandler: async (notification: WalletNotification) => {
sendNativeMessage({ type: "notification", payload: notification });
@@ -120,6 +117,7 @@ class NativeWalletMessageHandler {
persistentStoragePath: args.persistentStoragePath,
httpLib: this.httpLib,
cryptoWorkerType: args.cryptoWorkerType,
+ ...args,
};
const logLevel = args.logLevel;
if (logLevel) {
@@ -279,8 +277,7 @@ export async function testWithGv() {
await w.wallet.client.call(WalletApiOperation.RunIntegrationTest, {
amountToSpend: "KUDOS:1" as AmountString,
amountToWithdraw: "KUDOS:3" as AmountString,
- corebankApiBaseUrl:
- "https://bank.demo.taler.net/",
+ corebankApiBaseUrl: "https://bank.demo.taler.net/",
exchangeBaseUrl: "https://exchange.demo.taler.net/",
merchantBaseUrl: "https://backend.demo.taler.net/",
});
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: embedded wallet: pass arguments to wallet initialization,
gnunet <=