Use expression body for lambdas
MODIFY
WalletWasabi.Fluent/Converters/MoneyConverters.cs
WalletWasabi.Fluent/Converters/MoneyConverters.cs
@@ -6,13 +6,10 @@ namespace WalletWasabi.Fluent.Converters
public static class MoneyConverters
{
public static readonly IValueConverter MoneyToString =
- new FuncValueConverter<Money?, string>(x =>
- {
- return x switch
+ new FuncValueConverter<Money?, string>(x => x switch
{
null => "Unknown",
{ } => x.ToString(fplus: false, trimExcessZero: true),
- };
});
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/AddWalletPageViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/AddWalletPageViewModel.cs
@@ -68,7 +68,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
.Subscribe(x => OptionsEnabled = x && !Validations.Any);
RecoverWalletCommand = ReactiveCommand.Create(
- () => { Navigate().To(new RecoverWalletViewModel(WalletName, network, walletManager)); });
+ () => Navigate().To(new RecoverWalletViewModel(WalletName, network, walletManager)));
ImportWalletCommand = ReactiveCommand.CreateFromTask(async () =>
{
@@ -93,10 +93,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
}
});
- ConnectHardwareWalletCommand = ReactiveCommand.Create(() =>
- {
- Navigate().To(new ConnectHardwareWalletViewModel(WalletName, network, walletManager));
- });
+ ConnectHardwareWalletCommand = ReactiveCommand.Create(() => Navigate().To(new ConnectHardwareWalletViewModel(WalletName, network, walletManager)));
CreateWalletCommand = ReactiveCommand.CreateFromTask(
async () =>

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/Create/ConfirmRecoveryWordsViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/Create/ConfirmRecoveryWordsViewModel.cs
@@ -32,10 +32,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet.Create
.Select(_ => confirmationWordsSourceList.Items.All(x => x.IsConfirmed));
NextCommand = ReactiveCommand.Create(
- () =>
- {
- Navigate().To(new AddedWalletPageViewModel(walletManager, keyManager));
- },
+ () => Navigate().To(new AddedWalletPageViewModel(walletManager, keyManager)),
nextCommandCanExecute);
if (_isSkipEnable)

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/DetectedHardwareWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/DetectedHardwareWalletViewModel.cs
@@ -49,10 +49,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet.HardwareWallet
IsBusy = false;
});
- NoCommand = ReactiveCommand.Create(() =>
- {
- Navigate().Back();
- });
+ NoCommand = ReactiveCommand.Create(() => Navigate().Back());
}
public string WalletName { get; }

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/TermsAndConditionsViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/TermsAndConditionsViewModel.cs
@@ -26,10 +26,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
});
NextCommand = ReactiveCommand.Create(
- () =>
- {
- Navigate().BackTo(next);
- },
+ () => Navigate().BackTo(next),
this.WhenAnyValue(x => x.IsAgreed).ObserveOn(RxApp.MainThreadScheduler));
}

MODIFY
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/SettingsPageViewModel.cs
@@ -45,7 +45,7 @@ namespace WalletWasabi.Fluent.ViewModels.Settings
SettingsTabViewModelBase.RestartNeeded += OnRestartNeeded;
- Disposable.Create(() => { SettingsTabViewModelBase.RestartNeeded -= OnRestartNeeded; })
+ Disposable.Create(() => SettingsTabViewModelBase.RestartNeeded -= OnRestartNeeded)
.DisposeWith(disposable);
}
}

Use expression body for lambdas