diff options
author | Florian Dold <florian@dold.me> | 2022-01-12 16:54:38 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-01-12 16:54:38 +0100 |
commit | 9f6e398884ee158cd22c685ce308043a25234095 (patch) | |
tree | 50afccf96d5b207c16f5280d31d8b906a9cf79d0 /packages/taler-wallet-core/src/db.ts | |
parent | dd66e43b3ceb3e393f399ac5544941de8912c59d (diff) | |
download | wallet-core-9f6e398884ee158cd22c685ce308043a25234095.tar.xz |
do withdrawal with fewer DB accesses
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 7f6b08e12..0b2d16ae7 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -158,7 +158,7 @@ export interface ReserveRecord { * * Only applies if bankWithdrawStatusUrl is defined. * - * Set to 0 if that hasn't happened yet. + * Set to undefined if that hasn't happened yet. */ timestampReserveInfoPosted: Timestamp | undefined; @@ -210,7 +210,7 @@ export interface ReserveRecord { /** * Is there any work to be done for this reserve? - * + * * FIXME: Technically redundant, since the reserveStatus would indicate this. */ operationStatus: OperationStatus; @@ -1341,6 +1341,9 @@ export interface DenomSelectionState { * the coin selection we want to withdraw. */ export interface WithdrawalGroupRecord { + /** + * Unique identifier for the withdrawal group. + */ withdrawalGroupId: string; /** @@ -1348,8 +1351,15 @@ export interface WithdrawalGroupRecord { */ secretSeed: string; + /** + * Public key of the reserve that we're withdrawing from. + */ reservePub: string; + /** + * The exchange base URL that we're withdrawing from. + * (Redundantly stored, as the reserve record also has this info.) + */ exchangeBaseUrl: string; /** @@ -1363,6 +1373,10 @@ export interface WithdrawalGroupRecord { */ timestampFinish?: Timestamp; + /** + * Operation status of the withdrawal group. + * Used for indexing in the database. + */ operationStatus: OperationStatus; /** @@ -1371,8 +1385,18 @@ export interface WithdrawalGroupRecord { */ rawWithdrawalAmount: AmountJson; + /** + * Denominations selected for withdrawal. + */ denomsSel: DenomSelectionState; + /** + * UID of the denomination selection. + * + * Used for merging backups. + * + * FIXME: Should this not also include a timestamp for more logical merging? + */ denomSelUid: string; /** |