fix claim preview blocking
This commit is contained in:
parent
0e1a501ba3
commit
e7af386608
1 changed files with 13 additions and 8 deletions
|
@ -56,14 +56,19 @@ function ClaimPreview(props: Props) {
|
||||||
const abandoned = !isResolvingUri && !claim && !placeholder;
|
const abandoned = !isResolvingUri && !claim && !placeholder;
|
||||||
const { isChannel } = parseURI(uri);
|
const { isChannel } = parseURI(uri);
|
||||||
const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
|
const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
|
||||||
const shouldHide =
|
|
||||||
abandoned ||
|
let shouldHide = abandoned || (!claimIsMine && obscureNsfw && nsfw);
|
||||||
(!claimIsMine && obscureNsfw && nsfw) ||
|
|
||||||
(claim &&
|
// This will be replaced once blocking is done at the wallet server level
|
||||||
blackListedOutpoints &&
|
if (claim && !shouldHide && blackListedOutpoints) {
|
||||||
blackListedOutpoints.reduce((hide, outpoint) => {
|
for (let i = 0; i < blackListedOutpoints.length; i += 1) {
|
||||||
return hide || (outpoint.txid === claim.txid && outpoint.nout === claim.nout);
|
const outpoint = blackListedOutpoints[i];
|
||||||
}));
|
if (outpoint.txid === claim.txid && outpoint.nout === claim.nout) {
|
||||||
|
shouldHide = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function handleContextMenu(e) {
|
function handleContextMenu(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
Loading…
Reference in a new issue