aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/db.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-02-20 00:36:02 +0100
committerFlorian Dold <florian@dold.me>2023-02-20 00:38:24 +0100
commit30b3949d2bd9da6bceddb40f3d1921b95fa80316 (patch)
tree6163df600f17eadc94f7f3e51cc220bc8122ee8a /packages/taler-wallet-core/src/db.ts
parente6ed901626a5219a1d091f4f41654365d2c29531 (diff)
downloadwallet-core-30b3949d2bd9da6bceddb40f3d1921b95fa80316.tar.xz
wallet-core: pending operation for peer push credit, save withdrawalGroupId
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r--packages/taler-wallet-core/src/db.ts41
1 files changed, 40 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
index f8fbe2f07..5f7a6a4c4 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -1818,6 +1818,18 @@ export interface PeerPullPaymentInitiationRecord {
* Status of the peer pull payment initiation.
*/
status: OperationStatus;
+
+ withdrawalGroupId: string | undefined;
+}
+
+export enum PeerPushPaymentIncomingStatus {
+ Proposed = 30 /* USER_ATTENTION_START */,
+ Accepted = 10 /* ACTIVE_START */,
+ /**
+ * Merge was successful and withdrawal group has been created, now
+ * everything is in the hand of the withdrawal group.
+ */
+ WithdrawalCreated = 50 /* DORMANT_START */,
}
/**
@@ -1847,7 +1859,12 @@ export interface PeerPushPaymentIncomingRecord {
/**
* Status of the peer push payment incoming initiation.
*/
- status: OperationStatus;
+ status: PeerPushPaymentIncomingStatus;
+
+ /**
+ * Associated withdrawal group.
+ */
+ withdrawalGroupId: string | undefined;
}
export enum PeerPullPaymentIncomingStatus {
@@ -2260,6 +2277,21 @@ export const WalletStoresV1 = {
"exchangeBaseUrl",
"pursePub",
]),
+ byExchangeAndContractPriv: describeIndex(
+ "byExchangeAndContractPriv",
+ ["exchangeBaseUrl", "contractPriv"],
+ {
+ versionAdded: 4,
+ unique: true,
+ },
+ ),
+ byWithdrawalGroupId: describeIndex(
+ "byWithdrawalGroupId",
+ "withdrawalGroupId",
+ {
+ versionAdded: 4,
+ },
+ ),
byStatus: describeIndex("byStatus", "status"),
},
),
@@ -2291,6 +2323,13 @@ export const WalletStoresV1 = {
}),
{
byStatus: describeIndex("byStatus", "status"),
+ byWithdrawalGroupId: describeIndex(
+ "byWithdrawalGroupId",
+ "withdrawalGroupId",
+ {
+ versionAdded: 4,
+ },
+ ),
},
),
peerPushPaymentInitiations: describeStore(