Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete unused event #12689

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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