From ef0acf06bfb7820a21c4719dba0d659f600be3c7 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 2 Apr 2020 20:33:01 +0530 Subject: model reserve history in the exchange, improve reserve handling logic --- src/types/notifications.ts | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'src/types/notifications.ts') diff --git a/src/types/notifications.ts b/src/types/notifications.ts index 39930dcca..05d3c273a 100644 --- a/src/types/notifications.ts +++ b/src/types/notifications.ts @@ -1,4 +1,5 @@ import { OperationError } from "./walletTypes"; +import { WithdrawCoinSource, WithdrawalSource } from "./dbTypes"; /* This file is part of GNU Taler @@ -34,10 +35,9 @@ export const enum NotificationType { RefreshUnwarranted = "refresh-unwarranted", ReserveUpdated = "reserve-updated", ReserveConfirmed = "reserve-confirmed", - ReserveDepleted = "reserve-depleted", ReserveCreated = "reserve-created", - WithdrawSessionCreated = "withdraw-session-created", - WithdrawSessionFinished = "withdraw-session-finished", + WithdrawGroupCreated = "withdraw-group-created", + WithdrawGroupFinished = "withdraw-group-finished", WaitingForRetry = "waiting-for-retry", RefundStarted = "refund-started", RefundQueried = "refund-queried", @@ -114,19 +114,14 @@ export interface ReserveConfirmedNotification { type: NotificationType.ReserveConfirmed; } -export interface WithdrawSessionCreatedNotification { - type: NotificationType.WithdrawSessionCreated; - withdrawSessionId: string; +export interface WithdrawalGroupCreatedNotification { + type: NotificationType.WithdrawGroupCreated; + withdrawalGroupId: string; } -export interface WithdrawSessionFinishedNotification { - type: NotificationType.WithdrawSessionFinished; - withdrawSessionId: string; -} - -export interface ReserveDepletedNotification { - type: NotificationType.ReserveDepleted; - reservePub: string; +export interface WithdrawalGroupFinishedNotification { + type: NotificationType.WithdrawGroupFinished; + withdrawalSource: WithdrawalSource; } export interface WaitingForRetryNotification { @@ -210,13 +205,12 @@ export type WalletNotification = | ReserveUpdatedNotification | ReserveCreatedNotification | ReserveConfirmedNotification - | WithdrawSessionFinishedNotification - | ReserveDepletedNotification + | WithdrawalGroupFinishedNotification | WaitingForRetryNotification | RefundStartedNotification | RefundFinishedNotification | RefundQueriedNotification - | WithdrawSessionCreatedNotification + | WithdrawalGroupCreatedNotification | CoinWithdrawnNotification | WildcardNotification | RecoupOperationErrorNotification; -- cgit v1.2.3