mirror of
https://github.com/aljazceru/BTCPayServerPlugins.git
synced 2025-12-17 07:34:24 +01:00
fix prism nre
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.0.5</Version>
|
<Version>1.0.6</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- Plugin development properties -->
|
<!-- Plugin development properties -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class PrismController : Controller
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IActionResult> Edit(string storeId, PrismSettings settings, string command)
|
public async Task<IActionResult> Edit(string storeId, PrismSettings settings, string command)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < settings.Splits.Length; i++)
|
for (int i = 0; i < settings.Splits?.Length; i++)
|
||||||
{
|
{
|
||||||
var prism = settings.Splits[i];
|
var prism = settings.Splits[i];
|
||||||
if (string.IsNullOrEmpty(prism.Source))
|
if (string.IsNullOrEmpty(prism.Source))
|
||||||
@@ -65,7 +65,7 @@ public class PrismController : Controller
|
|||||||
ModelState.AddModelError($"Splits[{i}].Destinations", "Destinations must sum up to a 100 maximum");
|
ModelState.AddModelError($"Splits[{i}].Destinations", "Destinations must sum up to a 100 maximum");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int j = 0; j < prism.Destinations.Length; j++)
|
for (int j = 0; j < prism.Destinations?.Length; j++)
|
||||||
{
|
{
|
||||||
var dest = prism.Destinations[j].Destination;
|
var dest = prism.Destinations[j].Destination;
|
||||||
//check that the source is a valid internet identifier, which is username@domain(and optional port)
|
//check that the source is a valid internet identifier, which is username@domain(and optional port)
|
||||||
|
|||||||
Reference in New Issue
Block a user