summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/headless/helpers.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-06-15 18:52:43 +0200
committerFlorian Dold <florian@dold.me>2021-06-15 18:52:43 +0200
commitd41ae5eb97a5264b1d61321354eac049ca317c97 (patch)
treea8e78bee0ff2a92f0b3f1cb9230442186dd17358 /packages/taler-wallet-core/src/headless/helpers.ts
parent4b16d7bd342dbb5376fd2cef08b14ebabbe4ed10 (diff)
downloadwallet-core-d41ae5eb97a5264b1d61321354eac049ca317c97.tar.gz
wallet-core-d41ae5eb97a5264b1d61321354eac049ca317c97.tar.bz2
wallet-core-d41ae5eb97a5264b1d61321354eac049ca317c97.zip
separate wallet state from wallet client
Diffstat (limited to 'packages/taler-wallet-core/src/headless/helpers.ts')
-rw-r--r--packages/taler-wallet-core/src/headless/helpers.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/headless/helpers.ts b/packages/taler-wallet-core/src/headless/helpers.ts
index 7b918d5d9..8125ef6b0 100644
--- a/packages/taler-wallet-core/src/headless/helpers.ts
+++ b/packages/taler-wallet-core/src/headless/helpers.ts
@@ -22,7 +22,6 @@
/**
* Imports.
*/
-import { Wallet } from "../wallet";
import {
MemoryBackend,
BridgeIDBFactory,
@@ -36,6 +35,7 @@ import { Logger } from "@gnu-taler/taler-util";
import { SynchronousCryptoWorkerFactory } from "../crypto/workers/synchronousWorker";
import type { IDBFactory } from "@gnu-taler/idb-bridge";
import { WalletNotification } from "@gnu-taler/taler-util";
+import { InternalWalletState } from "../operations/state.js";
const logger = new Logger("headless/helpers.ts");
@@ -93,7 +93,7 @@ function makeId(length: number): string {
*/
export async function getDefaultNodeWallet(
args: DefaultNodeWalletArgs = {},
-): Promise<Wallet> {
+): Promise<InternalWalletState> {
BridgeIDBFactory.enableTracing = false;
const myBackend = new MemoryBackend();
myBackend.enableTracing = false;
@@ -172,7 +172,8 @@ export async function getDefaultNodeWallet(
workerFactory = new SynchronousCryptoWorkerFactory();
}
- const w = new Wallet(myDb, myHttpLib, workerFactory);
+ const w = new InternalWalletState(myDb, myHttpLib, workerFactory);
+
if (args.notifyHandler) {
w.addNotificationListener(args.notifyHandler);
}