aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/pending.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-09-21 20:46:45 +0200
committerFlorian Dold <florian@dold.me>2022-09-21 22:50:42 +0200
commit7d6bcd42ea9efced6200cf94924aa38bed2dbb02 (patch)
tree54b2077512c7d098e558193392a7ac92a6d74d63 /packages/taler-wallet-core/src/operations/pending.ts
parent5d31803c92ac085d50ab0942a6cf657a6cd9cc4b (diff)
downloadwallet-core-7d6bcd42ea9efced6200cf94924aa38bed2dbb02.tar.xz
wallet-core: use numeric status field to allow range queries
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pending.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/pending.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/operations/pending.ts b/packages/taler-wallet-core/src/operations/pending.ts
index 9ba532ab7..18e8ec83b 100644
--- a/packages/taler-wallet-core/src/operations/pending.ts
+++ b/packages/taler-wallet-core/src/operations/pending.ts
@@ -28,6 +28,9 @@ import {
BackupProviderStateTag,
RefreshCoinStatus,
OperationStatus,
+ WithdrawalGroupRecord,
+ WithdrawalGroupStatus,
+ OperationStatusRange,
} from "../db.js";
import {
PendingOperationsResponse,
@@ -38,6 +41,7 @@ import { InternalWalletState } from "../internal-wallet-state.js";
import { GetReadOnlyAccess } from "../util/query.js";
import { RetryTags } from "../util/retries.js";
import { Wallet } from "../wallet.js";
+import { GlobalIDB } from "@gnu-taler/idb-bridge";
async function gatherExchangePending(
tx: GetReadOnlyAccess<{
@@ -120,7 +124,10 @@ async function gatherWithdrawalPending(
resp: PendingOperationsResponse,
): Promise<void> {
const wsrs = await tx.withdrawalGroups.indexes.byStatus.getAll(
- OperationStatus.Pending,
+ GlobalIDB.KeyRange.bound(
+ OperationStatusRange.ACTIVE_START,
+ OperationStatusRange.ACTIVE_END,
+ ),
);
for (const wsr of wsrs) {
if (wsr.timestampFinish) {