wallet-core: remove waiting-for-retry and some other notifications that we don't use

This commit is contained in:
Florian Dold 2023-06-02 16:03:07 +02:00
parent 1ee9ef80bd
commit b1ce901df2
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 0 additions and 26 deletions

View File

@ -41,7 +41,6 @@ export enum NotificationType {
ReserveCreated = "reserve-created", ReserveCreated = "reserve-created",
WithdrawGroupCreated = "withdraw-group-created", WithdrawGroupCreated = "withdraw-group-created",
WithdrawGroupFinished = "withdraw-group-finished", WithdrawGroupFinished = "withdraw-group-finished",
WaitingForRetry = "waiting-for-retry",
RefundStarted = "refund-started", RefundStarted = "refund-started",
RefundQueried = "refund-queried", RefundQueried = "refund-queried",
ExchangeOperationError = "exchange-operation-error", ExchangeOperationError = "exchange-operation-error",
@ -65,7 +64,6 @@ export enum NotificationType {
KycRequested = "kyc-requested", KycRequested = "kyc-requested",
WithdrawalGroupBankConfirmed = "withdrawal-group-bank-confirmed", WithdrawalGroupBankConfirmed = "withdrawal-group-bank-confirmed",
WithdrawalGroupReserveReady = "withdrawal-group-reserve-ready", WithdrawalGroupReserveReady = "withdrawal-group-reserve-ready",
PeerPullCreditReady = "peer-pull-credit-ready",
DepositOperationError = "deposit-operation-error", DepositOperationError = "deposit-operation-error",
TransactionStateTransition = "transaction-state-transition", TransactionStateTransition = "transaction-state-transition",
} }
@ -149,15 +147,6 @@ export interface WithdrawalGroupReserveReadyNotification {
transactionId: string; transactionId: string;
} }
/**
* The purse creation of a peer-pull-credit transaction
* is done, and the other party can now pay.
*/
export interface PeerPullCreditReadyNotification {
type: NotificationType.PeerPullCreditReady;
transactionId: string;
}
export interface RefreshRevealedNotification { export interface RefreshRevealedNotification {
type: NotificationType.RefreshRevealed; type: NotificationType.RefreshRevealed;
} }
@ -184,13 +173,6 @@ export interface WithdrawalGroupFinishedNotification {
reservePub: string; reservePub: string;
} }
export interface WaitingForRetryNotification {
type: NotificationType.WaitingForRetry;
numPending: number;
numGivingLiveness: number;
numDue: number;
}
export interface ExchangeAddedNotification { export interface ExchangeAddedNotification {
type: NotificationType.ExchangeAdded; type: NotificationType.ExchangeAdded;
} }
@ -309,7 +291,6 @@ export type WalletNotification =
| ReserveCreatedNotification | ReserveCreatedNotification
| ReserveConfirmedNotification | ReserveConfirmedNotification
| WithdrawalGroupFinishedNotification | WithdrawalGroupFinishedNotification
| WaitingForRetryNotification
| RefundStartedNotification | RefundStartedNotification
| RefundQueriedNotification | RefundQueriedNotification
| WithdrawalGroupCreatedNotification | WithdrawalGroupCreatedNotification
@ -325,5 +306,4 @@ export type WalletNotification =
| KycRequestedNotification | KycRequestedNotification
| WithdrawalGroupBankConfirmed | WithdrawalGroupBankConfirmed
| WithdrawalGroupReserveReadyNotification | WithdrawalGroupReserveReadyNotification
| PeerPullCreditReadyNotification
| TransactionStateTransitionNotification; | TransactionStateTransitionNotification;

View File

@ -436,12 +436,6 @@ async function runTaskLoop(
); );
logger.trace(`waiting for at most ${dt.d_ms} ms`); logger.trace(`waiting for at most ${dt.d_ms} ms`);
const timeout = ws.timerGroup.resolveAfter(dt); const timeout = ws.timerGroup.resolveAfter(dt);
ws.notify({
type: NotificationType.WaitingForRetry,
numGivingLiveness,
numDue,
numPending: pending.pendingOperations.length,
});
// Wait until either the timeout, or we are notified (via the latch) // Wait until either the timeout, or we are notified (via the latch)
// that more work might be available. // that more work might be available.
await Promise.race([timeout, ws.workAvailable.wait()]); await Promise.race([timeout, ws.workAvailable.wait()]);