@@ -57,7 +57,6 @@ public abstract class SendControlViewModel : WasabiDocumentTabViewModel, IWallet
57
57
private bool _isBusy ;
58
58
private bool _isHardwareBusy ;
59
59
private bool _isCustomFee ;
60
- private ObservableAsPropertyHelper < bool > _isEstimateAvailabe ;
61
60
62
61
private const string WaitingForHardwareWalletButtonTextString = "Waiting for Hardware Wallet..." ;
63
62
@@ -554,7 +553,7 @@ public bool IsCustomFee
554
553
private set => this . RaiseAndSetIfChanged ( ref _isCustomFee , value ) ;
555
554
}
556
555
557
- public bool IsEstimateAvailable => _isEstimateAvailabe ? . Value ?? false ;
556
+ public bool IsEstimateAvailable => Global . FeeProviders ? . AllFeeEstimate is { } ;
558
557
559
558
public string AmountWatermarkText
560
559
{
@@ -872,12 +871,14 @@ private void ValidateCustomChangeAddress(IValidationErrors errors)
872
871
873
872
public override void OnOpen ( CompositeDisposable disposables )
874
873
{
875
- _isEstimateAvailabe = Observable
874
+ Observable
876
875
. FromEventPattern < AllFeeEstimate > ( Global . FeeProviders , nameof ( Global . FeeProviders . AllFeeEstimateChanged ) )
877
- . Select ( x => x . EventArgs is { } )
878
- . ToProperty ( this , x => x . IsEstimateAvailable , scheduler : RxApp . MainThreadScheduler , initialValue : Global . FeeProviders ? . AllFeeEstimate is { } )
876
+ . ObserveOn ( RxApp . MainThreadScheduler )
877
+ . Subscribe ( _ => this . RaisePropertyChanged ( nameof ( IsEstimateAvailable ) ) )
879
878
. DisposeWith ( disposables ) ;
880
879
880
+ this . RaisePropertyChanged ( nameof ( IsEstimateAvailable ) ) ;
881
+
881
882
Observable
882
883
. FromEventPattern < AllFeeEstimate > ( Global . FeeProviders , nameof ( Global . FeeProviders . AllFeeEstimateChanged ) )
883
884
. ObserveOn ( RxApp . MainThreadScheduler )
0 commit comments