diff options
Diffstat (limited to 'packages/taler-wallet-core/src/host-impl.qtart.ts')
-rw-r--r-- | packages/taler-wallet-core/src/host-impl.qtart.ts | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/packages/taler-wallet-core/src/host-impl.qtart.ts b/packages/taler-wallet-core/src/host-impl.qtart.ts index 720f5affb..81dbe0acd 100644 --- a/packages/taler-wallet-core/src/host-impl.qtart.ts +++ b/packages/taler-wallet-core/src/host-impl.qtart.ts @@ -110,7 +110,7 @@ async function makeSqliteDb( return { ...myBackend.accessStats, primitiveStatements: numStmt, - } + }; }, idbFactory: myBridgeIdbFactory, }; @@ -167,12 +167,15 @@ export async function createNativeWalletHost2( let dbResp: MakeDbResult; - if (args.persistentStoragePath && args.persistentStoragePath.endsWith(".json")) { + if ( + args.persistentStoragePath && + args.persistentStoragePath.endsWith(".json") + ) { logger.info("using JSON file DB backend (slow!)"); dbResp = await makeFileDb(args); } else { logger.info("using sqlite3 DB backend (experimental!)"); - dbResp = await makeSqliteDb(args) + dbResp = await makeSqliteDb(args); } const myIdbFactory: IDBFactory = dbResp.idbFactory as any as IDBFactory; @@ -189,22 +192,13 @@ export async function createNativeWalletHost2( }); } - const myVersionChange = (): Promise<void> => { - logger.error("version change requested, should not happen"); - throw Error( - "BUG: wallet DB version change event can't happen with memory IDB", - ); - }; - - const myDb = await openTalerDatabase(myIdbFactory, myVersionChange); - let workerFactory; workerFactory = new SynchronousCryptoWorkerFactoryPlain(); const timer = new SetTimeoutTimerAPI(); const w = await Wallet.create( - myDb, + myIdbFactory, myHttpLib, timer, workerFactory, |