diff --git a/src/Pages/Nodes.razor b/src/Pages/Nodes.razor
index f2a72c52..369953ce 100644
--- a/src/Pages/Nodes.razor
+++ b/src/Pages/Nodes.razor
@@ -472,21 +472,38 @@
+ @* MinMaxLimitsOverride is required: Blazorise defaults it to Ignore, which makes Min inert. *@
@if (_selectedNodeForLiquidity.AutoRebalanceEnabled)
{
- Rebalance Fee Budget (sats)
- Max sats spendable on rebalance fees per refresh period. 0 = unset.
-
+
+ Rebalance Fee Budget (sats)
+ Max sats spendable on rebalance fees per refresh period. Required: the rebalancer skips a node with no budget.
+
+
+ Set a budget above 0, or the rebalancer will skip this node
+
+
+
Budget Refresh Interval (days)
Period after which the rebalance fee budget resets. 0 = unset.
-
+
@@ -495,14 +512,24 @@
Max Rebalances In Flight
Maximum concurrent (Pending/InFlight) rebalances for this node. 0 = unset.
-
+
Max Cost-to-Earn Ratio
Profitability gate: spend at most this fraction of a channel's earn rate on rebalancing it (e.g. 0.5 = 50%). 0 = unset.
-
+
@@ -948,7 +975,13 @@
private async Task SaveAndCloseLiquidityManagementModal()
{
- if (_nodeLiquidityValidationsRef != null && await _nodeLiquidityValidationsRef.ValidateAll() && _selectedNodeForLiquidity != null)
+ if (_nodeLiquidityValidationsRef != null && !await _nodeLiquidityValidationsRef.ValidateAll())
+ {
+ ToastService.ShowError("Please fix the errors");
+ return;
+ }
+
+ if (_nodeLiquidityValidationsRef != null && _selectedNodeForLiquidity != null)
{
// Convert BTC back to sats and percent back to ratio (0-1)
@@ -1070,5 +1103,18 @@
}
}
+ // AutoRebalanceJob skips any node whose budget is null or 0, silently and forever, so the page
+ // that owns the field refuses to save the gate and an empty budget together.
+ private void ValidateRebalanceBudget(ValidatorEventArgs arg)
+ {
+ arg.Status = ValidationStatus.Success;
+ if (_selectedNodeForLiquidity?.AutoRebalanceEnabled != true) return;
+
+ if (arg.Value is not long budget || budget <= 0)
+ {
+ arg.Status = ValidationStatus.Error;
+ arg.ErrorText = "Automated rebalancing needs a fee budget above 0; the rebalancer skips nodes without one.";
+ }
+ }
}
\ No newline at end of file