enhance opensats integration

This commit is contained in:
Kukks
2024-02-02 11:33:07 +01:00
parent abafab95f7
commit d67fb2b953
2 changed files with 10 additions and 5 deletions

View File

@@ -23,13 +23,13 @@ public class OpenSatsDestinationValidator : IPluginHookFilter
public async Task<object> Execute(object args)
{
var result = new PrismDestinationValidationResult();
if (args is not string args1 || !args1.StartsWith("opensats")) return args;
if (args is not string args1 || !args1.StartsWith("opensats", StringComparison.InvariantCultureIgnoreCase)) return args;
try
{
var parts = args1.Split(":", StringSplitOptions.RemoveEmptyEntries);
var project = "opensats";
var parts = args1.ToLowerInvariant().Split(":", StringSplitOptions.RemoveEmptyEntries);
var project = "general_fund";
var paymentMethod = new PaymentMethodId("BTC", PaymentTypes.LightningLike);
if (parts.Length > 1)
{
@@ -69,7 +69,7 @@ public class OpenSatsDestinationValidator : IPluginHookFilter
result.Success = false;
}
result.Success = true;
result.PaymentMethod = paymentMethod;