mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
Guard the LND channel information modal explorer link (#1606 parity)
Address review F6 on #1625: the LND channel information modal has the same unguarded selNode.settings.blockExplorerUrl binding as the CLN one, and it is opened without selNode from the active-HTLCs and channel-backup tables, so it can blank out the same way. Guard the explorer link (*ngIf + a no-op click when the url is absent) so a missing selNode can no longer blank the dialog. Eclair's modal doesn't use selNode.settings, so it needs no change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9c3cd983b4
commit
cbf7a14c95
3 changed files with 7 additions and 2 deletions
|
|
@ -25,7 +25,11 @@ this release should add its entry under the appropriate section below.
|
|||
Connected, Private and the balances all showed no value. Because a disconnected channel moves to
|
||||
the pending/inactive table, this is exactly what was seen on "View Info" for a disconnected
|
||||
channel. The pending table now passes `selNode` (matching the open table), and the modal guards
|
||||
the explorer link so a missing `selNode` can no longer blank the dialog.
|
||||
the explorer link so a missing `selNode` can no longer blank the dialog. The LND channel
|
||||
information modal had the same unguarded `selNode.settings.blockExplorerUrl` binding (reachable
|
||||
from the active-HTLCs and channel-backup tables, which open it without `selNode`), so the same
|
||||
guard was applied there for parity. Eclair's modal doesn't use `selNode.settings`, so it is
|
||||
unaffected.
|
||||
|
||||
## Developer Tooling
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<h4 fxLayoutAlign="start" class="font-bold-500">Channel Point</h4>
|
||||
<span tabindex="5" class="foreground-secondary-text">
|
||||
{{channel.channel_point}}
|
||||
<fa-icon matTooltip="{{'Link to ' + selNode.settings.blockExplorerUrl}}" class="ml-1 fa-icon-primary" [icon]="faUpRightFromSquare" (click)="onExplorerClicked()"/>
|
||||
<fa-icon *ngIf="selNode?.settings?.blockExplorerUrl" matTooltip="{{'Link to ' + selNode?.settings?.blockExplorerUrl}}" class="ml-1 fa-icon-primary" [icon]="faUpRightFromSquare" (click)="onExplorerClicked()"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ export class ChannelInformationComponent implements OnInit {
|
|||
}
|
||||
|
||||
onExplorerClicked() {
|
||||
if (!this.selNode?.settings?.blockExplorerUrl) { return; }
|
||||
window.open(this.selNode.settings.blockExplorerUrl + '/tx/' + this.channel.channel_point, '_blank');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue