Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fee selection added for channel requests operations #194

Merged
merged 8 commits into from
Jun 20, 2023
2 changes: 2 additions & 0 deletions src/Data/Models/ChannelOperationRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ public decimal Amount
/// </summary>
public string? ClosingReason { get; set; }

public decimal? FeeRate { get; set; }

#region Relationships

public ICollection<ChannelOperationRequestPSBT> ChannelOperationRequestPsbts { get; set; }
Expand Down
9 changes: 4 additions & 5 deletions src/Helpers/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public class Constants
public static readonly bool ENABLE_REMOTE_SIGNER;
public static readonly bool PUSH_NOTIFICATIONS_ONESIGNAL_ENABLED;
public static readonly bool ENABLE_HW_SUPPORT;
public static readonly bool FEE_SELECTION_ENABLED = false; // Incomplete feature, remove this line when it's ready

// Connections
public static readonly string POSTGRES_CONNECTIONSTRING = "Host=localhost;Port=5432;Database=fundsmanager;Username=rw_dev;Password=rw_dev";
Expand Down Expand Up @@ -70,9 +69,9 @@ public class Constants
public static readonly long ANCHOR_CLOSINGS_MINIMUM_SATS;
public static readonly string DEFAULT_DERIVATION_PATH = "48'/1'";
public static readonly int SESSION_TIMEOUT_MILLISECONDS = 3_600_000;

//Sat/vb ratio
public static decimal MIN_SAT_PER_VB_RATIO = 0.9m;
public static decimal MIN_SAT_PER_VB_RATIO = 0.9m;
public static decimal MAX_SAT_PER_VB_RATIO = 2.0m;
/// <summary>
/// Max ratio of the tx total input sum that could be used as fee
Expand Down Expand Up @@ -198,11 +197,11 @@ static Constants()

var timeout = Environment.GetEnvironmentVariable("SESSION_TIMEOUT_MILLISECONDS");
if (timeout != null) SESSION_TIMEOUT_MILLISECONDS = int.Parse(timeout);

//Sat/vb ratio
var minSatPerVbRatioEnv = Environment.GetEnvironmentVariable("MIN_SAT_PER_VB_RATIO");
MIN_SAT_PER_VB_RATIO = minSatPerVbRatioEnv!= null ? decimal.Parse(minSatPerVbRatioEnv) : MIN_SAT_PER_VB_RATIO;

var maxSatPerVbRatioEnv = Environment.GetEnvironmentVariable("MAX_SAT_PER_VB_RATIO");
MAX_SAT_PER_VB_RATIO = maxSatPerVbRatioEnv!= null ? decimal.Parse(maxSatPerVbRatioEnv) : MAX_SAT_PER_VB_RATIO;

Expand Down
Loading
Loading