make sure fee rate is set before coinselection
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -227,29 +227,29 @@ public partial class TransactionPreviewViewModel : RoutableViewModel
private async Task<bool> InitialiseTransactionAsync()
{
- if (!_info.Coins.Any())
+ if (_info.FeeRate == FeeRate.Zero)
{
- var privacyControlDialogResult =
- await NavigateDialogAsync(new PrivacyControlViewModel(_wallet, _info, Transaction?.SpentCoins, isSilent: true));
- if (privacyControlDialogResult.Kind == DialogResultKind.Normal &&
- privacyControlDialogResult.Result is { } coins)
+ var feeDialogResult = await NavigateDialogAsync(new SendFeeViewModel(_wallet, _info, true));
+ if (feeDialogResult.Kind == DialogResultKind.Normal && feeDialogResult.Result is { } newFeeRate)
{
- _info.Coins = coins;
+ _info.FeeRate = newFeeRate;
}
- else if (privacyControlDialogResult.Kind != DialogResultKind.Normal)
+ else
{
return false;
}
}
- if (_info.FeeRate == FeeRate.Zero)
+ if (!_info.Coins.Any())
{
- var feeDialogResult = await NavigateDialogAsync(new SendFeeViewModel(_wallet, _info, true));
- if (feeDialogResult.Kind == DialogResultKind.Normal && feeDialogResult.Result is { } newFeeRate)
+ var privacyControlDialogResult =
+ await NavigateDialogAsync(new PrivacyControlViewModel(_wallet, _info, Transaction?.SpentCoins, isSilent: true));
+ if (privacyControlDialogResult.Kind == DialogResultKind.Normal &&
+ privacyControlDialogResult.Result is { } coins)
{
- _info.FeeRate = newFeeRate;
+ _info.Coins = coins;
}
- else
+ else if (privacyControlDialogResult.Kind != DialogResultKind.Normal)
{
return false;
}

make sure fee rate is set before coinselection