mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 07:34:24 +01:00
fix prism destination submit
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
<PropertyGroup>
|
||||
<Product>LN Prism</Product>
|
||||
<Description>Automated value splits for lightning.</Description>
|
||||
<Version>1.1.6</Version>
|
||||
<Version>1.1.7</Version>
|
||||
</PropertyGroup>
|
||||
<!-- Plugin development properties -->
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<input type="text" @bind="WorkingId" class="form-control"/>
|
||||
@if (InvalidId)
|
||||
{
|
||||
<span class="text-danger">Invalid</span>
|
||||
<span class="text-danger w-100">Invalid</span>
|
||||
}
|
||||
<span class="form-text">An alias to reference in destinations of prisms.</span>
|
||||
</div>
|
||||
@@ -14,7 +14,7 @@
|
||||
<input type="text" @bind="WorkingCopy.Destination" class="form-control"/>
|
||||
@if (Invalid)
|
||||
{
|
||||
<span class="text-danger">Invalid</span>
|
||||
<span class="text-danger w-100">Invalid</span>
|
||||
}
|
||||
<span class="form-text">Can be a lightning address, LNURL, or a custom value that another plugin supports</span>
|
||||
</div>
|
||||
@@ -79,27 +79,16 @@
|
||||
|
||||
public async Task Update()
|
||||
{
|
||||
if (ValidateDestination.Invoke(WorkingCopy.Destination))
|
||||
Invalid = !ValidateDestination.Invoke(WorkingCopy.Destination);
|
||||
|
||||
InvalidId = !ValidateId.Invoke(WorkingId);
|
||||
|
||||
if(Invalid || InvalidId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
await SettingsChanged.InvokeAsync(WorkingCopy);
|
||||
|
||||
Invalid = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Invalid = true;
|
||||
}
|
||||
|
||||
if (ValidateId.Invoke(WorkingId))
|
||||
{
|
||||
await IdChanged.InvokeAsync(WorkingId);
|
||||
InvalidId = false;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
InvalidId = true;
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
|
||||
@@ -157,7 +157,7 @@ else
|
||||
{
|
||||
get
|
||||
{
|
||||
if (SelectedDestinationId is null || SelectedDestinationId == "null")
|
||||
if (SelectedDestinationId is null or "null")
|
||||
return null;
|
||||
Settings.Destinations.TryGetValue(SelectedDestinationId, out var res);
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user