Skip to content

Commit

Permalink
馃敡 chore(Constants.cs): add AMBOSS_ENDPOINT constant
Browse files Browse the repository at this point in the history
馃殌 feat(Channels.razor): add link to AMBOSS search page for channel id
馃敡 chore(launchSettings.json): update MEMPOOL_ENDPOINT and add AMBOSS_ENDPOINT constant
  • Loading branch information
markettes committed Jun 20, 2023
1 parent b54c83e commit 603b4e9
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/Helpers/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class Constants
public static readonly string? FUNDSMANAGER_ENDPOINT;
public static readonly string? COINGECKO_ENDPOINT;
public static readonly string? MEMPOOL_ENDPOINT;
public static readonly string? AMBOSS_ENDPOINT;
public static readonly string? REMOTE_SIGNER_ENDPOINT;

// Credentials
Expand Down Expand Up @@ -70,9 +71,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 @@ -121,6 +122,8 @@ static Constants()

MEMPOOL_ENDPOINT = Environment.GetEnvironmentVariable("MEMPOOL_ENDPOINT");

AMBOSS_ENDPOINT = Environment.GetEnvironmentVariable("AMBOSS_ENDPOINT");

// Credentials
NBXPLORER_BTCRPCUSER = Environment.GetEnvironmentVariable("NBXPLORER_BTCRPCUSER");

Expand Down Expand Up @@ -198,11 +201,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
9 changes: 8 additions & 1 deletion src/Pages/Channels.razor
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@using System.Security.Claims
@using Humanizer
@using NBitcoin
@using Polly
@using Channel = FundsManager.Data.Models.Channel
@attribute [Authorize(Roles = "FinanceManager, NodeManager, Superadmin")]
<PageTitle>Active Channels</PageTitle>
Expand Down Expand Up @@ -153,7 +154,13 @@
</DataGridColumn>
<DataGridColumn TItem="Channel" Field="@nameof(Channel.CreationDatetime)" Caption="@nameof(Channel.CreationDatetime).Humanize(LetterCasing.Sentence)" Sortable="true"/>
<DataGridColumn TItem="Channel" Field="@nameof(Channel.UpdateDatetime)" Caption="@nameof(Channel.UpdateDatetime).Humanize(LetterCasing.Sentence)" Sortable="true"/>

<DataGridColumn TItem="Channel" Field="@nameof(Channel.ChanId)" Caption="Channel Id" Sortable="false">
<DisplayTemplate>
<a href="@(Constants.AMBOSS_ENDPOINT + "/search?term=" + context.ChanId)" target="_blank">
@context.ChanId
</a>
</DisplayTemplate>
</DataGridColumn>
</DataGridColumns>
</DataGrid>
</Column>
Expand Down
3 changes: 2 additions & 1 deletion src/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"ENABLE_HW_SUPPORT": "true",
"MINIMUM_WITHDRAWAL_BTC_AMOUNT": "0.001",
"MINIMUM_CHANNEL_CAPACITY_SATS": "20000",
"MEMPOOL_ENDPOINT": "https://mempool-staging.elenpay.tech",
"MEMPOOL_ENDPOINT": "https://mempool.space",
"AMBOSS_ENDPOINT": "https://amboss.space",
"TRANSACTION_CONFIRMATION_MINIMUM_BLOCKS": "6",
"MONITOR_WITHDRAWALS_CRON": "0 */1 * * * ?",
"COINGECKO_ENDPOINT": "https://pro-api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=bitcoin",
Expand Down

0 comments on commit 603b4e9

Please sign in to comment.