introduce balance-change notification

This commit is contained in:
Florian Dold 2023-06-26 10:52:50 +02:00
parent 1b22b4957d
commit 66432cdd05
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -26,7 +26,7 @@ import { TransactionState } from "./transactions-types.js";
import { TalerErrorDetail } from "./wallet-types.js";
export enum NotificationType {
CoinWithdrawn = "coin-withdrawn",
BalanceChange = "balance-change",
ExchangeOperationError = "exchange-operation-error",
ExchangeAdded = "exchange-added",
BackupOperationError = "backup-error",
@ -48,16 +48,14 @@ export interface TransactionStateTransitionNotification {
errorInfo?: ErrorInfoSummary;
}
export interface CoinWithdrawnNotification {
type: NotificationType.CoinWithdrawn;
numWithdrawn: number;
numTotal: number;
}
export interface ExchangeAddedNotification {
type: NotificationType.ExchangeAdded;
}
export interface BalanceChangeNotification {
type: NotificationType.BalanceChange;
}
export interface ExchangeOperationErrorNotification {
type: NotificationType.ExchangeOperationError;
error: TalerErrorDetail;
@ -76,9 +74,9 @@ export interface PendingOperationProcessedNotification {
export type WalletNotification =
| BalanceChangeNotification
| BackupOperationErrorNotification
| ExchangeAddedNotification
| ExchangeOperationErrorNotification
| CoinWithdrawnNotification
| PendingOperationProcessedNotification
| TransactionStateTransitionNotification;