diff --git a/VERSION.properties b/VERSION.properties index 4990d6e..41e009a 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.63 -server.version=1.2.57 +client.version=1.2.64 +server.version=1.2.58 diff --git a/shine-UI/js/pages/channel-thread-view.js b/shine-UI/js/pages/channel-thread-view.js index 45977fc..02b8a19 100644 --- a/shine-UI/js/pages/channel-thread-view.js +++ b/shine-UI/js/pages/channel-thread-view.js @@ -161,24 +161,25 @@ function buildBackRoute(selector) { function buildThreadRouteFromTarget(target, selector) { if (!target) return ''; - if (selector?.short?.ownerBlockchainName && selector?.short?.channelName) { - return [ - 'channel', - encodeRoutePart(selector.short.ownerBlockchainName), - encodeRoutePart(selector.short.channelName), - target.blockNumber, - ].join('/'); - } - if (!selector?.channel?.ownerBlockchainName || selector.channel.channelRootBlockNumber == null) return ''; - return [ + const ownerBch = String(selector?.channel?.ownerBlockchainName || '').trim(); + const rootNo = Number(selector?.channel?.channelRootBlockNumber); + const rootHash = normalizeRouteHash(selector?.channel?.channelRootBlockHash); + const base = [ 'channel-thread-view', encodeRoutePart(target.blockchainName), target.blockNumber, normalizeRouteHash(target.blockHash), - encodeRoutePart(selector.channel.ownerBlockchainName), - selector.channel.channelRootBlockNumber, - normalizeRouteHash(selector.channel.channelRootBlockHash), - ].join('/'); + ]; + + if (ownerBch && Number.isFinite(rootNo) && rootNo >= 0) { + base.push( + encodeRoutePart(ownerBch), + String(rootNo), + normalizeRouteHash(rootHash), + ); + } + + return base.join('/'); } function buildTargetFromNode(node) {