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

Improve for loop and remove unnecessary assignment #1894

Merged
merged 2 commits into from Jul 18, 2019
Merged
Show file tree
Hide file tree
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
11 changes: 5 additions & 6 deletions WalletWasabi.Gui/Tabs/WalletManager/WalletManagerViewModel.cs
Expand Up @@ -148,15 +148,14 @@ private async Task RefreshHardwareWalletListAsync()
LoadWalletViewModelHardware.SetWarningMessage("Log into your Bitcoin account on your Ledger. If you're already logged in, log out and log in again.");
continue;
}
else if (hwis.Any(x => x.Type == HardwareWalletType.Ledger && x.Ready))

if (hwis.Any(x => x.Type == HardwareWalletType.Ledger && x.Ready))
{
LoadWalletViewModelHardware.SetWarningMessage("To have a smooth user experience consider turning off your Ledger screensaver.");
break;
}
else
{
break;
}

break;

//foreach (var hwi in hwis)
//{
// // https://github.com/zkSNACKs/WalletWasabi/issues/1344#issuecomment-484607454
Expand Down
4 changes: 2 additions & 2 deletions WalletWasabi/Mono/CommandSet.cs
@@ -1,4 +1,4 @@
//
//
// Options.cs
//
// Authors:
Expand Down Expand Up @@ -403,7 +403,7 @@ private static void ExtractToken(ref string input, out string rest)
continue;
}

for (int j = i; j < top; j++)
for (int j = i + 1; j < top; j++)
nopara73 marked this conversation as resolved.
Show resolved Hide resolved
{
if (char.IsWhiteSpace(input[j]))
{
Expand Down
6 changes: 1 addition & 5 deletions WalletWasabi/Services/UtxoReferee.cs
Expand Up @@ -104,11 +104,7 @@ public async Task BanUtxosAsync(int severity, DateTimeOffset timeOfBan, bool for
}

var isNoted = true;
if (forceNoted)
{
isNoted = true;
}
else
if (!forceNoted)
{
if (RoundConfig.DosNoteBeforeBan.Value)
{
Expand Down