Abstract ChargeClient to prepare for support of other lightning implementation

This commit is contained in:
nicolas.dorier
2018-03-20 11:59:43 +09:00
parent 73cc75fe66
commit 2b2e12b290
20 changed files with 133 additions and 54 deletions

View File

@@ -34,7 +34,6 @@ namespace BTCPayServer.Models.StoreViewModels
public void SetCryptoCurrencies(BTCPayNetworkProvider networkProvider, string selectedScheme)
{
var choices = networkProvider.GetAll()
.Where(n => n.CLightningNetworkName != null)
.Select(o => new Format() { Name = o.CryptoCode, Value = o.CryptoCode }).ToArray();
var chosen = choices.FirstOrDefault(f => f.Name == selectedScheme) ?? choices.FirstOrDefault();
CryptoCurrencies = new SelectList(choices, nameof(chosen.Value), nameof(chosen.Name), chosen);