From 9c1fc7894582acb42333e0cc436ca521c66f89c8 Mon Sep 17 00:00:00 2001 From: Evan Kaloudis Date: Sun, 22 Dec 2024 00:21:42 -0500 Subject: [PATCH] Channel: hide single SCID if matches channel ID --- views/Channels/Channel.tsx | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/views/Channels/Channel.tsx b/views/Channels/Channel.tsx index efb1d55be..fab4b11c3 100644 --- a/views/Channels/Channel.tsx +++ b/views/Channels/Channel.tsx @@ -405,18 +405,28 @@ export default class ChannelView extends React.Component< value={shortChannelId} /> )} - {!!alias_scids && alias_scids.length > 0 && ( - 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 + ) && ( + 1 + ? localeString( + 'views.Channel.aliasScids' + ) + : localeString( + 'views.Channel.aliasScid' + ) + } + value={PrivacyUtils.sensitiveValue( + alias_scids.join(', ') + )} + /> + )} {!!peer_scid_alias && (