Merge branch 'hackrush01-regression-fix-501'

This commit is contained in:
Jeremy Kauffman 2017-08-28 11:54:00 -04:00
commit 8838029122

View file

@ -51,6 +51,14 @@ class FileList extends React.PureComponent {
};
}
getChannelSignature(fileInfo) {
if (fileInfo.value) {
return fileInfo.value.publisherSignature.certificateId;
} else {
return fileInfo.metadata.publisherSignature.certificateId;
}
}
handleSortChanged(event) {
this.setState({
sortBy: event.target.value,
@ -68,10 +76,7 @@ class FileList extends React.PureComponent {
if (fileInfo.channel_name) {
uriParams.channelName = fileInfo.channel_name;
uriParams.contentName = fileInfo.name;
if (fileInfo.value && fileInfo.value.publisherSignature) {
// The following can be done as certificateID of a claim is nothing but the claimID of the channel.
uriParams.claimId = fileInfo.value.publisherSignature.certificateId;
}
uriParams.claimId = this.getChannelSignature(fileInfo);
} else {
uriParams.claimId = fileInfo.claim_id;
uriParams.name = fileInfo.name;