show file page even if blacklistedOutpoints is empty
This commit is contained in:
parent
c67b92cfa4
commit
3fba7f0797
1 changed files with 10 additions and 7 deletions
|
@ -13,7 +13,7 @@ import { formatLbryUrlForWeb } from 'util/url';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isResolvingUri: boolean,
|
isResolvingUri: boolean,
|
||||||
resolveUri: string => void,
|
resolveUri: (string) => void,
|
||||||
isSubscribed: boolean,
|
isSubscribed: boolean,
|
||||||
uri: string,
|
uri: string,
|
||||||
claim: StreamClaim,
|
claim: StreamClaim,
|
||||||
|
@ -39,6 +39,7 @@ function ShowPage(props: Props) {
|
||||||
isSubscribed,
|
isSubscribed,
|
||||||
claimIsPending,
|
claimIsPending,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const signingChannel = claim && claim.signing_channel;
|
const signingChannel = claim && claim.signing_channel;
|
||||||
const canonicalUrl = claim && claim.canonical_url;
|
const canonicalUrl = claim && claim.canonical_url;
|
||||||
const claimExists = claim !== null && claim !== undefined;
|
const claimExists = claim !== null && claim !== undefined;
|
||||||
|
@ -91,14 +92,16 @@ function ShowPage(props: Props) {
|
||||||
);
|
);
|
||||||
} else if (claim.name.length && claim.name[0] === '@') {
|
} else if (claim.name.length && claim.name[0] === '@') {
|
||||||
innerContent = <ChannelPage uri={uri} location={location} />;
|
innerContent = <ChannelPage uri={uri} location={location} />;
|
||||||
} else if (claim && blackListedOutpoints) {
|
} else if (claim) {
|
||||||
let isClaimBlackListed = false;
|
let isClaimBlackListed = false;
|
||||||
|
|
||||||
isClaimBlackListed = blackListedOutpoints.some(
|
isClaimBlackListed =
|
||||||
outpoint =>
|
blackListedOutpoints &&
|
||||||
(signingChannel && outpoint.txid === signingChannel.txid && outpoint.nout === signingChannel.nout) ||
|
blackListedOutpoints.some(
|
||||||
(outpoint.txid === claim.txid && outpoint.nout === claim.nout)
|
(outpoint) =>
|
||||||
);
|
(signingChannel && outpoint.txid === signingChannel.txid && outpoint.nout === signingChannel.nout) ||
|
||||||
|
(outpoint.txid === claim.txid && outpoint.nout === claim.nout)
|
||||||
|
);
|
||||||
|
|
||||||
if (isClaimBlackListed && !claimIsMine) {
|
if (isClaimBlackListed && !claimIsMine) {
|
||||||
innerContent = (
|
innerContent = (
|
||||||
|
|
Loading…
Reference in a new issue