@if (InvalidId)
{
Invalid
}
An alias to reference in destinations of prisms.
@if (Invalid)
{
Invalid
}
Can be a lightning address, LNURL, or a custom value that another plugin supports
How many sats do you want to accumulate before sending? Leave blank to use default setting.
When a payout is being generated, how much of its amount in percentage should be excluded to cover the fee? Once the payment is settled, if the lightning node provides the exact fee, the balance is adjusted accordingly. Leave blank to use default setting.
@code {
public bool Invalid { get; set; } = false;
private PrismDestination WorkingCopy { get; set; }
private string WorkingId { get; set; }
private string OriginalWorkingId { get; set; }
[Parameter]
public Func ValidateDestination { get; set; }
[Parameter]
public Func ValidateId { get; set; }
[Parameter]
public PrismDestination Settings
{
get => WorkingCopy;
set
{
WorkingCopy = JObject.FromObject(value ?? new PrismDestination()).ToObject();
Invalid = false;
}
}
[Parameter]
public string Id
{
get => WorkingId;
set
{
if (OriginalWorkingId != value)
{
WorkingId = value;
OriginalWorkingId = value;
InvalidId = false;
}
}
}
public bool InvalidId { get; set; }
public async Task Update()
{
Invalid = !ValidateDestination.Invoke(WorkingCopy.Destination);
InvalidId = !ValidateId.Invoke(WorkingId);
if(Invalid || InvalidId)
{
return;
}
await SettingsChanged.InvokeAsync(WorkingCopy);
await IdChanged.InvokeAsync(WorkingId);
}
[Parameter]
public EventCallback SettingsChanged { get; set; }
[Parameter]
public EventCallback IdChanged { get; set; }
}