aboutsummaryrefslogtreecommitdiff
path: root/src/db.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-17 01:54:01 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-17 01:54:01 +0200
commit5ff600fed792919938facfae07be3a73cb4bfb36 (patch)
tree8f355d4f27b983316b69a6e1f9d32104577f1cf4 /src/db.ts
parent9e3a26ca70e77265f74527eb183c3f80b6531a97 (diff)
start with an actual wallet cli
Diffstat (limited to 'src/db.ts')
-rw-r--r--src/db.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/db.ts b/src/db.ts
index 0916ef145..4fe7f81af 100644
--- a/src/db.ts
+++ b/src/db.ts
@@ -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=${