Returns fallback feerate for coins not supporting fee rate query in NBXplorer

This commit is contained in:
nicolas.dorier 2018-05-05 22:19:36 +09:00
parent 29f662f87c
commit 744734a6a1

View file

@ -39,6 +39,8 @@ namespace BTCPayServer.Services.Fees
ExplorerClient _ExplorerClient;
public async Task<FeeRate> GetFeeRateAsync()
{
if (!_ExplorerClient.Network.SupportEstimatesSmartFee)
return _Factory.Fallback;
try
{
return (await _ExplorerClient.GetFeeRateAsync(_Factory.BlockTarget).ConfigureAwait(false)).FeeRate;