mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Add Bitcoin Only Build
This commit is contained in:
@@ -49,8 +49,10 @@ jobs:
|
|||||||
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
||||||
#
|
#
|
||||||
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f amd64.Dockerfile .
|
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f amd64.Dockerfile .
|
||||||
|
sudo docker build --pull --build-arg CONFIGURATION_NAME=Altcoins-Release -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 -f amd64.Dockerfile .
|
||||||
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
||||||
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-amd64
|
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-amd64
|
||||||
|
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64
|
||||||
|
|
||||||
arm32v7:
|
arm32v7:
|
||||||
machine:
|
machine:
|
||||||
@@ -63,8 +65,10 @@ jobs:
|
|||||||
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
||||||
#
|
#
|
||||||
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f arm32v7.Dockerfile .
|
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f arm32v7.Dockerfile .
|
||||||
|
sudo docker build --pull --build-arg CONFIGURATION_NAME=Altcoins-Release -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 -f arm32v7.Dockerfile .
|
||||||
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
||||||
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm32v7
|
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm32v7
|
||||||
|
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7
|
||||||
|
|
||||||
arm64v8:
|
arm64v8:
|
||||||
machine:
|
machine:
|
||||||
@@ -77,8 +81,10 @@ jobs:
|
|||||||
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
||||||
#
|
#
|
||||||
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 -f arm64v8.Dockerfile .
|
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 -f arm64v8.Dockerfile .
|
||||||
|
sudo docker build --build-arg CONFIGURATION_NAME=Altcoins-Release --pull -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8 -f arm64v8.Dockerfile .
|
||||||
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
||||||
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm64v8
|
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm64v8
|
||||||
|
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8
|
||||||
|
|
||||||
multiarch:
|
multiarch:
|
||||||
machine:
|
machine:
|
||||||
@@ -99,6 +105,13 @@ jobs:
|
|||||||
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 --os linux --arch arm --variant v7
|
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 --os linux --arch arm --variant v7
|
||||||
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 --os linux --arch arm64 --variant v8
|
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 --os linux --arch arm64 --variant v8
|
||||||
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG -p
|
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG -p
|
||||||
|
|
||||||
|
|
||||||
|
sudo docker manifest create --amend $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8
|
||||||
|
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 --os linux --arch amd64
|
||||||
|
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 --os linux --arch arm --variant v7
|
||||||
|
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8 --os linux --arch arm64 --variant v8
|
||||||
|
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG-altcoins -p
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
|
<Configurations>Debug;Release;Altcoins-Release</Configurations>
|
||||||
|
<Platforms>AnyCPU</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ namespace BTCPayServer
|
|||||||
_NBXplorerNetworkProvider = new NBXplorerNetworkProvider(networkType);
|
_NBXplorerNetworkProvider = new NBXplorerNetworkProvider(networkType);
|
||||||
NetworkType = networkType;
|
NetworkType = networkType;
|
||||||
InitBitcoin();
|
InitBitcoin();
|
||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
InitLiquid();
|
InitLiquid();
|
||||||
InitLiquidAssets();
|
InitLiquidAssets();
|
||||||
InitLitecoin();
|
InitLitecoin();
|
||||||
@@ -80,6 +81,7 @@ namespace BTCPayServer
|
|||||||
// Disabled because of https://twitter.com/Cryptopia_NZ/status/1085084168852291586
|
// Disabled because of https://twitter.com/Cryptopia_NZ/status/1085084168852291586
|
||||||
//InitBitcoinplus();
|
//InitBitcoinplus();
|
||||||
//InitUfo();
|
//InitUfo();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using NBitcoin;
|
using NBitcoin;
|
||||||
using NBitcoin.Altcoins;
|
using NBitcoin.Altcoins;
|
||||||
using NBitcoin.Altcoins.Elements;
|
using NBitcoin.Altcoins.Elements;
|
||||||
@@ -34,3 +35,4 @@ namespace BTCPayServer
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using NBitcoin;
|
using NBitcoin;
|
||||||
|
|
||||||
namespace BTCPayServer
|
namespace BTCPayServer
|
||||||
@@ -81,3 +82,4 @@ namespace BTCPayServer
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using NBitcoin;
|
using NBitcoin;
|
||||||
@@ -58,3 +59,4 @@ namespace BTCPayServer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
18
BTCPayServer.Common/Altcoins/Liquid/LiquidExtensions.cs
Normal file
18
BTCPayServer.Common/Altcoins/Liquid/LiquidExtensions.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace BTCPayServer
|
||||||
|
{
|
||||||
|
public static class LiquidExtensions
|
||||||
|
{
|
||||||
|
public static IEnumerable<string> GetAllElementsSubChains(this BTCPayNetworkProvider networkProvider)
|
||||||
|
{
|
||||||
|
var elementsBased = networkProvider.GetAll().OfType<ElementsBTCPayNetwork>();
|
||||||
|
var parentChains = elementsBased.Select(network => network.NetworkCryptoCode.ToUpperInvariant()).Distinct();
|
||||||
|
return networkProvider.UnfilteredNetworks.GetAll().OfType<ElementsBTCPayNetwork>()
|
||||||
|
.Where(network => parentChains.Contains(network.NetworkCryptoCode)).Select(network => network.CryptoCode.ToUpperInvariant());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configurations>Debug;Release;Altcoins-Release</Configurations>
|
||||||
|
<Platforms>AnyCPU</Platforms>
|
||||||
|
</PropertyGroup>
|
||||||
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
||||||
<Import Project="../Build/Common.csproj" />
|
<Import Project="../Build/Common.csproj" />
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configurations>Debug;Release;Altcoins-Release</Configurations>
|
||||||
|
<Platforms>AnyCPU</Platforms>
|
||||||
|
</PropertyGroup>
|
||||||
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
||||||
<Import Project="../Build/Common.csproj" />
|
<Import Project="../Build/Common.csproj" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configurations>Debug;Release;Altcoins-Release</Configurations>
|
||||||
|
<Platforms>AnyCPU</Platforms>
|
||||||
|
</PropertyGroup>
|
||||||
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
||||||
<Import Project="../Build/Common.csproj" />
|
<Import Project="../Build/Common.csproj" />
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
<UserSecretsId>AB0AC1DD-9D26-485B-9416-56A33F268117</UserSecretsId>
|
<UserSecretsId>AB0AC1DD-9D26-485B-9416-56A33F268117</UserSecretsId>
|
||||||
<!--https://devblogs.microsoft.com/aspnet/testing-asp-net-core-mvc-web-apps-in-memory/-->
|
<!--https://devblogs.microsoft.com/aspnet/testing-asp-net-core-mvc-web-apps-in-memory/-->
|
||||||
<PreserveCompilationContext>true</PreserveCompilationContext>
|
<PreserveCompilationContext>true</PreserveCompilationContext>
|
||||||
|
<Configurations>Debug;Release;Altcoins-Release</Configurations>
|
||||||
|
<Platforms>AnyCPU</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!--https://devblogs.microsoft.com/aspnet/testing-asp-net-core-mvc-web-apps-in-memory/-->
|
<!--https://devblogs.microsoft.com/aspnet/testing-asp-net-core-mvc-web-apps-in-memory/-->
|
||||||
<Target Name="CopyAditionalFiles" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
|
<Target Name="CopyAditionalFiles" AfterTargets="Build" Condition="'$(TargetFramework)'!=''">
|
||||||
|
|||||||
@@ -5,8 +5,12 @@
|
|||||||
<RazorCompileOnBuild>false</RazorCompileOnBuild>
|
<RazorCompileOnBuild>false</RazorCompileOnBuild>
|
||||||
<DefineConstants>$(DefineConstants);RAZOR_RUNTIME_COMPILE</DefineConstants>
|
<DefineConstants>$(DefineConstants);RAZOR_RUNTIME_COMPILE</DefineConstants>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
|
<Configurations>Debug;Release;Altcoins-Release</Configurations>
|
||||||
|
<Platforms>AnyCPU</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Remove="Build\**" />
|
<Compile Remove="Build\**" />
|
||||||
@@ -21,6 +25,10 @@
|
|||||||
<None Remove="Build\**" />
|
<None Remove="Build\**" />
|
||||||
<None Remove="wwwroot\bundles\jqueryvalidate\**" />
|
<None Remove="wwwroot\bundles\jqueryvalidate\**" />
|
||||||
<None Remove="wwwroot\vendor\jquery-nice-select\**" />
|
<None Remove="wwwroot\vendor\jquery-nice-select\**" />
|
||||||
|
<Content Update="Views\Shared\NBXSyncSummary.cshtml">
|
||||||
|
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
|
||||||
|
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
|
||||||
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="Currencies.txt" />
|
<None Remove="Currencies.txt" />
|
||||||
@@ -28,6 +36,22 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="bundleconfig.json" />
|
<EmbeddedResource Include="bundleconfig.json" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup Condition="'$(Configuration)' == 'Debug' Or '$(Configuration)'=='Altcoins-Release' ">
|
||||||
|
<PackageReference Include="Nethereum.ABI" Version="3.8.0" />
|
||||||
|
<PackageReference Include="Nethereum.HdWallet" Version="3.8.0" />
|
||||||
|
<PackageReference Include="Nethereum.StandardTokenEIP20" Version="3.8.0" />
|
||||||
|
<PackageReference Include="Nethereum.Web3" Version="3.8.0" />
|
||||||
|
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup Condition="'$(Configuration)' == 'Release'">
|
||||||
|
<Content Remove="Services\Altcoins\**\*" />
|
||||||
|
<Content Remove="Views\EthereumLikeStore\**\*" />
|
||||||
|
<Content Remove="Views\MoneroLikeStore\**\*" />
|
||||||
|
<Content Remove="Views\Shared\Ethereum\**\*" />
|
||||||
|
<Content Remove="Views\Shared\Monero\**\*" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="BTCPayServer.Hwi" Version="1.1.3" />
|
<PackageReference Include="BTCPayServer.Hwi" Version="1.1.3" />
|
||||||
<PackageReference Include="BTCPayServer.Lightning.All" Version="1.2.0" />
|
<PackageReference Include="BTCPayServer.Lightning.All" Version="1.2.0" />
|
||||||
|
|||||||
@@ -90,11 +90,9 @@ namespace BTCPayServer.Configuration
|
|||||||
|
|
||||||
var networkProvider = new BTCPayNetworkProvider(NetworkType);
|
var networkProvider = new BTCPayNetworkProvider(NetworkType);
|
||||||
var filtered = networkProvider.Filter(supportedChains.ToArray());
|
var filtered = networkProvider.Filter(supportedChains.ToArray());
|
||||||
var elementsBased = filtered.GetAll().OfType<ElementsBTCPayNetwork>();
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
var parentChains = elementsBased.Select(network => network.NetworkCryptoCode.ToUpperInvariant()).Distinct();
|
supportedChains.AddRange(filtered.GetAllElementsSubChains());
|
||||||
var allSubChains = networkProvider.GetAll().OfType<ElementsBTCPayNetwork>()
|
#endif
|
||||||
.Where(network => parentChains.Contains(network.NetworkCryptoCode)).Select(network => network.CryptoCode.ToUpperInvariant());
|
|
||||||
supportedChains.AddRange(allSubChains);
|
|
||||||
NetworkProvider = networkProvider.Filter(supportedChains.ToArray());
|
NetworkProvider = networkProvider.Filter(supportedChains.ToArray());
|
||||||
foreach (var chain in supportedChains)
|
foreach (var chain in supportedChains)
|
||||||
{
|
{
|
||||||
|
|||||||
10
BTCPayServer/Contracts/ISyncSummaryProvider.cs
Normal file
10
BTCPayServer/Contracts/ISyncSummaryProvider.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
namespace BTCPayServer.Contracts
|
||||||
|
{
|
||||||
|
public interface ISyncSummaryProvider
|
||||||
|
{
|
||||||
|
bool AllAvailable();
|
||||||
|
|
||||||
|
string Partial { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -520,7 +520,9 @@ namespace BTCPayServer.Controllers
|
|||||||
Value = value,
|
Value = value,
|
||||||
WalletId = new WalletId(store.Id, paymentMethodId.CryptoCode),
|
WalletId = new WalletId(store.Id, paymentMethodId.CryptoCode),
|
||||||
Enabled = !excludeFilters.Match(paymentMethodId) && strategy != null,
|
Enabled = !excludeFilters.Match(paymentMethodId) && strategy != null,
|
||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
Collapsed = network is ElementsBTCPayNetwork elementsBTCPayNetwork && elementsBTCPayNetwork.NetworkCryptoCode != elementsBTCPayNetwork.CryptoCode && string.IsNullOrEmpty(value)
|
Collapsed = network is ElementsBTCPayNetwork elementsBTCPayNetwork && elementsBTCPayNetwork.NetworkCryptoCode != elementsBTCPayNetwork.CryptoCode && string.IsNullOrEmpty(value)
|
||||||
|
#endif
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case LightningPaymentType _:
|
case LightningPaymentType _:
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ namespace BTCPayServer
|
|||||||
return money.ToDecimal(MoneyUnit.BTC);
|
return money.ToDecimal(MoneyUnit.BTC);
|
||||||
case MoneyBag mb:
|
case MoneyBag mb:
|
||||||
return mb.Select(money => money.GetValue(network)).Sum();
|
return mb.Select(money => money.GetValue(network)).Sum();
|
||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
case AssetMoney assetMoney:
|
case AssetMoney assetMoney:
|
||||||
if (network is ElementsBTCPayNetwork elementsBTCPayNetwork)
|
if (network is ElementsBTCPayNetwork elementsBTCPayNetwork)
|
||||||
{
|
{
|
||||||
@@ -24,6 +25,7 @@ namespace BTCPayServer
|
|||||||
: 0;
|
: 0;
|
||||||
}
|
}
|
||||||
throw new NotSupportedException("IMoney type not supported");
|
throw new NotSupportedException("IMoney type not supported");
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
throw new NotSupportedException("IMoney type not supported");
|
throw new NotSupportedException("IMoney type not supported");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ using System;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using BTCPayServer.Configuration;
|
using BTCPayServer.Configuration;
|
||||||
|
using BTCPayServer.Contracts;
|
||||||
using BTCPayServer.Controllers;
|
using BTCPayServer.Controllers;
|
||||||
using BTCPayServer.Data;
|
using BTCPayServer.Data;
|
||||||
using BTCPayServer.HostedServices;
|
using BTCPayServer.HostedServices;
|
||||||
@@ -16,7 +17,6 @@ using BTCPayServer.Security;
|
|||||||
using BTCPayServer.Security.Bitpay;
|
using BTCPayServer.Security.Bitpay;
|
||||||
using BTCPayServer.Security.GreenField;
|
using BTCPayServer.Security.GreenField;
|
||||||
using BTCPayServer.Services;
|
using BTCPayServer.Services;
|
||||||
using BTCPayServer.Services.Altcoins.Monero;
|
|
||||||
using BTCPayServer.Services.Apps;
|
using BTCPayServer.Services.Apps;
|
||||||
using BTCPayServer.Services.Fees;
|
using BTCPayServer.Services.Fees;
|
||||||
using BTCPayServer.Services.Invoices;
|
using BTCPayServer.Services.Invoices;
|
||||||
@@ -47,7 +47,9 @@ using NBXplorer.DerivationStrategy;
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using NicolasDorier.RateLimits;
|
using NicolasDorier.RateLimits;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
|
using BTCPayServer.Services.Altcoins.Monero;
|
||||||
|
#endif
|
||||||
namespace BTCPayServer.Hosting
|
namespace BTCPayServer.Hosting
|
||||||
{
|
{
|
||||||
public static class BTCPayServerServices
|
public static class BTCPayServerServices
|
||||||
@@ -75,7 +77,9 @@ namespace BTCPayServer.Hosting
|
|||||||
services.RegisterJsonConverter(n => new ClaimDestinationJsonConverter(n));
|
services.RegisterJsonConverter(n => new ClaimDestinationJsonConverter(n));
|
||||||
|
|
||||||
services.AddPayJoinServices();
|
services.AddPayJoinServices();
|
||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
services.AddMoneroLike();
|
services.AddMoneroLike();
|
||||||
|
#endif
|
||||||
services.TryAddSingleton<SettingsRepository>();
|
services.TryAddSingleton<SettingsRepository>();
|
||||||
services.TryAddSingleton<LabelFactory>();
|
services.TryAddSingleton<LabelFactory>();
|
||||||
services.TryAddSingleton<TorServices>();
|
services.TryAddSingleton<TorServices>();
|
||||||
@@ -177,6 +181,7 @@ namespace BTCPayServer.Hosting
|
|||||||
services.TryAddSingleton<LightningConfigurationProvider>();
|
services.TryAddSingleton<LightningConfigurationProvider>();
|
||||||
services.TryAddSingleton<LanguageService>();
|
services.TryAddSingleton<LanguageService>();
|
||||||
services.TryAddSingleton<NBXplorerDashboard>();
|
services.TryAddSingleton<NBXplorerDashboard>();
|
||||||
|
services.TryAddSingleton<ISyncSummaryProvider, NBXSyncSummaryProvider>();
|
||||||
services.TryAddSingleton<StoreRepository>();
|
services.TryAddSingleton<StoreRepository>();
|
||||||
services.TryAddSingleton<PaymentRequestRepository>();
|
services.TryAddSingleton<PaymentRequestRepository>();
|
||||||
services.TryAddSingleton<BTCPayWalletProvider>();
|
services.TryAddSingleton<BTCPayWalletProvider>();
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using BTCPayServer.Services.Altcoins.Monero.Payments;
|
using BTCPayServer.Services.Altcoins.Monero.Payments;
|
||||||
|
#endif
|
||||||
using BTCPayServer.Services.Invoices;
|
using BTCPayServer.Services.Invoices;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
|
||||||
@@ -31,9 +33,11 @@ namespace BTCPayServer.Payments
|
|||||||
case "offchain":
|
case "offchain":
|
||||||
type = PaymentTypes.LightningLike;
|
type = PaymentTypes.LightningLike;
|
||||||
break;
|
break;
|
||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
case "monerolike":
|
case "monerolike":
|
||||||
type = MoneroPaymentType.Instance;
|
type = MoneroPaymentType.Instance;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
type = null;
|
type = null;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
@@ -16,3 +17,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.Configuration
|
|||||||
public string WalletDirectory { get; set; }
|
public string WalletDirectory { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using BTCPayServer.Configuration;
|
using BTCPayServer.Configuration;
|
||||||
@@ -23,6 +24,7 @@ namespace BTCPayServer.Services.Altcoins.Monero
|
|||||||
serviceCollection.AddSingleton<MoneroLikePaymentMethodHandler>();
|
serviceCollection.AddSingleton<MoneroLikePaymentMethodHandler>();
|
||||||
serviceCollection.AddSingleton<IPaymentMethodHandler>(provider => provider.GetService<MoneroLikePaymentMethodHandler>());
|
serviceCollection.AddSingleton<IPaymentMethodHandler>(provider => provider.GetService<MoneroLikePaymentMethodHandler>());
|
||||||
serviceCollection.AddSingleton<IStoreNavExtension, MoneroStoreNavExtension>();
|
serviceCollection.AddSingleton<IStoreNavExtension, MoneroStoreNavExtension>();
|
||||||
|
serviceCollection.AddSingleton<ISyncSummaryProvider, MoneroSyncSummaryProvider>();
|
||||||
|
|
||||||
return serviceCollection;
|
return serviceCollection;
|
||||||
}
|
}
|
||||||
@@ -67,3 +69,4 @@ namespace BTCPayServer.Services.Altcoins.Monero
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using BTCPayServer.Contracts;
|
using BTCPayServer.Contracts;
|
||||||
|
|
||||||
namespace BTCPayServer.Services.Altcoins.Monero
|
namespace BTCPayServer.Services.Altcoins.Monero
|
||||||
@@ -7,3 +8,4 @@ namespace BTCPayServer.Services.Altcoins.Monero
|
|||||||
public string Partial { get; } = "Monero/StoreNavMoneroExtension";
|
public string Partial { get; } = "Monero/StoreNavMoneroExtension";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using BTCPayServer.Payments;
|
using BTCPayServer.Payments;
|
||||||
|
|
||||||
namespace BTCPayServer.Services.Altcoins.Monero.Payments
|
namespace BTCPayServer.Services.Altcoins.Monero.Payments
|
||||||
@@ -34,3 +35,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.Payments
|
|||||||
public decimal NextNetworkFee { get; set; }
|
public decimal NextNetworkFee { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using BTCPayServer.Client.Models;
|
using BTCPayServer.Client.Models;
|
||||||
using BTCPayServer.Payments;
|
using BTCPayServer.Payments;
|
||||||
using BTCPayServer.Services.Altcoins.Monero.Utils;
|
using BTCPayServer.Services.Altcoins.Monero.Utils;
|
||||||
@@ -65,3 +66,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.Payments
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
@@ -128,3 +129,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.Payments
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using BTCPayServer.Payments;
|
using BTCPayServer.Payments;
|
||||||
using BTCPayServer.Services.Invoices;
|
using BTCPayServer.Services.Invoices;
|
||||||
@@ -47,3 +48,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.Payments
|
|||||||
public override string InvoiceViewPaymentPartialName { get; } = "Monero/ViewMoneroLikePaymentData";
|
public override string InvoiceViewPaymentPartialName { get; } = "Monero/ViewMoneroLikePaymentData";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using BTCPayServer.Payments;
|
using BTCPayServer.Payments;
|
||||||
|
|
||||||
namespace BTCPayServer.Services.Altcoins.Monero.Payments
|
namespace BTCPayServer.Services.Altcoins.Monero.Payments
|
||||||
@@ -10,3 +11,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.Payments
|
|||||||
public PaymentMethodId PaymentId => new PaymentMethodId(CryptoCode, MoneroPaymentType.Instance);
|
public PaymentMethodId PaymentId => new PaymentMethodId(CryptoCode, MoneroPaymentType.Instance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using BTCPayServer.Filters;
|
using BTCPayServer.Filters;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
@@ -36,3 +37,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.RPC
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
namespace BTCPayServer.Services.Altcoins.Monero.RPC
|
namespace BTCPayServer.Services.Altcoins.Monero.RPC
|
||||||
{
|
{
|
||||||
public class MoneroEvent
|
public class MoneroEvent
|
||||||
@@ -13,3 +14,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.RPC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System;
|
using System;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -64,3 +65,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -374,3 +375,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Concurrent;
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
@@ -117,3 +118,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
|
using System.Linq;
|
||||||
|
using BTCPayServer.Contracts;
|
||||||
|
|
||||||
|
namespace BTCPayServer.Services.Altcoins.Monero.Services
|
||||||
|
{
|
||||||
|
public class MoneroSyncSummaryProvider : ISyncSummaryProvider
|
||||||
|
{
|
||||||
|
private readonly MoneroRPCProvider _moneroRpcProvider;
|
||||||
|
|
||||||
|
public MoneroSyncSummaryProvider(MoneroRPCProvider moneroRpcProvider)
|
||||||
|
{
|
||||||
|
_moneroRpcProvider = moneroRpcProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AllAvailable()
|
||||||
|
{
|
||||||
|
return _moneroRpcProvider.Summaries.All(pair => pair.Value.WalletAvailable);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Partial { get; } = "Monero/MoneroSyncSummary";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
@@ -302,3 +303,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#if ALTCOINS_RELEASE || DEBUG
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace BTCPayServer.Services.Altcoins.Monero.UI
|
namespace BTCPayServer.Services.Altcoins.Monero.UI
|
||||||
@@ -13,3 +14,4 @@ namespace BTCPayServer.Services.Altcoins.Monero.UI
|
|||||||
public string TransactionLink { get; set; }
|
public string TransactionLink { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
22
BTCPayServer/Services/NBXSyncSummaryProvider.cs
Normal file
22
BTCPayServer/Services/NBXSyncSummaryProvider.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using BTCPayServer.Contracts;
|
||||||
|
using BTCPayServer.HostedServices;
|
||||||
|
|
||||||
|
namespace BTCPayServer.Services
|
||||||
|
{
|
||||||
|
public class NBXSyncSummaryProvider : ISyncSummaryProvider
|
||||||
|
{
|
||||||
|
private readonly NBXplorerDashboard _nbXplorerDashboard;
|
||||||
|
|
||||||
|
public NBXSyncSummaryProvider(NBXplorerDashboard nbXplorerDashboard)
|
||||||
|
{
|
||||||
|
_nbXplorerDashboard = nbXplorerDashboard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool AllAvailable()
|
||||||
|
{
|
||||||
|
return _nbXplorerDashboard.IsFullySynched();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Partial { get; } = "NBXSyncSummary";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
@using BTCPayServer.Services.Altcoins.Monero.Services
|
@using BTCPayServer.Contracts
|
||||||
@inject BTCPayServer.HostedServices.NBXplorerDashboard dashboard
|
@inject IEnumerable<ISyncSummaryProvider> SyncSummaryProviders;
|
||||||
@inject MoneroRPCProvider MoneroRpcProvider
|
@if(SyncSummaryProviders.Any(provider => !provider.AllAvailable()))
|
||||||
@if (!dashboard.IsFullySynched() || !MoneroRpcProvider.Summaries.All(pair => pair.Value.WalletAvailable))
|
|
||||||
{
|
{
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
<div id="modalDialog" class="modal-dialog animated bounceInRight"
|
<div id="modalDialog" class="modal-dialog animated bounceInRight"
|
||||||
@@ -14,71 +13,14 @@
|
|||||||
<h4 class="modal-title">Your nodes are synching...</h4>
|
<h4 class="modal-title">Your nodes are synching...</h4>
|
||||||
<button type="button" class="close" onclick="dismissSyncModal()">×</button>
|
<button type="button" class="close" onclick="dismissSyncModal()">×</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body" style="max-height: 400px; overflow-y: scroll;">
|
||||||
<p>
|
<p>
|
||||||
Your node is synching the entire blockchain and validating the consensus rules...
|
Your node is synching the entire blockchain and validating the consensus rules...
|
||||||
</p>
|
</p>
|
||||||
@foreach (var line in dashboard.GetAll().Where(summary => summary.Network.ShowSyncSummary))
|
@foreach (var provider in SyncSummaryProviders)
|
||||||
{
|
{
|
||||||
<h4>@line.Network.CryptoCode</h4>
|
<partial name="@provider.Partial" />
|
||||||
@if (line.Status == null)
|
|
||||||
{
|
|
||||||
<ul>
|
|
||||||
<li>The node is offline</li>
|
|
||||||
@if (line.Error != null)
|
|
||||||
{
|
|
||||||
<li>Last error: @line.Error</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<ul>
|
|
||||||
<li>NBXplorer headers height: @line.Status.ChainHeight</li>
|
|
||||||
@if (line.Status.BitcoinStatus == null)
|
|
||||||
{
|
|
||||||
if (line.State == BTCPayServer.HostedServices.NBXplorerState.Synching)
|
|
||||||
{
|
|
||||||
<li>The node is starting...</li>
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<li>The node is offline</li>
|
|
||||||
@if (line.Error != null)
|
|
||||||
{
|
|
||||||
<li>Last error: @line.Error</li>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (line.Status.BitcoinStatus.IsSynched)
|
|
||||||
{
|
|
||||||
<li>The node is synchronized (Height: @line.Status.BitcoinStatus.Headers)</li>
|
|
||||||
@if (line.Status.BitcoinStatus.IsSynched &&
|
|
||||||
line.Status.SyncHeight.HasValue &&
|
|
||||||
line.Status.SyncHeight.Value < line.Status.BitcoinStatus.Headers)
|
|
||||||
{
|
|
||||||
<li>NBXplorer is synchronizing... (Height: @line.Status.SyncHeight.Value)</li>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<li>Node headers height: @line.Status.BitcoinStatus.Headers</li>
|
|
||||||
<li>Validated blocks: @line.Status.BitcoinStatus.Blocks</li>
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
@if (!line.Status.IsFullySynched && line.Status.BitcoinStatus != null)
|
|
||||||
{
|
|
||||||
<div class="progress">
|
|
||||||
<div class="progress-bar" role="progressbar" aria-valuenow="@((int)(line.Status.BitcoinStatus.VerificationProgress * 100))"
|
|
||||||
aria-valuemin="0" aria-valuemax="100" style="width:@((int)(line.Status.BitcoinStatus.VerificationProgress * 100))%">
|
|
||||||
@((int)(line.Status.BitcoinStatus.VerificationProgress * 100))%
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<partial name="Monero/MoneroSyncSummary"/>
|
|
||||||
<p>
|
<p>
|
||||||
<a href="https://www.youtube.com/watch?v=OrYDehC-8TU" target="_blank">Watch this video</a> to understand the importance of blockchain synchronization.
|
<a href="https://www.youtube.com/watch?v=OrYDehC-8TU" target="_blank">Watch this video</a> to understand the importance of blockchain synchronization.
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
60
BTCPayServer/Views/Shared/NBXSyncSummary.cshtml
Normal file
60
BTCPayServer/Views/Shared/NBXSyncSummary.cshtml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
@inject BTCPayServer.HostedServices.NBXplorerDashboard dashboard;
|
||||||
|
@foreach (var line in dashboard.GetAll().Where(summary => summary.Network.ShowSyncSummary))
|
||||||
|
{
|
||||||
|
<h4>@line.Network.CryptoCode</h4>
|
||||||
|
@if (line.Status == null)
|
||||||
|
{
|
||||||
|
<ul>
|
||||||
|
<li>The node is offline</li>
|
||||||
|
@if (line.Error != null)
|
||||||
|
{
|
||||||
|
<li>Last error: @line.Error</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<ul>
|
||||||
|
<li>NBXplorer headers height: @line.Status.ChainHeight</li>
|
||||||
|
@if (line.Status.BitcoinStatus == null)
|
||||||
|
{
|
||||||
|
if (line.State == BTCPayServer.HostedServices.NBXplorerState.Synching)
|
||||||
|
{
|
||||||
|
<li>The node is starting...</li>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<li>The node is offline</li>
|
||||||
|
@if (line.Error != null)
|
||||||
|
{
|
||||||
|
<li>Last error: @line.Error</li>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (line.Status.BitcoinStatus.IsSynched)
|
||||||
|
{
|
||||||
|
<li>The node is synchronized (Height: @line.Status.BitcoinStatus.Headers)</li>
|
||||||
|
@if (line.Status.BitcoinStatus.IsSynched &&
|
||||||
|
line.Status.SyncHeight.HasValue &&
|
||||||
|
line.Status.SyncHeight.Value < line.Status.BitcoinStatus.Headers)
|
||||||
|
{
|
||||||
|
<li>NBXplorer is synchronizing... (Height: @line.Status.SyncHeight.Value)</li>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<li>Node headers height: @line.Status.BitcoinStatus.Headers</li>
|
||||||
|
<li>Validated blocks: @line.Status.BitcoinStatus.Blocks</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
@if (!line.Status.IsFullySynched && line.Status.BitcoinStatus != null)
|
||||||
|
{
|
||||||
|
<div class="progress">
|
||||||
|
<div class="progress-bar" role="progressbar" aria-valuenow="@((int) (line.Status.BitcoinStatus.VerificationProgress * 100))"
|
||||||
|
aria-valuemin="0" aria-valuemax="100" style="width:@((int) (line.Status.BitcoinStatus.VerificationProgress * 100))%">
|
||||||
|
@((int) (line.Status.BitcoinStatus.VerificationProgress * 100))%
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.202 AS builder
|
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.202 AS builder
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
ARG CONFIGURATION_NAME=Release
|
||||||
WORKDIR /source
|
WORKDIR /source
|
||||||
COPY nuget.config nuget.config
|
COPY nuget.config nuget.config
|
||||||
COPY Build/Common.csproj Build/Common.csproj
|
COPY Build/Common.csproj Build/Common.csproj
|
||||||
@@ -15,7 +16,7 @@ COPY BTCPayServer.Data/. BTCPayServer.Data/.
|
|||||||
COPY BTCPayServer.Client/. BTCPayServer.Client/.
|
COPY BTCPayServer.Client/. BTCPayServer.Client/.
|
||||||
COPY BTCPayServer/. BTCPayServer/.
|
COPY BTCPayServer/. BTCPayServer/.
|
||||||
COPY Build/Version.csproj Build/Version.csproj
|
COPY Build/Version.csproj Build/Version.csproj
|
||||||
RUN cd BTCPayServer && dotnet publish --output /app/ --configuration Release
|
RUN cd BTCPayServer && dotnet publish --output /app/ --configuration ${CONFIGURATION_NAME}
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.4-buster-slim
|
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.4-buster-slim
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# This is a manifest image, will pull the image with the same arch as the builder machine
|
# This is a manifest image, will pull the image with the same arch as the builder machine
|
||||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.202 AS builder
|
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.202 AS builder
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
ARG CONFIGURATION_NAME=Release
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -qq --no-install-recommends qemu qemu-user-static qemu-user binfmt-support
|
&& apt-get install -qq --no-install-recommends qemu qemu-user-static qemu-user binfmt-support
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ COPY BTCPayServer.Data/. BTCPayServer.Data/.
|
|||||||
COPY BTCPayServer.Client/. BTCPayServer.Client/.
|
COPY BTCPayServer.Client/. BTCPayServer.Client/.
|
||||||
COPY BTCPayServer/. BTCPayServer/.
|
COPY BTCPayServer/. BTCPayServer/.
|
||||||
COPY Build/Version.csproj Build/Version.csproj
|
COPY Build/Version.csproj Build/Version.csproj
|
||||||
RUN cd BTCPayServer && dotnet publish --output /app/ --configuration Release
|
RUN cd BTCPayServer && dotnet publish --output /app/ --configuration ${CONFIGURATION_NAME}
|
||||||
|
|
||||||
# Force the builder machine to take make an arm runtime image. This is fine as long as the builder does not run any program
|
# Force the builder machine to take make an arm runtime image. This is fine as long as the builder does not run any program
|
||||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.4-buster-slim-arm32v7
|
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.4-buster-slim-arm32v7
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
# This is a manifest image, will pull the image with the same arch as the builder machine
|
# This is a manifest image, will pull the image with the same arch as the builder machine
|
||||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.202 AS builder
|
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.202 AS builder
|
||||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
ARG CONFIGURATION_NAME=Release
|
||||||
|
ENV LC_ALL en_US.UTF-8
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -qq --no-install-recommends qemu qemu-user-static qemu-user binfmt-support
|
&& apt-get install -qq --no-install-recommends qemu qemu-user-static qemu-user binfmt-support
|
||||||
|
|
||||||
@@ -19,7 +21,7 @@ COPY BTCPayServer.Data/. BTCPayServer.Data/.
|
|||||||
COPY BTCPayServer.Client/. BTCPayServer.Client/.
|
COPY BTCPayServer.Client/. BTCPayServer.Client/.
|
||||||
COPY BTCPayServer/. BTCPayServer/.
|
COPY BTCPayServer/. BTCPayServer/.
|
||||||
COPY Build/Version.csproj Build/Version.csproj
|
COPY Build/Version.csproj Build/Version.csproj
|
||||||
RUN cd BTCPayServer && dotnet publish --output /app/ --configuration Release
|
RUN cd BTCPayServer && dotnet publish --output /app/ --configuration ${CONFIGURATION_NAME}
|
||||||
|
|
||||||
# Force the builder machine to take make an arm runtime image. This is fine as long as the builder does not run any program
|
# Force the builder machine to take make an arm runtime image. This is fine as long as the builder does not run any program
|
||||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.4-buster-slim-arm64v8
|
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.4-buster-slim-arm64v8
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ Global
|
|||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
Release|x64 = Release|x64
|
Release|x64 = Release|x64
|
||||||
Release|x86 = Release|x86
|
Release|x86 = Release|x86
|
||||||
|
Altcoins-Release|Any CPU = Altcoins-Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{949A0870-8D8C-4DE5-8845-DDD560489177}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{949A0870-8D8C-4DE5-8845-DDD560489177}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
@@ -50,6 +51,8 @@ Global
|
|||||||
{949A0870-8D8C-4DE5-8845-DDD560489177}.Release|x64.Build.0 = Release|Any CPU
|
{949A0870-8D8C-4DE5-8845-DDD560489177}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{949A0870-8D8C-4DE5-8845-DDD560489177}.Release|x86.ActiveCfg = Release|Any CPU
|
{949A0870-8D8C-4DE5-8845-DDD560489177}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{949A0870-8D8C-4DE5-8845-DDD560489177}.Release|x86.Build.0 = Release|Any CPU
|
{949A0870-8D8C-4DE5-8845-DDD560489177}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{949A0870-8D8C-4DE5-8845-DDD560489177}.Altcoins-Release|Any CPU.ActiveCfg = Altcoins-Release|Any CPU
|
||||||
|
{949A0870-8D8C-4DE5-8845-DDD560489177}.Altcoins-Release|Any CPU.Build.0 = Altcoins-Release|Any CPU
|
||||||
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
@@ -62,6 +65,8 @@ Global
|
|||||||
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Release|x64.Build.0 = Release|Any CPU
|
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Release|x86.ActiveCfg = Release|Any CPU
|
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Release|x86.Build.0 = Release|Any CPU
|
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Altcoins-Release|Any CPU.ActiveCfg = Altcoins-Release|Any CPU
|
||||||
|
{B373F439-6E75-4A94-985D-10A0C7C500D0}.Altcoins-Release|Any CPU.Build.0 = Altcoins-Release|Any CPU
|
||||||
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
@@ -74,6 +79,8 @@ Global
|
|||||||
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Release|x64.Build.0 = Release|Any CPU
|
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Release|x86.ActiveCfg = Release|Any CPU
|
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Release|x86.Build.0 = Release|Any CPU
|
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Altcoins-Release|Any CPU.ActiveCfg = Altcoins-Release|Any CPU
|
||||||
|
{6DC77459-D52F-45EE-B3F3-315043D33A1B}.Altcoins-Release|Any CPU.Build.0 = Altcoins-Release|Any CPU
|
||||||
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
@@ -86,6 +93,8 @@ Global
|
|||||||
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Release|x64.Build.0 = Release|Any CPU
|
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Release|x86.ActiveCfg = Release|Any CPU
|
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Release|x86.Build.0 = Release|Any CPU
|
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Altcoins-Release|Any CPU.ActiveCfg = Altcoins-Release|Any CPU
|
||||||
|
{4BE42370-6114-4176-BFB3-37C6B6DA094D}.Altcoins-Release|Any CPU.Build.0 = Altcoins-Release|Any CPU
|
||||||
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
@@ -98,6 +107,8 @@ Global
|
|||||||
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Release|x64.Build.0 = Release|Any CPU
|
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Release|x86.ActiveCfg = Release|Any CPU
|
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Release|x86.Build.0 = Release|Any CPU
|
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Altcoins-Release|Any CPU.ActiveCfg = Altcoins-Release|Any CPU
|
||||||
|
{4D7A865D-3945-4C70-9CC8-B09A274A697E}.Altcoins-Release|Any CPU.Build.0 = Altcoins-Release|Any CPU
|
||||||
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
@@ -110,6 +121,8 @@ Global
|
|||||||
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Release|x64.Build.0 = Release|Any CPU
|
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Release|x86.ActiveCfg = Release|Any CPU
|
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Release|x86.Build.0 = Release|Any CPU
|
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Altcoins-Release|Any CPU.ActiveCfg = Altcoins-Release|Any CPU
|
||||||
|
{21A13304-7168-49A0-86C2-0A1A9453E9C7}.Altcoins-Release|Any CPU.Build.0 = Altcoins-Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|||||||
Reference in New Issue
Block a user