commit de117e375a2a3cfa312acf4176276092f55205e0
parent 5de329e653bb1e2a0b6ad8247cb76d285a98fdc0
Author: Florian Dold <florian@dold.me>
Date: Fri, 15 Sep 2023 13:35:47 +0200
wallet-core: make planchets.byGroupAndIndex unique
Diffstat:
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
@@ -2434,10 +2434,13 @@ export const WalletStoresV1 = {
"planchets",
describeContents<PlanchetRecord>({ keyPath: "coinPub" }),
{
- byGroupAndIndex: describeIndex("byGroupAndIndex", [
- "withdrawalGroupId",
- "coinIdx",
- ]),
+ byGroupAndIndex: describeIndex(
+ "byGroupAndIndex",
+ ["withdrawalGroupId", "coinIdx"],
+ {
+ unique: true,
+ },
+ ),
byGroup: describeIndex("byGroup", "withdrawalGroupId"),
byCoinEvHash: describeIndex("byCoinEv", "coinEvHash"),
},