mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
29 lines
616 B
C#
29 lines
616 B
C#
using System.Threading.Tasks;
|
|
using NBitcoin;
|
|
|
|
namespace BTCPayServer.Services.Fees
|
|
{
|
|
public class FixedFeeProvider : IFeeProvider, IFeeProviderFactory
|
|
{
|
|
public FixedFeeProvider(FeeRate feeRate)
|
|
{
|
|
FeeRate = feeRate;
|
|
}
|
|
|
|
public FeeRate FeeRate
|
|
{
|
|
get; set;
|
|
}
|
|
|
|
public IFeeProvider CreateFeeProvider(BTCPayNetworkBase network)
|
|
{
|
|
return new FixedFeeProvider(FeeRate);
|
|
}
|
|
|
|
public Task<FeeRate> GetFeeRateAsync(int blockTarget)
|
|
{
|
|
return Task.FromResult(FeeRate);
|
|
}
|
|
}
|
|
}
|