Extract buildtx method.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -196,7 +196,12 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
FeeRateCommand = ReactiveCommand.Create(ChangeFeeRateDisplay);
- BuildTransactionCommand = ReactiveCommand.CreateFromTask(async () =>
+ BuildTransactionCommand = ReactiveCommand.CreateFromTask(async () => await BuildTransactionAsync(),
+ (this).WhenAny(x => x.IsMax, x => x.Amount, x => x.Address, x => x.IsBusy,
+ (isMax, amount, address, busy) => (isMax.Value || !string.IsNullOrWhiteSpace(amount.Value)) && !string.IsNullOrWhiteSpace(Address) && !IsBusy));
+ }
+
+ private async Task BuildTransactionAsync()
{
const string buildingTransactionStatusText = "Building transaction...";
const string signingTransactionStatusText = "Signing transaction...";
@@ -356,9 +361,6 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
MainWindowViewModel.Instance.StatusBar.RemoveStatus(buildingTransactionStatusText, signingTransactionStatusText, broadcastingTransactionStatusText);
IsBusy = false;
}
- },
- this.WhenAny(x => x.IsMax, x => x.Amount, x => x.Address, x => x.IsBusy,
- (isMax, amount, address, busy) => (isMax.Value || !string.IsNullOrWhiteSpace(amount.Value)) && !string.IsNullOrWhiteSpace(Address) && !IsBusy));
}
private async Task<bool> TryRefreshHardwareWalletInfoAsync(KeyManager keyManager)

Extract buildtx method.