diff options
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r-- | packages/taler-wallet-core/src/db.ts | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index 0bfe11aaa..a8c103265 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -873,6 +873,8 @@ export enum DepositElementStatus { Accepted = 20, KycRequired = 30, Wired = 40, + RefundSuccess = 50, + RefundFailed = 51, } /** @@ -1639,6 +1641,14 @@ export interface BackupProviderRecord { uids: string[]; } +export enum DepositOperationStatus { + Finished = 50 /* OperationStatusRange.DORMANT_START */, + Suspended = 51 /* OperationStatusRange.DORMANT_START + 1 */, + Aborted = 52 /* OperationStatusRange.DORMANT_START + 2 */, + Pending = 10 /* OperationStatusRange.ACTIVE_START */, + Aborting = 11 /* OperationStatusRange.ACTIVE_START + 1 */, +} + /** * Group of deposits made by the wallet. */ @@ -1680,16 +1690,26 @@ export interface DepositGroupRecord { */ effectiveDepositAmount: AmountString; - depositedPerCoin: boolean[]; - timestampCreated: TalerProtocolTimestamp; timestampFinished: TalerProtocolTimestamp | undefined; - operationStatus: OperationStatus; + operationStatus: DepositOperationStatus; + // FIXME: Duplication between this and transactionPerCoin! + depositedPerCoin: boolean[]; + + // FIXME: Improve name! transactionPerCoin: DepositElementStatus[]; + /** + * When the deposit transaction was aborted and + * refreshes were tried, we create a refresh + * group and store the ID here. + */ + abortRefreshGroupId?: string; + + // FIXME: Do we need this and should it be in this object store? trackingState?: { [signature: string]: { // Raw wire transfer identifier of the deposit. |