@using Newtonsoft.Json.Linq
@if (InvalidId) { Invalid } An alias to reference in destinations of prisms.
@if (WorkingCopy is not null) {
@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.
@if (!string.IsNullOrEmpty(OriginalWorkingId)) { }
}
@code { public bool Invalid { get; set; } = false; private PrismDestination WorkingCopy { get; set; } private string WorkingId { get; set; } private string OriginalWorkingId { get; set; } [Parameter] public EventCallback OnCancel { 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 OnUpdate.InvokeAsync((WorkingId, WorkingCopy)); } [Parameter] public EventCallback<(string Id, PrismDestination? Destination)> OnUpdate { get; set; } private Task Cancel() { return OnCancel.InvokeAsync(null); } }