From f02dcb7fe7487fe36a71a7a2083493d1c1565d43 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Sat, 19 Jun 2021 10:33:32 +0800 Subject: [PATCH] No need to resolve as the uri should have all we need --- ui/redux/actions/comments.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ui/redux/actions/comments.js b/ui/redux/actions/comments.js index d30904438..53f344a6c 100644 --- a/ui/redux/actions/comments.js +++ b/ui/redux/actions/comments.js @@ -566,11 +566,7 @@ function doCommentModToggleBlock( blockerChannelClaims = blockerChannelClaims.filter((x) => blockerIds.includes(x.claim_id)); } - const commenterClaim = selectClaimsByUri(state)[commenterUri]; - if (!commenterClaim) { - console.error("Can't find claim to block"); // eslint-disable-line - return; - } + const { channelName, channelClaimId } = parseURI(commenterUri); const creatorClaim = selectClaimsById(state)[creatorId]; if (creatorId && !creatorClaim) { @@ -587,8 +583,8 @@ function doCommentModToggleBlock( }, }); - const commenterIdForAction = commenterClaim ? commenterClaim.claim_id : null; - const commenterNameForAction = commenterClaim ? commenterClaim.name : null; + const commenterIdForAction = channelClaimId; + const commenterNameForAction = channelName; let channelSignatures = [];