diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-08-31 13:12:06 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-08-31 13:12:06 +0200 |
commit | 94cfcc875065f988815c31aaf8ebf36f75ac5983 (patch) | |
tree | 8389a638c67a3ae2d57fb354da1df6378e82113f /packages/taler-wallet-core/src/host-impl.qtart.ts | |
parent | e02a4eb990c8c54662fbb658695312bdfce492e0 (diff) | |
parent | 79973a63dd31c0d84b677a2a1511b1dffc6218b8 (diff) |
Merge branch 'master' into age-withdraw
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, |