@@ -59,6 +59,7 @@ import to.bitkit.env.Env
5959import to.bitkit.ext.DatePattern
6060import to.bitkit.ext.amountOnClose
6161import to.bitkit.ext.createChannelDetails
62+ import to.bitkit.ext.resolveDisplayShortChannelId
6263import to.bitkit.ext.setClipboardText
6364import to.bitkit.models.Toast
6465import to.bitkit.models.msatFloorOf
@@ -220,6 +221,15 @@ private fun ChannelDetailContent(
220221
221222 val order = blocktankOrder ? : cjitEntry
222223
224+ val linkedOrderScid = when (order) {
225+ is IBtOrder -> order.channel?.shortChannelId
226+ is IcJitEntry -> order.channel?.shortChannelId
227+ else -> null
228+ }
229+ val displayShortChannelId = remember(channel, linkedOrderScid) {
230+ resolveDisplayShortChannelId(channel.details.shortChannelId, linkedOrderScid)
231+ }
232+
223233 val capacity = channel.details.channelValueSats.toLong()
224234 val localBalance = channel.details.amountOnClose.toLong()
225235 val remoteBalance = msatFloorOf(channel.details.inboundCapacityMsat).toLong()
@@ -429,18 +439,20 @@ private fun ChannelDetailContent(
429439 )
430440 }
431441
432- SectionRow (
433- name = stringResource(R .string.lightning__channel_id),
434- valueContent = {
435- CaptionB (
436- text = channel.details.channelId,
437- maxLines = 1 ,
438- overflow = TextOverflow .MiddleEllipsis ,
439- textAlign = TextAlign .End ,
440- )
441- },
442- onClick = { onCopyText(channel.details.channelId) }
443- )
442+ displayShortChannelId?.let { scid ->
443+ SectionRow (
444+ name = stringResource(R .string.lightning__channel_id),
445+ valueContent = {
446+ CaptionB (
447+ text = scid,
448+ maxLines = 1 ,
449+ overflow = TextOverflow .MiddleEllipsis ,
450+ textAlign = TextAlign .End ,
451+ )
452+ },
453+ onClick = { onCopyText(scid) }
454+ )
455+ }
444456
445457 channel.details.fundingTxo?.let { fundingTxo ->
446458 val channelPoint = " ${fundingTxo.txid} :${fundingTxo.vout} "
0 commit comments