Skip to content

Commit

Permalink
Channel: hide single SCID if matches channel ID
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Dec 22, 2024
1 parent 32bc912 commit 9c1fc78
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions views/Channels/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,18 +405,28 @@ export default class ChannelView extends React.Component<
value={shortChannelId}
/>
)}
{!!alias_scids && alias_scids.length > 0 && (
<KeyValue
keyValue={
alias_scids.length > 1
? localeString('views.Channel.aliasScids')
: localeString('views.Channel.aliasScid')
}
value={PrivacyUtils.sensitiveValue(
alias_scids.join(', ')
)}
/>
)}
{!!alias_scids &&
alias_scids.length > 0 &&
// hide if single SCID that matches channel ID
!(
alias_scids.length === 1 &&
alias_scids[0].toString() === channelId
) && (
<KeyValue
keyValue={
alias_scids.length > 1
? localeString(
'views.Channel.aliasScids'
)
: localeString(
'views.Channel.aliasScid'
)
}
value={PrivacyUtils.sensitiveValue(
alias_scids.join(', ')
)}
/>
)}
{!!peer_scid_alias && (
<KeyValue
keyValue={localeString(
Expand Down

0 comments on commit 9c1fc78

Please sign in to comment.