diff --git a/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs b/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs index 679a907c8..bd01ab410 100644 --- a/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs +++ b/BTCPayServer/Payments/Bitcoin/NBXplorerListener.cs @@ -361,7 +361,7 @@ namespace BTCPayServer.Payments.Bitcoin invoice = (await UpdatePaymentStates(wallet, invoice.Id)); if (invoice == null) return null; - var paymentMethod = invoice.GetPaymentMethod(wallet.Network, PaymentTypes.BTCLike, _ExplorerClients.NetworkProviders); + var paymentMethod = invoice.GetPaymentMethod(wallet.Network, PaymentTypes.BTCLike); if (paymentMethod != null && paymentMethod.GetPaymentMethodDetails() is BitcoinLikeOnChainPaymentMethod btc && btc.GetDepositAddress(wallet.Network.NBitcoinNetwork).ScriptPubKey == paymentData.Output.ScriptPubKey && diff --git a/BTCPayServer/Services/Apps/AppService.cs b/BTCPayServer/Services/Apps/AppService.cs index 3a9e85d45..e9cfd5d14 100644 --- a/BTCPayServer/Services/Apps/AppService.cs +++ b/BTCPayServer/Services/Apps/AppService.cs @@ -37,11 +37,9 @@ namespace BTCPayServer.Services.Apps CurrencyNameTable _Currencies; private readonly StoreRepository _storeRepository; private readonly HtmlSanitizer _HtmlSanitizer; - private readonly BTCPayNetworkProvider _Networks; public CurrencyNameTable Currencies => _Currencies; public AppService(ApplicationDbContextFactory contextFactory, InvoiceRepository invoiceRepository, - BTCPayNetworkProvider networks, CurrencyNameTable currencies, StoreRepository storeRepository, HtmlSanitizer htmlSanitizer) @@ -51,7 +49,6 @@ namespace BTCPayServer.Services.Apps _Currencies = currencies; _storeRepository = storeRepository; _HtmlSanitizer = htmlSanitizer; - _Networks = networks; } public async Task GetAppInfo(string appId) @@ -325,7 +322,7 @@ namespace BTCPayServer.Services.Apps var paymentMethodContribution = new Contribution(); paymentMethodContribution.PaymentMehtodId = pay.GetPaymentMethodId(); paymentMethodContribution.Value = pay.GetCryptoPaymentData().GetValue() - pay.NetworkFee; - var rate = p.GetPaymentMethod(paymentMethodContribution.PaymentMehtodId, _Networks).Rate; + var rate = p.GetPaymentMethod(paymentMethodContribution.PaymentMehtodId).Rate; paymentMethodContribution.CurrencyValue = rate * paymentMethodContribution.Value; return paymentMethodContribution; })