~Final~ Discovery fixes/cleanup #2599

Merged
neb-b merged 16 commits from discovery-fixes into master 2019-07-05 20:03:12 +02:00
neb-b commented 2019-07-02 17:09:40 +02:00 (Migrated from github.com)
No description provided.
kauffj (Migrated from github.com) approved these changes 2019-07-03 18:24:49 +02:00
@ -56,17 +56,14 @@ function ClaimPreview(props: Props) {
const abandoned = !isResolvingUri && !claim && !placeholder;
const { isChannel } = parseURI(uri);
const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
kauffj (Migrated from github.com) commented 2019-07-03 18:21:56 +02:00

Below for loop can be functional. I admit that I may just enjoy rewriting these more than it is actually useful:

shouldHide = blackListedOutpoints.reduce((hide, outpoint) => 
  return hide || (outpoint.txid === claim.txid && outpoint.nout === claim.nout);
)
Below for loop can be functional. I admit that I may just enjoy rewriting these more than it is actually useful: ``` shouldHide = blackListedOutpoints.reduce((hide, outpoint) => return hide || (outpoint.txid === claim.txid && outpoint.nout === claim.nout); ) ```
@ -0,0 +1,23 @@
import { useEffect, useState } from 'react';
kauffj (Migrated from github.com) commented 2019-07-03 18:24:41 +02:00

No need to do this now, but I suspect these should end up with their own folder or another organizational method rather than being dumped in util.

No need to do this now, but I suspect these should end up with their own folder or another organizational method rather than being dumped in `util`.
neb-b (Migrated from github.com) reviewed 2019-07-05 20:12:59 +02:00
@ -56,17 +56,14 @@ function ClaimPreview(props: Props) {
const abandoned = !isResolvingUri && !claim && !placeholder;
const { isChannel } = parseURI(uri);
const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
neb-b (Migrated from github.com) commented 2019-07-05 20:12:59 +02:00

I was going to use this, but then I realized we should add a break statement to the for loop so we don't loop over the list when we don't need to. Now it will stop if it finds a matching item.

I was going to use this, but then I realized we should add a `break` statement to the for loop so we don't loop over the list when we don't need to. Now it will stop if it finds a matching item.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#2599
No description provided.