introduce balance-change notification
This commit is contained in:
parent
1b22b4957d
commit
66432cdd05
@ -26,7 +26,7 @@ import { TransactionState } from "./transactions-types.js";
|
|||||||
import { TalerErrorDetail } from "./wallet-types.js";
|
import { TalerErrorDetail } from "./wallet-types.js";
|
||||||
|
|
||||||
export enum NotificationType {
|
export enum NotificationType {
|
||||||
CoinWithdrawn = "coin-withdrawn",
|
BalanceChange = "balance-change",
|
||||||
ExchangeOperationError = "exchange-operation-error",
|
ExchangeOperationError = "exchange-operation-error",
|
||||||
ExchangeAdded = "exchange-added",
|
ExchangeAdded = "exchange-added",
|
||||||
BackupOperationError = "backup-error",
|
BackupOperationError = "backup-error",
|
||||||
@ -48,16 +48,14 @@ export interface TransactionStateTransitionNotification {
|
|||||||
errorInfo?: ErrorInfoSummary;
|
errorInfo?: ErrorInfoSummary;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CoinWithdrawnNotification {
|
|
||||||
type: NotificationType.CoinWithdrawn;
|
|
||||||
numWithdrawn: number;
|
|
||||||
numTotal: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExchangeAddedNotification {
|
export interface ExchangeAddedNotification {
|
||||||
type: NotificationType.ExchangeAdded;
|
type: NotificationType.ExchangeAdded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface BalanceChangeNotification {
|
||||||
|
type: NotificationType.BalanceChange;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ExchangeOperationErrorNotification {
|
export interface ExchangeOperationErrorNotification {
|
||||||
type: NotificationType.ExchangeOperationError;
|
type: NotificationType.ExchangeOperationError;
|
||||||
error: TalerErrorDetail;
|
error: TalerErrorDetail;
|
||||||
@ -76,9 +74,9 @@ export interface PendingOperationProcessedNotification {
|
|||||||
|
|
||||||
|
|
||||||
export type WalletNotification =
|
export type WalletNotification =
|
||||||
|
| BalanceChangeNotification
|
||||||
| BackupOperationErrorNotification
|
| BackupOperationErrorNotification
|
||||||
| ExchangeAddedNotification
|
| ExchangeAddedNotification
|
||||||
| ExchangeOperationErrorNotification
|
| ExchangeOperationErrorNotification
|
||||||
| CoinWithdrawnNotification
|
|
||||||
| PendingOperationProcessedNotification
|
| PendingOperationProcessedNotification
|
||||||
| TransactionStateTransitionNotification;
|
| TransactionStateTransitionNotification;
|
||||||
|
Loading…
Reference in New Issue
Block a user