From 29f662f87c0b49292834ccdcb7fad6e4e0fcbd0d Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 5 May 2018 22:05:22 +0900 Subject: [PATCH 1/4] bump NBXplorer --- BTCPayServer.Tests/docker-compose.yml | 2 +- BTCPayServer/BTCPayServer.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BTCPayServer.Tests/docker-compose.yml b/BTCPayServer.Tests/docker-compose.yml index 0ea276438..1e31eae35 100644 --- a/BTCPayServer.Tests/docker-compose.yml +++ b/BTCPayServer.Tests/docker-compose.yml @@ -46,7 +46,7 @@ services: - lightning-charged nbxplorer: - image: nicolasdorier/nbxplorer:1.0.2.2 + image: nicolasdorier/nbxplorer:1.0.2.3 ports: - "32838:32838" expose: diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index ce03eb9b7..558d120bc 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -43,7 +43,7 @@ - + From 744734a6a15f071fc513388195d08c6a461567ef Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 5 May 2018 22:19:36 +0900 Subject: [PATCH 2/4] Returns fallback feerate for coins not supporting fee rate query in NBXplorer --- BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs b/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs index f5f1f8d3b..7a55d51d5 100644 --- a/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs +++ b/BTCPayServer/Services/Fees/NBxplorerFeeProvider.cs @@ -39,6 +39,8 @@ namespace BTCPayServer.Services.Fees ExplorerClient _ExplorerClient; public async Task GetFeeRateAsync() { + if (!_ExplorerClient.Network.SupportEstimatesSmartFee) + return _Factory.Fallback; try { return (await _ExplorerClient.GetFeeRateAsync(_Factory.BlockTarget).ConfigureAwait(false)).FeeRate; From 0290a5eacd315cd4fde8eae90c67a0aaa43921e3 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 5 May 2018 22:46:07 +0900 Subject: [PATCH 3/4] update clightning --- BTCPayServer.Tests/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer.Tests/docker-compose.yml b/BTCPayServer.Tests/docker-compose.yml index 1e31eae35..549501959 100644 --- a/BTCPayServer.Tests/docker-compose.yml +++ b/BTCPayServer.Tests/docker-compose.yml @@ -89,7 +89,7 @@ services: - "bitcoin_datadir:/data" customer_lightningd: - image: nicolasdorier/clightning:0.0.0.11-dev + image: nicolasdorier/clightning:0.0.0.12-dev environment: EXPOSE_TCP: "true" LIGHTNINGD_OPT: | From 3f4ec9ba80b571f3a2fd47355e7cf24c369c6e84 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 5 May 2018 22:59:53 +0900 Subject: [PATCH 4/4] simplify currency parsing if _ is forgotten and there is 6 letters --- BTCPayServer/Rating/CurrencyPair.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BTCPayServer/Rating/CurrencyPair.cs b/BTCPayServer/Rating/CurrencyPair.cs index c9a6c6e9e..adeacd603 100644 --- a/BTCPayServer/Rating/CurrencyPair.cs +++ b/BTCPayServer/Rating/CurrencyPair.cs @@ -45,6 +45,11 @@ namespace BTCPayServer.Rating var currencyPair = splitted[0]; if (currencyPair.Length < 6 || currencyPair.Length > 10) return false; + if (currencyPair.Length == 6) + { + value = new CurrencyPair(currencyPair.Substring(0,3), currencyPair.Substring(3, 3)); + return true; + } for (int i = 3; i < 5; i++) { var potentialCryptoName = currencyPair.Substring(0, i);