Use correct factory
MODIFY
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
WalletWasabi.Fluent/ViewModels/MainViewModel.cs
@@ -75,7 +75,7 @@ namespace WalletWasabi.Fluent.ViewModels
_global.BitcoinStore,
_global.LegalChecker,
_global.TransactionBroadcaster,
- _global.BackendHttpClientFactory);
+ _global.ExternalHttpClientFactory);
_addWalletPage = new AddWalletPageViewModel(
_walletManagerViewModel,

MODIFY
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
@@ -31,7 +31,7 @@ namespace WalletWasabi.Fluent.ViewModels
private readonly Config _config;
private readonly UiConfig _uiConfig;
private readonly TransactionBroadcaster _transactionBroadcaster;
- private readonly HttpClientFactory _httpClientFactory;
+ private readonly HttpClientFactory _externalHttpClientFactory;
private NavBarItemViewModel? _currentSelection;
[AutoNotify] private WalletViewModelBase? _selectedWallet;
[AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isLoadingWallet;
@@ -42,7 +42,7 @@ namespace WalletWasabi.Fluent.ViewModels
[AutoNotify] private bool _anyWalletStarted;
public WalletManagerViewModel(WalletManager walletManager, UiConfig uiConfig, Config config, BitcoinStore bitcoinStore,
- LegalChecker legalChecker, TransactionBroadcaster broadcaster, HttpClientFactory httpClientFactory)
+ LegalChecker legalChecker, TransactionBroadcaster broadcaster, HttpClientFactory externalHttpClientFactory)
{
WalletManager = walletManager;
BitcoinStore = bitcoinStore;
@@ -56,7 +56,7 @@ namespace WalletWasabi.Fluent.ViewModels
_config = config;
_uiConfig = uiConfig;
_transactionBroadcaster = broadcaster;
- _httpClientFactory = httpClientFactory;
+ _externalHttpClientFactory = externalHttpClientFactory;
static Func<WalletViewModelBase, bool> SelectedWalletFilter(WalletViewModelBase? selected)
{
@@ -273,7 +273,7 @@ namespace WalletWasabi.Fluent.ViewModels
if (wallet.KeyManager.IsHardwareWallet || !wallet.KeyManager.IsWatchOnly)
{
- actions.Add(new SendViewModel(walletViewModel, _transactionBroadcaster, _config, _uiConfig, _httpClientFactory));
+ actions.Add(new SendViewModel(walletViewModel, _transactionBroadcaster, _config, _uiConfig, _externalHttpClientFactory));
}
actions.Add(new ReceiveViewModel(walletViewModel, WalletManager, BitcoinStore));

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -71,7 +71,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
private double _lastXAxisCurrentValue;
private FeeRate _feeRate;
- public SendViewModel(WalletViewModel walletVm, TransactionBroadcaster broadcaster, Config config, UiConfig uiConfig, HttpClientFactory httpClientFactory) : base(NavigationMode.Normal)
+ public SendViewModel(WalletViewModel walletVm, TransactionBroadcaster broadcaster, Config config, UiConfig uiConfig, HttpClientFactory externalHttpClientFactory) : base(NavigationMode.Normal)
{
_to = "";
_owner = walletVm;
@@ -111,7 +111,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
{
if (endPoint is { })
{
- _transactionInfo.PayJoinClient = GetPayjoinClient(endPoint, config, httpClientFactory);
+ _transactionInfo.PayJoinClient = GetPayjoinClient(endPoint, config, externalHttpClientFactory);
IsPayJoin = true;
}
else
@@ -245,7 +245,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
}
}
- private IPayjoinClient? GetPayjoinClient(string endPoint, Config config, HttpClientFactory httpClientFactory)
+ private IPayjoinClient? GetPayjoinClient(string endPoint, Config config, HttpClientFactory externalHttpClientFactory)
{
if (!string.IsNullOrWhiteSpace(endPoint) &&
Uri.IsWellFormedUriString(endPoint, UriKind.Absolute))
@@ -266,7 +266,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
}
}
- IHttpClient httpClient = httpClientFactory.NewHttpClient(() => payjoinEndPointUri, isolateStream: false);
+ IHttpClient httpClient = externalHttpClientFactory.NewHttpClient(() => payjoinEndPointUri, isolateStream: false);
return new PayjoinClient(payjoinEndPointUri, httpClient);
}

Use correct factory