Setup guide: Link to first crypto if BTC not available

This commit is contained in:
nicolas.dorier 2022-02-10 12:23:45 +09:00
parent 99c4ebe046
commit efed00f58b
No known key found for this signature in database
GPG key ID: 6618763EF09186FE
2 changed files with 7 additions and 5 deletions

View file

@ -92,7 +92,6 @@ namespace BTCPayServer
return new BTCPayNetworkProvider(this, cryptoCodes);
}
[Obsolete("To use only for legacy stuff")]
public BTCPayNetwork BTC => GetNetwork<BTCPayNetwork>("BTC");
public void Add(BTCPayNetwork network)

View file

@ -1,7 +1,10 @@
@model StoreDashboardViewModel;
@inject BTCPayNetworkProvider networkProvider
@{
ViewData.SetActivePage(StoreNavPages.Dashboard, Model.StoreName, Model.StoreId);
var isReady = Model.WalletEnabled || Model.LightningEnabled;
ViewData.SetActivePage(StoreNavPages.Dashboard, Model.StoreName, Model.StoreId);
var isReady = Model.WalletEnabled || Model.LightningEnabled;
var defaultCryptoCode = (networkProvider.BTC ?? networkProvider.GetAll().First()).CryptoCode;
}
<partial name="_StatusMessage" />
@ -26,7 +29,7 @@ else
</div>
@if (!Model.WalletEnabled)
{
<a asp-controller="UIStores" asp-action="SetupWallet" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="BTC" id="SetupGuide-Wallet" class="list-group-item list-group-item-action d-flex align-items-center order-1">
<a asp-controller="UIStores" asp-action="SetupWallet" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="@defaultCryptoCode" id="SetupGuide-Wallet" class="list-group-item list-group-item-action d-flex align-items-center order-1">
<vc:icon symbol="new-wallet"/>
<div class="content">
<h5 class="mb-0">Set up a wallet</h5>
@ -45,7 +48,7 @@ else
}
@if (!Model.LightningEnabled)
{
<a asp-controller="UIStores" asp-action="SetupLightningNode" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="BTC" id="SetupGuide-Lightning" class="list-group-item list-group-item-action d-flex align-items-center order-1">
<a asp-controller="UIStores" asp-action="SetupLightningNode" asp-route-storeId="@Model.StoreId" asp-route-cryptoCode="@defaultCryptoCode" id="SetupGuide-Lightning" class="list-group-item list-group-item-action d-flex align-items-center order-1">
<vc:icon symbol="new-wallet"/>
<div class="content">
<h5 class="mb-0">Set up a Lightning node</h5>