mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-20 13:34:37 +01:00
parent
e6c1b0cf54
commit
6459c7bfad
5 changed files with 25 additions and 4 deletions
|
@ -93,7 +93,7 @@
|
|||
|
||||
</li>
|
||||
}
|
||||
|
||||
<vc:ui-extension-point location="store-wallets-nav" model="@Model"/>
|
||||
@if (PoliciesSettings.Experimental)
|
||||
{
|
||||
@foreach (var custodianAccount in Model.CustodianAccounts)
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace BTCPayServer.Controllers
|
|||
{
|
||||
WalletEnabled = walletEnabled,
|
||||
LightningEnabled = lightningEnabled,
|
||||
LightningSupported = _NetworkProvider.GetNetwork<BTCPayNetwork>(cryptoCode).SupportLightning,
|
||||
LightningSupported = _NetworkProvider.GetNetwork<BTCPayNetwork>(cryptoCode)?.SupportLightning is true,
|
||||
StoreId = CurrentStore.Id,
|
||||
StoreName = CurrentStore.StoreName,
|
||||
CryptoCode = cryptoCode,
|
||||
|
|
|
@ -25,6 +25,7 @@ namespace BTCPayServer.Services.Altcoins.Monero
|
|||
serviceCollection.AddSingleton<MoneroLikePaymentMethodHandler>();
|
||||
serviceCollection.AddSingleton<IPaymentMethodHandler>(provider => provider.GetService<MoneroLikePaymentMethodHandler>());
|
||||
serviceCollection.AddSingleton<IUIExtension>(new UIExtension("Monero/StoreNavMoneroExtension", "store-nav"));
|
||||
serviceCollection.AddSingleton<IUIExtension>(new UIExtension("Monero/StoreWalletsNavMoneroExtension", "store-wallets-nav"));
|
||||
serviceCollection.AddSingleton<ISyncSummaryProvider, MoneroSyncSummaryProvider>();
|
||||
|
||||
return serviceCollection;
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace BTCPayServer.Services
|
|||
|
||||
public Cheater(BTCPayServerOptions opts, ExplorerClientProvider prov, ApplicationDbContextFactory applicationDbContextFactory)
|
||||
{
|
||||
CashCow = prov.GetExplorerClient("BTC").RPCClient;
|
||||
CashCow = prov.GetExplorerClient("BTC")?.RPCClient;
|
||||
_applicationDbContextFactory = applicationDbContextFactory;
|
||||
}
|
||||
public RPCClient CashCow
|
||||
|
@ -38,7 +38,7 @@ namespace BTCPayServer.Services
|
|||
|
||||
Task IHostedService.StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
_ = CashCow.ScanRPCCapabilitiesAsync();
|
||||
_ = CashCow?.ScanRPCCapabilitiesAsync();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
@using BTCPayServer.Services.Altcoins.Monero.Configuration
|
||||
@using BTCPayServer.Services.Altcoins.Monero.UI
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@using BTCPayServer.Client
|
||||
@using BTCPayServer.Abstractions.TagHelpers
|
||||
@inject MoneroLikeConfiguration MoneroLikeConfiguration;
|
||||
@{
|
||||
var controller = ViewContext.RouteData.Values["Controller"].ToString();
|
||||
var isMonero = nameof(UIMoneroLikeStoreController).StartsWith(controller, StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
@if (MoneroLikeConfiguration.MoneroLikeConfigurationItems.Any())
|
||||
{
|
||||
<li class="nav-item" permission="@Policies.CanModifyStoreSettings">
|
||||
<a asp-action="GetStoreMoneroLikePaymentMethods" asp-controller="UIMoneroLikeStore" asp-route-storeId="@Model.Store.Id" class="nav-link @(isMonero ? "active" : string.Empty)" id="@($"StoreNav-Monero")">
|
||||
<span class="me-2 btcpay-status"></span>
|
||||
<span>Monero</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
}
|
Loading…
Add table
Reference in a new issue