call BnB cancellation when it is safe
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -425,8 +425,6 @@ public partial class TransactionPreviewViewModel : RoutableViewModel
private async Task OnConfirmAsync()
{
- _cancellationTokenSource.Cancel();
-
var transaction = await Task.Run(() => TransactionHelpers.BuildTransaction(_wallet, _info, _destination));
var transactionAuthorizationInfo = new TransactionAuthorizationInfo(transaction);
var authResult = await AuthorizeAsync(transactionAuthorizationInfo);
@@ -439,6 +437,7 @@ public partial class TransactionPreviewViewModel : RoutableViewModel
var finalTransaction =
await GetFinalTransactionAsync(transactionAuthorizationInfo.Transaction, _info);
await SendTransactionAsync(finalTransaction);
+ _cancellationTokenSource.Cancel();
Navigate().To(new SendSuccessViewModel(_wallet, finalTransaction));
}
catch (Exception ex)

call BnB cancellation when it is safe