Apply suggestions from code review

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
This commit is contained in:
Andrew Camilleri 2021-01-14 09:19:16 +01:00 committed by GitHub
parent b40095f603
commit 48b2e682bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -56,10 +56,10 @@ namespace BTCPayServer.Controllers.GreenField
var excludedPaymentMethods = blob.GetExcludedPaymentMethods();
return Ok(Store.GetSupportedPaymentMethods(_btcPayNetworkProvider)
.Where((method) => method.PaymentId.PaymentType == PaymentTypes.LightningLike)
.OfType<DerivationSchemeSettings>()
.Select(strategy =>
new LightningNetworkPaymentMethodData(strategy.PaymentId.CryptoCode,
strategy.AccountDerivation.ToString(), !excludedPaymentMethods.Match(strategy.PaymentId)))
.OfType<LightningSupportedPaymentMethod>()
.Select(paymentMethod =>
new LightningNetworkPaymentMethodData(paymentMethod.PaymentId.CryptoCode,
paymentMethod.GetLightningUrl().ToString(), !excludedPaymentMethods.Match(paymentMethod.PaymentId)))
.Where((result) => !enabledOnly || result.Enabled)
.ToList()
);

View File

@ -320,7 +320,7 @@
"connectionString": {
"type": "string",
"description": "The lightning connection string",
"example": "xpub..."
"example": "type=clightning;server=..."
}
}
}