diff options
| author | Florian Dold <florian@dold.me> | 2023-05-05 10:56:42 +0200 | 
|---|---|---|
| committer | Florian Dold <florian@dold.me> | 2023-05-05 13:21:58 +0200 | 
| commit | 60805f3ff88d7ecd149a88ec7cea846384155c5b (patch) | |
| tree | 0767a7ed20c4879ab35447039fd7e3be8fdecb94 /packages/taler-wallet-core/src/db.ts | |
| parent | 1b0bec0363793996eff6483d36b844cfa2381404 (diff) | |
DD37 wip
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
| -rw-r--r-- | packages/taler-wallet-core/src/db.ts | 75 | 
1 files changed, 49 insertions, 26 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index febc5f8fa..a95db9ca3 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -130,10 +130,10 @@ export enum OperationStatusRange {    // Operations that need to be actively processed.    ACTIVE_START = 10,    ACTIVE_END = 29, -  // Operations that need user input, but nothing can be done -  // automatically. -  USER_ATTENTION_START = 30, -  USER_ATTENTION_END = 49, +  // Operations that are suspended and might +  // expire, but nothing else can be done. +  SUSPENDED_START = 30, +  SUSPENDED_END = 49,    // Operations that don't need any attention or processing.    DORMANT_START = 50,    DORMANT_END = 69, @@ -146,24 +146,24 @@ export enum WithdrawalGroupStatus {    /**     * Reserve must be registered with the bank.     */ -  RegisteringBank = 10, +  PendingRegisteringBank = 10,    /**     * We've registered reserve's information with the bank     * and are now waiting for the user to confirm the withdraw     * with the bank (typically 2nd factor auth).     */ -  WaitConfirmBank = 11, +  PendingWaitConfirmBank = 11,    /**     * Querying reserve status with the exchange.     */ -  QueryingStatus = 12, +  PendingQueryingStatus = 12,    /**     * Ready for withdrawal.     */ -  Ready = 13, +  PendingReady = 13,    /**     * We are telling the bank that we don't want to complete @@ -174,12 +174,20 @@ export enum WithdrawalGroupStatus {    /**     * Exchange wants KYC info from the user.     */ -  Kyc = 16, +  PendingKyc = 16,    /**     * Exchange is doing AML checks.     */ -  Aml = 17, +  PendingAml = 17, + +  SuspendedRegisteringBank = 30, +  SuspendedWaitConfirmBank = 31, +  SuspendedQueryingStatus = 32, +  SuspendedReady = 33, +  SuspendedAbortingBank = 34, +  SuspendedKyc = 35, +  SuspendedAml = 36,    /**     * The corresponding withdraw record has been created. @@ -191,16 +199,16 @@ export enum WithdrawalGroupStatus {    /**     * The bank aborted the withdrawal.     */ -  BankAborted = 51, +  FailedBankAborted = 51, -  SuspendedRegisteringBank = 52, -  SuspendedWaitConfirmBank = 53, -  SuspendedQueryingStatus = 54, -  SuspendedReady = 55, -  SuspendedAbortingBank = 56, -  SuspendedKyc = 57, -  SuspendedAml = 58,    FailedAbortingBank = 59, + +  /** +   * Aborted in a state where we were supposed to +   * talk to the exchange.  Money might have been +   * wired or not. +   */ +  AbortedExchange = 60  }  /** @@ -1790,8 +1798,18 @@ export enum PeerPushPaymentInitiationStatus {    /**     * Initiated, but no purse created yet.     */ -  Initiated = 10 /* ACTIVE_START */, -  PurseCreated = 50 /* DORMANT_START */, +  PendingCreatePurse = 10 /* ACTIVE_START */, +  PendingReady = 11, +  AbortingDeletePurse = 12, +  AbortingRefresh = 13, + +  SuspendedCreatePurse = 30, +  SuspendedReady = 31, +  SuspendedAbortingDeletePurse = 32, +  SuspendedAbortingRefresh = 33, + +  Done = 50 /* DORMANT_START */, +  Aborted = 51,  }  export interface PeerPushPaymentCoinSelection { @@ -1856,14 +1874,18 @@ export interface PeerPushPaymentInitiationRecord {  }  export enum PeerPullPaymentInitiationStatus { -  Initial = 10 /* ACTIVE_START */, +  PendingCreatePurse = 10 /* ACTIVE_START */,    /**     * Purse created, waiting for the other party to accept the     * invoice and deposit money into it.     */ -  PurseCreated = 11 /* ACTIVE_START + 1 */, -  KycRequired = 12 /* ACTIVE_START + 2 */, -  PurseDeposited = 50 /* DORMANT_START */, +  PendingReady = 11 /* ACTIVE_START + 1 */, +  PendingMergeKycRequired = 12 /* ACTIVE_START + 2 */, +  PendingWithdrawing = 13, +  SuspendedCreatePurse = 30, +  SuspendedReady = 31, +  SuspendedWithdrawing = 32, +  DonePurseDeposited = 50 /* DORMANT_START */,  }  export interface PeerPullPaymentInitiationRecord { @@ -1921,12 +1943,13 @@ export interface PeerPullPaymentInitiationRecord {  export enum PeerPushPaymentIncomingStatus {    Proposed = 30 /* USER_ATTENTION_START */,    Accepted = 10 /* ACTIVE_START */, -  KycRequired = 11 /* ACTIVE_START + 1 */, +  MergeKycRequired = 11 /* ACTIVE_START + 1 */,    /**     * Merge was successful and withdrawal group has been created, now     * everything is in the hand of the withdrawal group.     */ -  WithdrawalCreated = 50 /* DORMANT_START */, +  Withdrawing = 12, +  Done = 50 /* DORMANT_START */,  }  /**  | 
