diff options
author | Florian Dold <florian@dold.me> | 2021-06-17 21:06:45 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-06-17 21:06:54 +0200 |
commit | 99550b001178965cae6d5e204783f8d2fd0adc1f (patch) | |
tree | 12eef418c6712b51297df2b62b956b91344098cb /packages/taler-wallet-core/src/headless | |
parent | 954ed23911cf7e5d4dae30d56a74358bf571342b (diff) | |
download | wallet-core-99550b001178965cae6d5e204783f8d2fd0adc1f.tar.xz |
hide internal wallet state, keep it internal to package
Diffstat (limited to 'packages/taler-wallet-core/src/headless')
-rw-r--r-- | packages/taler-wallet-core/src/headless/helpers.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/headless/helpers.ts b/packages/taler-wallet-core/src/headless/helpers.ts index a0053fc0f..cb788e2bd 100644 --- a/packages/taler-wallet-core/src/headless/helpers.ts +++ b/packages/taler-wallet-core/src/headless/helpers.ts @@ -36,6 +36,7 @@ import { SynchronousCryptoWorkerFactory } from "../crypto/workers/synchronousWor import type { IDBFactory } from "@gnu-taler/idb-bridge"; import { WalletNotification } from "@gnu-taler/taler-util"; import { InternalWalletState } from "../common.js"; +import { Wallet } from "../wallet.js"; const logger = new Logger("headless/helpers.ts"); @@ -93,7 +94,7 @@ function makeId(length: number): string { */ export async function getDefaultNodeWallet( args: DefaultNodeWalletArgs = {}, -): Promise<InternalWalletState> { +): Promise<Wallet> { BridgeIDBFactory.enableTracing = false; const myBackend = new MemoryBackend(); myBackend.enableTracing = false; @@ -172,7 +173,7 @@ export async function getDefaultNodeWallet( workerFactory = new SynchronousCryptoWorkerFactory(); } - const w = new InternalWalletState(myDb, myHttpLib, workerFactory); + const w = await Wallet.create(myDb, myHttpLib, workerFactory); if (args.notifyHandler) { w.addNotificationListener(args.notifyHandler); |