From b8627813be56e04c18baf38885f3a3dc0fb7496c Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 24 Jan 2016 02:29:13 +0100 Subject: Replace handlebars with mithril, hooks for i18n. The wallet is now a single page application. --- extension/lib/wallet/db.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'extension/lib/wallet/db.ts') diff --git a/extension/lib/wallet/db.ts b/extension/lib/wallet/db.ts index a208f0923..8c331ef6f 100644 --- a/extension/lib/wallet/db.ts +++ b/extension/lib/wallet/db.ts @@ -33,7 +33,7 @@ const DB_VERSION = 1; */ export function openTalerDb(): Promise { return new Promise((resolve, reject) => { - let req = indexedDB.open(DB_NAME, DB_VERSION); + const req = indexedDB.open(DB_NAME, DB_VERSION); req.onerror = (e) => { reject(e); }; @@ -45,16 +45,17 @@ export function openTalerDb(): Promise { console.log("DB: upgrade needed: oldVersion = " + e.oldVersion); switch (e.oldVersion) { case 0: // DB does not exist yet - let mints = db.createObjectStore("mints", {keyPath: "baseUrl"}); + const mints = db.createObjectStore("mints", {keyPath: "baseUrl"}); mints.createIndex("pubKey", "keys.master_public_key"); db.createObjectStore("reserves", {keyPath: "reserve_pub"}); db.createObjectStore("denoms", {keyPath: "denomPub"}); - let coins = db.createObjectStore("coins", {keyPath: "coinPub"}); + const coins = db.createObjectStore("coins", {keyPath: "coinPub"}); coins.createIndex("mintBaseUrl", "mintBaseUrl"); db.createObjectStore("transactions", {keyPath: "contractHash"}); db.createObjectStore("precoins", {keyPath: "coinPub", autoIncrement: true}); - db.createObjectStore("history", {keyPath: "id", autoIncrement: true}); + const history = db.createObjectStore("history", {keyPath: "id", autoIncrement: true}); + history.createIndex("timestamp", "timestamp"); break; } }; -- cgit v1.2.3