mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 01:43:50 +01:00
Add NetworkProvider.DefaultNetwork
This commit is contained in:
parent
9e2f7fb048
commit
0afc2cd2cb
@ -93,6 +93,7 @@ namespace BTCPayServer
|
||||
}
|
||||
|
||||
public BTCPayNetwork BTC => GetNetwork<BTCPayNetwork>("BTC");
|
||||
public BTCPayNetworkBase DefaultNetwork => BTC ?? GetAll().First();
|
||||
|
||||
public void Add(BTCPayNetwork network)
|
||||
{
|
||||
|
@ -451,8 +451,8 @@ namespace BTCPayServer.Controllers
|
||||
case "cpfp":
|
||||
if (selectedItems.Length == 0)
|
||||
return NotSupported("No invoice has been selected");
|
||||
var network = _NetworkProvider.BTC;
|
||||
var explorer = _ExplorerClients.GetExplorerClient(_NetworkProvider.BTC);
|
||||
var network = _NetworkProvider.DefaultNetwork;
|
||||
var explorer = _ExplorerClients.GetExplorerClient(network);
|
||||
IActionResult NotSupported(string err)
|
||||
{
|
||||
TempData[WellKnownTempData.ErrorMessage] = err;
|
||||
|
@ -4,7 +4,7 @@
|
||||
@{
|
||||
ViewData.SetActivePage(StoreNavPages.Dashboard, Model.StoreName, Model.StoreId);
|
||||
var isReady = Model.WalletEnabled || Model.LightningEnabled;
|
||||
var defaultCryptoCode = (networkProvider.BTC ?? networkProvider.GetAll().First()).CryptoCode;
|
||||
var defaultCryptoCode = networkProvider.DefaultNetwork.CryptoCode;
|
||||
}
|
||||
|
||||
<partial name="_StatusMessage" />
|
||||
|
Loading…
Reference in New Issue
Block a user