Hide LN option for liquid Assets (#1512)

Was getting a bit crowded for stuff that isn't supported yet.
This commit is contained in:
Andrew Camilleri 2020-04-27 11:15:38 +02:00 committed by GitHub
parent d4dbe6fe17
commit f410f7d4d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View file

@ -26,7 +26,8 @@ namespace BTCPayServer
CryptoImagePath = "imlegacy/liquid-tether.svg",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("1776'") : new KeyPath("1'"),
SupportRBF = true
SupportRBF = true,
SupportLightning = false
});
Add(new ElementsBTCPayNetwork()
@ -49,7 +50,8 @@ namespace BTCPayServer
CryptoImagePath = "imlegacy/etb.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("1776'") : new KeyPath("1'"),
SupportRBF = true
SupportRBF = true,
SupportLightning = false
});
Add(new ElementsBTCPayNetwork()
@ -71,7 +73,8 @@ namespace BTCPayServer
CryptoImagePath = "imlegacy/lcad.png",
DefaultSettings = BTCPayDefaultSettings.GetDefaultSettings(NetworkType),
CoinType = NetworkType == NetworkType.Mainnet ? new KeyPath("1776'") : new KeyPath("1'"),
SupportRBF = true
SupportRBF = true,
SupportLightning = false
});
}
}

View file

@ -62,6 +62,7 @@ namespace BTCPayServer
public int MaxTrackedConfirmation { get; internal set; } = 6;
public string UriScheme { get; internal set; }
public bool SupportPayJoin { get; set; } = false;
public bool SupportLightning { get; set; } = true;
public KeyPath GetRootKeyPath(DerivationType type)
{

View file

@ -144,7 +144,7 @@ namespace BTCPayServer.Payments.Lightning
return _networkProvider
.GetAll()
.OfType<BTCPayNetwork>()
.Where(network => network.NBitcoinNetwork.Consensus.SupportSegwit)
.Where(network => network.NBitcoinNetwork.Consensus.SupportSegwit && network.SupportLightning)
.Select(network => new PaymentMethodId(network.CryptoCode, PaymentTypes.LightningLike));
}