diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-02-23 14:07:53 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-02-23 14:07:59 +0100 |
commit | 5591077fe9241def5fa33fc90a24681c8b7b0976 (patch) | |
tree | e4020c487d20fd7bfd7b2256ee8f2d88861dcc6a /extension/lib/wallet/db.ts | |
parent | 718f81bcd858bd50373066845727b0cf520ccd06 (diff) |
repurchase detection
Diffstat (limited to 'extension/lib/wallet/db.ts')
-rw-r--r-- | extension/lib/wallet/db.ts | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/extension/lib/wallet/db.ts b/extension/lib/wallet/db.ts index 106f1f34c..c7621c5ff 100644 --- a/extension/lib/wallet/db.ts +++ b/extension/lib/wallet/db.ts @@ -51,10 +51,21 @@ export function openTalerDb(): Promise<IDBDatabase> { db.createObjectStore("denoms", {keyPath: "denomPub"}); const coins = db.createObjectStore("coins", {keyPath: "coinPub"}); coins.createIndex("mintBaseUrl", "mintBaseUrl"); - db.createObjectStore("transactions", {keyPath: "contractHash"}); + const transactions = db.createObjectStore("transactions", + {keyPath: "contractHash"}); + transactions.createIndex("repurchase", + [ + "contract.merchant_pub", + "contract.repurchase_correlation_id" + ]); + db.createObjectStore("precoins", {keyPath: "coinPub", autoIncrement: true}); - const history = db.createObjectStore("history", {keyPath: "id", autoIncrement: true}); + const history = db.createObjectStore("history", + { + keyPath: "id", + autoIncrement: true + }); history.createIndex("timestamp", "timestamp"); break; } |