aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/headless/helpers.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-06-17 21:06:45 +0200
committerFlorian Dold <florian@dold.me>2021-06-17 21:06:54 +0200
commit99550b001178965cae6d5e204783f8d2fd0adc1f (patch)
tree12eef418c6712b51297df2b62b956b91344098cb /packages/taler-wallet-core/src/headless/helpers.ts
parent954ed23911cf7e5d4dae30d56a74358bf571342b (diff)
downloadwallet-core-99550b001178965cae6d5e204783f8d2fd0adc1f.tar.gz
wallet-core-99550b001178965cae6d5e204783f8d2fd0adc1f.tar.bz2
wallet-core-99550b001178965cae6d5e204783f8d2fd0adc1f.zip
hide internal wallet state, keep it internal to package
Diffstat (limited to 'packages/taler-wallet-core/src/headless/helpers.ts')
-rw-r--r--packages/taler-wallet-core/src/headless/helpers.ts5
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);