Simplify conditional expression
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinListViewModel.cs
@@ -506,11 +506,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
SelectedAmount = selectedCoins.Sum(x => x.Amount);
IsAnyCoinSelected = selectedCoins.Any();
- LabelExposeCommonOwnershipWarning = !DisplayCommonOwnershipWarning
- ? false
- : selectedCoins
- .Where(c => c.AnonymitySet == 1)
- .Any(x => selectedCoins.Any(x => x.AnonymitySet > 1));
+ LabelExposeCommonOwnershipWarning = DisplayCommonOwnershipWarning && selectedCoins.Where(c => c.AnonymitySet == 1).Any(x => selectedCoins.Any(x => x.AnonymitySet > 1));
SelectionChanged?.Invoke(this, null);
}

MODIFY
WalletWasabi.Packager/Program.cs
WalletWasabi.Packager/Program.cs
@@ -153,7 +153,7 @@ namespace WalletWasabi.Packager
{
var verString = userAgent.Substring(userAgent.IndexOf("Satoshi:") + 8, 4);
var ver = new Version(verString);
- bool addToResult = currentOnions is null ? true : currentOnions.Contains(node.Name);
+ bool addToResult = currentOnions is null || currentOnions.Contains(node.Name);
if (ver >= new Version("0.16") && addToResult)
{

MODIFY
WalletWasabi/Blockchain/Mempool/MempoolService.cs
WalletWasabi/Blockchain/Mempool/MempoolService.cs
@@ -79,9 +79,7 @@ namespace WalletWasabi.Blockchain.Mempool
var found = BroadcastStore.FirstOrDefault(x => x.TransactionId == transactionHash);
entry = found;
- return found is null
- ? false
- : true;
+ return !(found is null);
}
}

MODIFY
WalletWasabi/Nito/Collections/Deque.cs
WalletWasabi/Nito/Collections/Deque.cs
@@ -408,7 +408,7 @@ namespace Nito.Collections
bool IList.Contains(object value)
{
- return IsT(value) ? ((ICollection<T>)this).Contains((T)value) : false;
+ return IsT(value) && ((ICollection<T>)this).Contains((T)value);
}
int IList.IndexOf(object value)

Simplify conditional expression