initialse viewmodel method.
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -322,24 +322,13 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
return null;
}
- protected override void OnNavigatedTo(bool isInHistory, CompositeDisposable disposables)
- {
- base.OnNavigatedTo(isInHistory, disposables);
-
- Observable
- .FromEventPattern(_wallet.FeeProvider, nameof(_wallet.FeeProvider.AllFeeEstimateChanged))
- .Subscribe(_ => AdjustFeeAvailable = !TransactionFeeHelper.AreTransactionFeesEqual(_wallet))
- .DisposeWith(disposables);
-
- if (!isInHistory)
- {
- RxApp.MainThreadScheduler.Schedule(async () =>
+ private async Task InitialseViewModelAsync()
{
if (await InitialiseTransactionAsync())
{
var initialTransaction = await BuildTransactionAsync();
- if (initialTransaction is { })
+ if (initialTransaction is { } && _transaction is { })
{
UpdateTransaction(CurrentTransactionSummary, initialTransaction);
@@ -364,7 +353,20 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
{
Navigate().Back();
}
- });
+ }
+
+ protected override void OnNavigatedTo(bool isInHistory, CompositeDisposable disposables)
+ {
+ base.OnNavigatedTo(isInHistory, disposables);
+
+ Observable
+ .FromEventPattern(_wallet.FeeProvider, nameof(_wallet.FeeProvider.AllFeeEstimateChanged))
+ .Subscribe(_ => AdjustFeeAvailable = !TransactionFeeHelper.AreTransactionFeesEqual(_wallet))
+ .DisposeWith(disposables);
+
+ if (!isInHistory)
+ {
+ RxApp.MainThreadScheduler.Schedule(async ()=> await InitialseViewModelAsync());
}
}

initialse viewmodel method.