Channel Rebalance
Circular Rebalance is a payment you make to *yourselves* to affect a relative change in the balances of two channels. This is accomplished by sending payment out from the selected channel and receiving it back on the channel with the selected peer. Please note, you will be paying routing fee to balance the channels in this manner.

Channel Peer: {{selChannel.remote_alias | titlecase}}

Channel ID: {{selChannel.chan_id}}

{{inputFormLabel}}
(Local Bal: {{selChannel?.local_balance}}, Remaining: {{selChannel?.local_balance - ((inputFormGroup.controls.rebalanceAmount.value) ? inputFormGroup.controls.rebalanceAmount.value : 0)}}) Sats Amount is required. Amount must be a positive number. Amount must be less than or equal to {{selChannel?.local_balance}}. {{activeChannel.remote_alias || activeChannel.chan_id}} Peer is required.
{{feeFormLabel}}
Estimated Fee: {{queryRoute && queryRoute.routes && queryRoute.routes.length > 0 && queryRoute.routes[0].total_fees_msat ? queryRoute.routes[0].total_fees_msat : 0}} mSats | Number of Hops: {{queryRoute && queryRoute.routes && queryRoute.routes.length > 0 && queryRoute.routes[0].hops && queryRoute.routes[0].hops.length ? queryRoute.routes[0].hops.length : 0}}
{{feeLimitType.name}} {{feeFormGroup.controls.selFeeLimitType.value ? feeFormGroup.controls.selFeeLimitType.value.placeholder : feeLimitTypes[0].placeholder}} is required. {{feeFormGroup.controls.selFeeLimitType.value ? feeFormGroup.controls.selFeeLimitType.value.placeholder : feeLimitTypes[0].placeholder}} must be a positive number.
Invoice/Payment
{{!flgInvoiceGenerated ? 'Generating invoice...' : flgReusingInvoice ? 'Invoice re-used' : 'Invoice generated'}}check
{{paymentRequest}}
{{!flgInvoiceGenerated && !flgPaymentSent ? 'Payment waiting for Invoice' : (!flgPaymentSent ? 'Processing payment...' : (paymentStatus?.error ? 'Payment failed' : 'Payment successful'))}}{{paymentStatus?.error ? 'close' : 'check'}}

{{paymentStatus && paymentStatus.payment_hash ? 'Rebalance Successful.' : 'Rebalance Failed.'}}

{{'Error: ' + (paymentStatus.error.error.error ? paymentStatus.error.error.error : paymentStatus.error.error ? paymentStatus.error.error : paymentStatus.error ? paymentStatus.error : 'Unknown')}}

Payment Hash

{{paymentStatus.payment_hash}}

Total Fees ({{paymentStatus.payment_route.total_fees_msat ? 'mSats' : 'Sats'}})

{{paymentStatus.payment_route.total_fees_msat ? paymentStatus.payment_route.total_fees_msat : paymentStatus.payment_route.total_fees ? paymentStatus.payment_route.total_fees : 0}}

Number of Hops

{{paymentStatus && paymentStatus.payment_route && paymentStatus.payment_route.hops && paymentStatus.payment_route.hops.length ? paymentStatus.payment_route.hops.length : 0}}