From a181ee06e4b52cb35e00ff8c86acff315135faf2 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 22 Apr 2024 23:29:07 +0200 Subject: wallet-core: unify handling of run-until-done, simplify waiter implementation --- packages/taler-util/src/notifications.ts | 8 +++++++- packages/taler-util/src/wallet-types.ts | 10 ---------- 2 files changed, 7 insertions(+), 11 deletions(-) (limited to 'packages/taler-util') diff --git a/packages/taler-util/src/notifications.ts b/packages/taler-util/src/notifications.ts index 1c6ca4b85..b60fb267c 100644 --- a/packages/taler-util/src/notifications.ts +++ b/packages/taler-util/src/notifications.ts @@ -32,6 +32,7 @@ export enum NotificationType { TransactionStateTransition = "transaction-state-transition", WithdrawalOperationTransition = "withdrawal-operation-transition", ExchangeStateTransition = "exchange-state-transition", + Idle = "idle", TaskObservabilityEvent = "task-observability-event", RequestObservabilityEvent = "request-observability-event", } @@ -230,6 +231,10 @@ export interface WithdrawalOperationTransitionNotification { uri: string; } +export interface IdleNotification { + type: NotificationType.Idle; +} + export type WalletNotification = | BalanceChangeNotification | WithdrawalOperationTransitionNotification @@ -237,4 +242,5 @@ export type WalletNotification = | ExchangeStateTransitionNotification | TransactionStateTransitionNotification | TaskProgressNotification - | RequestProgressNotification; + | RequestProgressNotification + | IdleNotification; diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 0653bc473..d39eb3ce9 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -3213,16 +3213,6 @@ export const codecForRemoveGlobalCurrencyAuditorRequest = .property("auditorPub", codecForString()) .build("RemoveGlobalCurrencyAuditorRequest"); -export interface RetryLoopOpts { - /** - * Stop the retry loop when all lifeness-giving pending operations - * are done. - * - * Defaults to false. - */ - stopWhenDone?: boolean; -} - /** * Information about one provider. * -- cgit v1.2.3