cope with back navigation during send process.
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/OptimisePrivacyViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/OptimisePrivacyViewModel.cs
@@ -44,11 +44,13 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
}, this.WhenAnyValue(x => x.SelectedPrivacySuggestion).Select(x => x is { }));
}
- protected override void OnNavigatedTo(bool inStack, CompositeDisposable disposables)
+ protected override void OnNavigatedTo(bool inHistory, CompositeDisposable disposables)
{
IsBusy = true;
- base.OnNavigatedTo(inStack, disposables);
+ base.OnNavigatedTo(inHistory, disposables);
+ if (!inHistory)
+ {
RxApp.MainThreadScheduler.Schedule(async () =>
{
var intent = new PaymentIntent(
@@ -98,3 +100,4 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
}
}
}
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -242,8 +242,15 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
return result;
}
- protected override void OnNavigatedTo(bool isInHistory, CompositeDisposable disposables)
+ protected override void OnNavigatedTo(bool inHistory, CompositeDisposable disposables)
{
+ if (!inHistory)
+ {
+ _to = "";
+ _amountBtc = 0;
+ Labels.Clear();
+ }
+
_owner.Wallet.Synchronizer.WhenAnyValue(x => x.UsdExchangeRate)
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(x => ExchangeRate = x)
@@ -270,7 +277,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
UpdateFeeEstimates(_owner.Wallet.Synchronizer.AllFeeEstimate.Estimations);
}
- base.OnNavigatedTo(isInHistory, disposables);
+ base.OnNavigatedTo(inHistory, disposables);
}
private static readonly string[] TestNetXAxisLabels =

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/TransactionPreviewView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/TransactionPreviewView.axaml
x:Class="WalletWasabi.Fluent.Views.Wallets.Send.TransactionPreviewView">
<c:ContentArea Title="Send" Caption=""
HorizontalAlignment="Left"
- EnableCancel="False"
+ EnableBack="True"
+ EnableCancel="True"
EnableNext="True"
NextContent="Confirm"
IsBusy="{Binding IsBusy}"

cope with back navigation during send process.