diff options
author | Florian Dold <florian@dold.me> | 2023-09-15 13:35:47 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-09-15 13:35:47 +0200 |
commit | de117e375a2a3cfa312acf4176276092f55205e0 (patch) | |
tree | 09d6778d2d9643442c297fca51c31da54b503746 /packages/taler-wallet-core/src/db.ts | |
parent | 5de329e653bb1e2a0b6ad8247cb76d285a98fdc0 (diff) | |
download | wallet-core-de117e375a2a3cfa312acf4176276092f55205e0.tar.xz |
wallet-core: make planchets.byGroupAndIndex unique
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 597cdf5a5..a5ead4d64 100644 --- 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"), }, |