aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/db.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-01-19 14:35:00 +0100
committerFlorian Dold <florian@dold.me>2024-01-19 14:46:07 +0100
commitef4cc1a1ca568cf9e43964ca20bfc0b8c07a41e5 (patch)
treea38370305e43f0c17e9cde1653dadda5ef7e5217 /packages/taler-wallet-core/src/db.ts
parent2f50b3880edb60db88397fb1c3b5c2f601f6a629 (diff)
downloadwallet-core-ef4cc1a1ca568cf9e43964ca20bfc0b8c07a41e5.tar.xz
wallet-core: fix bugs.taler.net/n/7836
The test case for expired refunds now does more checks. A DB query bug for refund items was also fixed.
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r--packages/taler-wallet-core/src/db.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
index 73739c19c..f16600f5d 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -2217,6 +2217,7 @@ export enum RefundGroupStatus {
Done = 0x0500_0000,
Failed = 0x0501_0000,
Aborted = 0x0503_0000,
+ Expired = 0x0502_0000,
}
/**
@@ -2641,6 +2642,7 @@ export const WalletStoresV1 = {
"coinPub",
"rtxid",
]),
+ // FIXME: Why is this a list of index keys? Confusing!
byRefundGroupId: describeIndex("byRefundGroupId", ["refundGroupId"]),
},
),
@@ -2663,6 +2665,14 @@ export type WalletDbReadWriteTransaction<
Stores extends StoreNames<typeof WalletStoresV1> & string,
> = DbReadWriteTransaction<typeof WalletStoresV1, Stores>;
+export type WalletDbReadWriteTransactionArr<
+ StoresArr extends Array<StoreNames<typeof WalletStoresV1>>,
+> = DbReadWriteTransactionArr<typeof WalletStoresV1, StoresArr>;
+
+export type WalletDbReadOnlyTransactionArr<
+ StoresArr extends Array<StoreNames<typeof WalletStoresV1>>,
+> = DbReadOnlyTransactionArr<typeof WalletStoresV1, StoresArr>;
+
/**
* An applied migration.
*/