btcpayserver/BTCPayServer/Views/Shared/LNURL/LightningAddressNav.cshtml
2022-01-14 13:46:03 +09:00

24 lines
986 B
Plaintext

@using BTCPayServer.Payments.Lightning
@using BTCPayServer.Views.Stores
@using BTCPayServer.Abstractions.Extensions
@inject BTCPayNetworkProvider BTCPayNetworkProvider
@{
var store = Context.GetStoreData();
var isLightningEnabled = store.IsLightningEnabled(BTCPayNetworkProvider);
var isLNUrlEnabled = store.IsLNUrlEnabled(BTCPayNetworkProvider);
var possible =
isLightningEnabled &&
isLNUrlEnabled &&
store.GetSupportedPaymentMethods(BTCPayNetworkProvider).OfType<LNURLPaySupportedPaymentMethod>().Any(type => type.CryptoCode == "BTC");
}
@if (possible)
{
<li class="nav-item">
<a asp-area="" asp-controller="UILNURL" asp-action="EditLightningAddress" asp-route-storeId="@store.Id" class="nav-link js-scroll-trigger @ViewData.IsActivePage("LightningAddress", nameof(StoreNavPages))" id="StoreNav-LightningAddress">
<vc:icon symbol="wallet-lightning"/>
<span>Lightning Address</span>
</a>
</li>
}