From aba173d8a906fa0ede0c3660bd37b11fb7a6a127 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 30 Aug 2023 16:51:51 +0200 Subject: wallet-core: open DB inside wallet handle, back up meta DB as well --- packages/taler-wallet-core/src/host-impl.node.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'packages/taler-wallet-core/src/host-impl.node.ts') diff --git a/packages/taler-wallet-core/src/host-impl.node.ts b/packages/taler-wallet-core/src/host-impl.node.ts index 6a4f21d79..0b6539306 100644 --- a/packages/taler-wallet-core/src/host-impl.node.ts +++ b/packages/taler-wallet-core/src/host-impl.node.ts @@ -139,13 +139,6 @@ export async function createNativeWalletHost2( }); } - const myVersionChange = (): Promise => { - logger.error("version change requested, should not happen"); - throw Error( - "BUG: wallet DB version change event can't happen with memory IDB", - ); - }; - let dbResp: MakeDbResult; if (args.persistentStoragePath &&args.persistentStoragePath.endsWith(".json")) { @@ -160,8 +153,6 @@ export async function createNativeWalletHost2( shimIndexedDB(dbResp.idbFactory); - const myDb = await openTalerDatabase(myIdbFactory, myVersionChange); - let workerFactory; const cryptoWorkerType = args.cryptoWorkerType ?? "node-worker-thread"; if (cryptoWorkerType === "sync") { @@ -189,7 +180,7 @@ export async function createNativeWalletHost2( const timer = new SetTimeoutTimerAPI(); const w = await Wallet.create( - myDb, + myIdbFactory, myHttpLib, timer, workerFactory, -- cgit v1.2.3