mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Decouple DefaultRates from BTCPayNetwork (#5974)
This commit is contained in:
@@ -52,6 +52,7 @@ namespace BTCPayServer.Controllers
|
||||
readonly BTCPayNetworkProvider _NetworkProvider;
|
||||
private readonly PayoutMethodHandlerDictionary _payoutHandlers;
|
||||
private readonly PaymentMethodHandlerDictionary _handlers;
|
||||
private readonly IEnumerable<DefaultRates> _defaultRates;
|
||||
private readonly ApplicationDbContextFactory _dbContextFactory;
|
||||
private readonly PullPaymentHostedService _paymentHostedService;
|
||||
private readonly LanguageService _languageService;
|
||||
@@ -93,6 +94,7 @@ namespace BTCPayServer.Controllers
|
||||
AppService appService,
|
||||
IFileService fileService,
|
||||
UriResolver uriResolver,
|
||||
IEnumerable<DefaultRates> defaultRates,
|
||||
IAuthorizationService authorizationService,
|
||||
TransactionLinkProviders transactionLinkProviders,
|
||||
Dictionary<PaymentMethodId, IPaymentModelExtension> paymentModelExtensions,
|
||||
@@ -123,6 +125,7 @@ namespace BTCPayServer.Controllers
|
||||
_viewProvider = viewProvider;
|
||||
_fileService = fileService;
|
||||
_uriResolver = uriResolver;
|
||||
_defaultRates = defaultRates;
|
||||
_appService = appService;
|
||||
}
|
||||
|
||||
@@ -294,7 +297,7 @@ namespace BTCPayServer.Controllers
|
||||
|
||||
private async Task FetchRates(InvoiceCreationContext context, CancellationToken cancellationToken)
|
||||
{
|
||||
var rateRules = context.StoreBlob.GetRateRules(_NetworkProvider);
|
||||
var rateRules = context.StoreBlob.GetRateRules(_defaultRates);
|
||||
await context.FetchingRates(_RateProvider, rateRules, cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user