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>
|
<PropertyGroup>
|
||||||
<Product>LN Prism</Product>
|
<Product>LN Prism</Product>
|
||||||
<Description>Automated value splits for lightning.</Description>
|
<Description>Automated value splits for lightning.</Description>
|
||||||
<Version>1.1.6</Version>
|
<Version>1.1.7</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- Plugin development properties -->
|
<!-- Plugin development properties -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<input type="text" @bind="WorkingId" class="form-control"/>
|
<input type="text" @bind="WorkingId" class="form-control"/>
|
||||||
@if (InvalidId)
|
@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>
|
<span class="form-text">An alias to reference in destinations of prisms.</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<input type="text" @bind="WorkingCopy.Destination" class="form-control"/>
|
<input type="text" @bind="WorkingCopy.Destination" class="form-control"/>
|
||||||
@if (Invalid)
|
@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>
|
<span class="form-text">Can be a lightning address, LNURL, or a custom value that another plugin supports</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -79,27 +79,16 @@
|
|||||||
|
|
||||||
public async Task Update()
|
public async Task Update()
|
||||||
{
|
{
|
||||||
if (ValidateDestination.Invoke(WorkingCopy.Destination))
|
Invalid = !ValidateDestination.Invoke(WorkingCopy.Destination);
|
||||||
{
|
|
||||||
await SettingsChanged.InvokeAsync(WorkingCopy);
|
|
||||||
|
|
||||||
Invalid = false;
|
InvalidId = !ValidateId.Invoke(WorkingId);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Invalid = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ValidateId.Invoke(WorkingId))
|
if(Invalid || InvalidId)
|
||||||
{
|
{
|
||||||
await IdChanged.InvokeAsync(WorkingId);
|
return;
|
||||||
InvalidId = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
InvalidId = true;
|
|
||||||
}
|
}
|
||||||
|
await SettingsChanged.InvokeAsync(WorkingCopy);
|
||||||
|
await IdChanged.InvokeAsync(WorkingId);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ else
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (SelectedDestinationId is null || SelectedDestinationId == "null")
|
if (SelectedDestinationId is null or "null")
|
||||||
return null;
|
return null;
|
||||||
Settings.Destinations.TryGetValue(SelectedDestinationId, out var res);
|
Settings.Destinations.TryGetValue(SelectedDestinationId, out var res);
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
Reference in New Issue
Block a user