diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-17 01:54:01 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-17 01:54:01 +0200 |
commit | 5ff600fed792919938facfae07be3a73cb4bfb36 (patch) | |
tree | 8f355d4f27b983316b69a6e1f9d32104577f1cf4 /src/db.ts | |
parent | 9e3a26ca70e77265f74527eb183c3f80b6531a97 (diff) |
start with an actual wallet cli
Diffstat (limited to 'src/db.ts')
-rw-r--r-- | src/db.ts | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -12,13 +12,17 @@ export function openTalerDb( onVersionChange: () => void, onUpgradeUnsupported: (oldVersion: number, newVersion: number) => void, ): Promise<IDBDatabase> { + console.log("in openTalerDb"); return new Promise<IDBDatabase>((resolve, reject) => { + console.log("calling factory.open"); const req = idbFactory.open(DB_NAME, WALLET_DB_VERSION); + console.log("after factory.open"); req.onerror = e => { console.log("taler database error", e); reject(e); }; req.onsuccess = e => { + console.log("in openTalerDb onsuccess"); req.result.onversionchange = (evt: IDBVersionChangeEvent) => { console.log( `handling live db version change from ${evt.oldVersion} to ${ @@ -31,6 +35,7 @@ export function openTalerDb( resolve(req.result); }; req.onupgradeneeded = e => { + console.log("in openTalerDb onupgradeneeded"); const db = req.result; console.log( `DB: upgrade needed: oldVersion=${e.oldVersion}, newVersion=${ |