Merge pull request #2674 from lbryio/filterChannelOutpoints
claim preview filter now checks signing channel outpoints
This commit is contained in:
commit
f532ba0d8b
1 changed files with 9 additions and 2 deletions
|
@ -71,15 +71,22 @@ function ClaimPreview(props: Props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const isChannel = isValid ? parseURI(uri).isChannel : false;
|
const isChannel = isValid ? parseURI(uri).isChannel : false;
|
||||||
|
const signingChannel = claim && claim.signing_channel;
|
||||||
|
|
||||||
let shouldHide = abandoned || (!claimIsMine && obscureNsfw && nsfw);
|
let shouldHide = abandoned || (!claimIsMine && obscureNsfw && nsfw);
|
||||||
|
|
||||||
// This will be replaced once blocking is done at the wallet server level
|
// This will be replaced once blocking is done at the wallet server level
|
||||||
if (claim && !shouldHide && blackListedOutpoints) {
|
if (claim && !shouldHide && blackListedOutpoints) {
|
||||||
shouldHide = blackListedOutpoints.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
|
shouldHide = blackListedOutpoints.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
|
||||||
}
|
}
|
||||||
|
// We're checking to see if the stream outpoint
|
||||||
|
// or signing channel outpoint is in the filter list
|
||||||
if (claim && !shouldHide && filteredOutpoints) {
|
if (claim && !shouldHide && filteredOutpoints) {
|
||||||
shouldHide = filteredOutpoints.some(outpoint => outpoint.txid === claim.txid && outpoint.nout === claim.nout);
|
shouldHide = filteredOutpoints.some(
|
||||||
|
outpoint =>
|
||||||
|
(signingChannel && outpoint.txid === signingChannel.txid && outpoint.nout === signingChannel.nout) ||
|
||||||
|
(outpoint.txid === claim.txid && outpoint.nout === claim.nout)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleContextMenu(e) {
|
function handleContextMenu(e) {
|
||||||
|
|
Loading…
Reference in a new issue