Skip to content

Commit

Permalink
Delete unused event (#12689)
Browse files Browse the repository at this point in the history
  • Loading branch information
lontivero committed Mar 19, 2024
1 parent 36c1dbe commit fdedca5
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions WalletWasabi/Wallets/WalletManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public class WalletManager : IWalletProvider
LoadWalletListFromFileSystem();
}

/// <summary>
/// Triggered if any of the Wallets processes a transaction. The sender of the event will be the Wallet.
/// </summary>
public event EventHandler<ProcessedResult>? WalletRelevantTransactionProcessed;

/// <summary>
/// Triggered if any of the Wallets changes its state. The sender of the event will be the Wallet.
/// </summary>
Expand Down Expand Up @@ -304,19 +299,13 @@ private void AddWallet(Wallet wallet)
wallet.KeyManager.ToFile();
}

wallet.WalletRelevantTransactionProcessed += TransactionProcessor_WalletRelevantTransactionProcessed;
wallet.StateChanged += Wallet_StateChanged;

WalletAdded?.Invoke(this, wallet);
}

public bool WalletExists(HDFingerprint? fingerprint) => GetWallets().Any(x => fingerprint is { } && x.KeyManager.MasterFingerprint == fingerprint);

private void TransactionProcessor_WalletRelevantTransactionProcessed(object? sender, ProcessedResult e)
{
WalletRelevantTransactionProcessed?.Invoke(sender, e);
}

private void Wallet_StateChanged(object? sender, WalletState e)
{
WalletStateChanged?.Invoke(sender, e);
Expand All @@ -343,7 +332,6 @@ public async Task RemoveAndStopAllAsync(CancellationToken cancel)
{
cancel.ThrowIfCancellationRequested();

wallet.WalletRelevantTransactionProcessed -= TransactionProcessor_WalletRelevantTransactionProcessed;
wallet.StateChanged -= Wallet_StateChanged;

lock (Lock)
Expand Down

0 comments on commit fdedca5

Please sign in to comment.