aboutsummaryrefslogtreecommitdiff
path: root/extension/lib/wallet/db.ts
diff options
context:
space:
mode:
Diffstat (limited to 'extension/lib/wallet/db.ts')
-rw-r--r--extension/lib/wallet/db.ts15
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;
}