btcpayserver/BTCPayServer/Views/Shared/Ethereum/ETHSyncSummary.cshtml
XPayServer de755ac0bb Add Ethereum & ERC20 Support
Add Tests
Add Index, XPub to payment data
Add Note on local ETH node
Fix Sync Summary and Race Condition
2020-09-09 08:19:10 +02:00

28 lines
1012 B
Plaintext

@using BTCPayServer.Services.Altcoins.Ethereum.Services
@inject BTCPayNetworkProvider BTCPayNetworkProvider
@inject EthereumService EthereumService;
@inject SignInManager<ApplicationUser> SignInManager;
@{
var networks = BTCPayNetworkProvider.GetAll().OfType<EthereumBTCPayNetwork>().OrderBy(network => network.ChainId).Where(network => network.ShowSyncSummary);
}
@foreach (var network in networks)
{
<h4>@network.CryptoCode (Chain ID: @network.ChainId) @(network is ERC20BTCPayNetwork is true ? "(ERC20)" : "")</h4>
<ul>
@if (!EthereumService.IsAvailable(network.CryptoCode, out var error))
{
<li>
@(error??"Web3 has not yet been configured")
@if (SignInManager.IsSignedIn(User) && User.IsInRole(Roles.ServerAdmin))
{
<a asp-action="UpdateChainConfig" asp-controller="EthereumConfig" asp-route-chainId="@network.ChainId">Configure Web3</a>
}
</li>
}
</ul>
}