fix(ui-thread): корректные поля channel для GetChannelMessages
This commit is contained in:
parent
f1fbb35296
commit
49ebf1605a
@ -1,2 +1,2 @@
|
||||
client.version=1.2.61
|
||||
server.version=1.2.55
|
||||
client.version=1.2.62
|
||||
server.version=1.2.56
|
||||
|
||||
@ -100,8 +100,8 @@ function parseThreadSelector(route) {
|
||||
},
|
||||
channel: {
|
||||
ownerBlockchainName: '',
|
||||
rootBlockNumber: null,
|
||||
rootBlockHash: '0',
|
||||
channelRootBlockNumber: null,
|
||||
channelRootBlockHash: '0',
|
||||
},
|
||||
};
|
||||
}
|
||||
@ -116,8 +116,8 @@ function parseThreadSelector(route) {
|
||||
},
|
||||
channel: {
|
||||
ownerBlockchainName: String(params.channelOwnerBlockchainName || ''),
|
||||
rootBlockNumber: toSafeInt(params.channelRootBlockNumber),
|
||||
rootBlockHash: normalizeRouteHash(params.channelRootBlockHash),
|
||||
channelRootBlockNumber: toSafeInt(params.channelRootBlockNumber),
|
||||
channelRootBlockHash: normalizeRouteHash(params.channelRootBlockHash),
|
||||
},
|
||||
};
|
||||
}
|
||||
@ -132,10 +132,12 @@ function allFeedSummaries() {
|
||||
}
|
||||
|
||||
function resolveChannelDisplayName(channelSelector) {
|
||||
if (!channelSelector?.ownerBlockchainName || channelSelector?.rootBlockNumber == null) return '';
|
||||
const rootNumber = channelSelector?.channelRootBlockNumber ?? channelSelector?.rootBlockNumber;
|
||||
const rootHashRaw = channelSelector?.channelRootBlockHash ?? channelSelector?.rootBlockHash;
|
||||
if (!channelSelector?.ownerBlockchainName || rootNumber == null) return '';
|
||||
const ownerBch = String(channelSelector.ownerBlockchainName);
|
||||
const rootNo = Number(channelSelector.rootBlockNumber);
|
||||
const rootHash = normalizeRouteHash(channelSelector.rootBlockHash);
|
||||
const rootNo = Number(rootNumber);
|
||||
const rootHash = normalizeRouteHash(rootHashRaw);
|
||||
|
||||
const found = allFeedSummaries().find((summary) => (
|
||||
String(summary?.channel?.ownerBlockchainName || '') === ownerBch
|
||||
@ -167,15 +169,15 @@ function buildThreadRouteFromTarget(target, selector) {
|
||||
target.blockNumber,
|
||||
].join('/');
|
||||
}
|
||||
if (!selector?.channel?.ownerBlockchainName || selector.channel.rootBlockNumber == null) return '';
|
||||
if (!selector?.channel?.ownerBlockchainName || selector.channel.channelRootBlockNumber == null) return '';
|
||||
return [
|
||||
'channel-thread-view',
|
||||
encodeRoutePart(target.blockchainName),
|
||||
target.blockNumber,
|
||||
normalizeRouteHash(target.blockHash),
|
||||
encodeRoutePart(selector.channel.ownerBlockchainName),
|
||||
selector.channel.rootBlockNumber,
|
||||
normalizeRouteHash(selector.channel.rootBlockHash),
|
||||
selector.channel.channelRootBlockNumber,
|
||||
normalizeRouteHash(selector.channel.channelRootBlockHash),
|
||||
].join('/');
|
||||
}
|
||||
|
||||
@ -641,8 +643,8 @@ export function render({ navigate, route }) {
|
||||
}
|
||||
selector.channel = {
|
||||
ownerBlockchainName: ownerBch,
|
||||
rootBlockNumber: rootNo,
|
||||
rootBlockHash: rootHash,
|
||||
channelRootBlockNumber: rootNo,
|
||||
channelRootBlockHash: rootHash,
|
||||
};
|
||||
|
||||
let resolvedHash = normalizeMessageHash(resolvedMessage?.blockHash);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user