aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/taler-wallet-core/src/crypto/workers/nodeThreadWorker.ts12
-rw-r--r--packages/taler-wallet-core/src/wallet.ts2
2 files changed, 9 insertions, 5 deletions
diff --git a/packages/taler-wallet-core/src/crypto/workers/nodeThreadWorker.ts b/packages/taler-wallet-core/src/crypto/workers/nodeThreadWorker.ts
index 90016ab42..3f7f9e170 100644
--- a/packages/taler-wallet-core/src/crypto/workers/nodeThreadWorker.ts
+++ b/packages/taler-wallet-core/src/crypto/workers/nodeThreadWorker.ts
@@ -28,11 +28,15 @@ const logger = new Logger("nodeThreadWorker.ts");
const f = __filename;
const workerCode = `
- // Try loading the glue library for Android
+ // Try loading the glue library for embedded
try {
require("akono");
} catch (e) {
- // Probably we're not on Android ...
+ try {
+ require("iono");
+ } catch (e2) {
+ // Probably we're not on embedded ...
+ }
}
const worker_threads = require('worker_threads');
const parentPort = worker_threads.parentPort;
@@ -44,9 +48,9 @@ const workerCode = `
}
if (!tw) {
try {
- tw = require("@gnu-taler/taler-wallet-android");
+ tw = require("@gnu-taler/taler-wallet-embedded");
} catch (e) {
- console.warn("could not load taler-wallet-android either");
+ console.warn("could not load taler-wallet-embedded either");
throw e;
}
}
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts
index e6d541e9d..3c3da3cea 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -637,7 +637,7 @@ async function dispatchRequestInternal(
operation: string,
payload: unknown,
): Promise<Record<string, any>> {
- if (ws.initCalled && operation !== "initWallet") {
+ if (!ws.initCalled && operation !== "initWallet") {
throw Error(
`wallet must be initialized before running operation ${operation}`,
);