mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 14:04:12 +01:00
Select 1 hour as default fee rate
This commit is contained in:
parent
2714907aef
commit
2fa7745886
2 changed files with 10 additions and 3 deletions
|
@ -512,9 +512,9 @@ namespace BTCPayServer.Controllers
|
|||
|
||||
await Task.WhenAll(recommendedFees);
|
||||
model.RecommendedSatoshiPerByte =
|
||||
recommendedFees.Select(tuple => tuple.Result).Where(option => option != null).ToList();
|
||||
recommendedFees.Select(tuple => tuple.GetAwaiter().GetResult()).Where(option => option != null).ToList();
|
||||
|
||||
model.FeeSatoshiPerByte = model.RecommendedSatoshiPerByte.LastOrDefault()?.FeeRate;
|
||||
model.FeeSatoshiPerByte = recommendedFees[1].GetAwaiter().GetResult()?.FeeRate;
|
||||
model.SupportRBF = network.SupportRBF;
|
||||
|
||||
model.CryptoDivisibility = network.Divisibility;
|
||||
|
|
|
@ -8,8 +8,15 @@ using NBitcoin;
|
|||
|
||||
namespace BTCPayServer.Services.Fees
|
||||
{
|
||||
public class FallbackFeeProvider(IFeeProvider[] Providers) : IFeeProvider
|
||||
public class FallbackFeeProvider : IFeeProvider
|
||||
{
|
||||
public FallbackFeeProvider(IFeeProvider[] providers)
|
||||
{
|
||||
Providers = providers;
|
||||
}
|
||||
|
||||
public IFeeProvider[] Providers { get; }
|
||||
|
||||
public async Task<FeeRate> GetFeeRateAsync(int blockTarget = 20)
|
||||
{
|
||||
for (int i = 0; i < Providers.Length; i++)
|
||||
|
|
Loading…
Add table
Reference in a new issue