support pending channels #325

Merged
jessopb merged 2 commits from pendingChannels into master 2020-06-19 18:15:38 +02:00
jessopb commented 2020-06-17 03:57:20 +02:00 (Migrated from github.com)
No description provided.
jessopb (Migrated from github.com) reviewed 2020-06-17 03:59:27 +02:00
@ -112,18 +112,19 @@ function handleClaimAction(state: State, action: any): State {
const byUri = Object.assign({}, state.claimsByUri);
const byId = Object.assign({}, state.byId);
jessopb (Migrated from github.com) commented 2020-06-17 03:59:27 +02:00

comment

comment
jessopb (Migrated from github.com) reviewed 2020-06-17 03:59:48 +02:00
@ -198,47 +205,37 @@ reducers[ACTIONS.FETCH_CLAIM_LIST_MINE_COMPLETED] = (state: State, action: any):
const byId = Object.assign({}, state.byId);
jessopb (Migrated from github.com) commented 2020-06-17 03:59:47 +02:00

comment

comment
jessopb (Migrated from github.com) reviewed 2020-06-17 04:01:38 +02:00
@ -277,3 +274,3 @@
myChannelClaims.add(claimId);
if (!byId[claimId]) {
if (!pendingIds.some(c => c === claimId)) {
byId[claimId] = claim;
jessopb (Migrated from github.com) commented 2020-06-17 04:01:38 +02:00

check flow error (can't .push null, but set to array above)

check flow error (can't .push null, but set to array above)
neb-b (Migrated from github.com) reviewed 2020-06-17 07:03:13 +02:00
neb-b (Migrated from github.com) left a comment

I think myChannelUrls could be removed.

selectChannelUrls could just look like

export const selectMyChannelUrls = createSelector(
  selectState,
  state => state.myChannelClaims.map(claim => claim.canonical_url)
);
I think `myChannelUrls` could be removed. `selectChannelUrls` could just look like ``` export const selectMyChannelUrls = createSelector( selectState, state => state.myChannelClaims.map(claim => claim.canonical_url) ); ```
@ -198,47 +205,37 @@ reducers[ACTIONS.FETCH_CLAIM_LIST_MINE_COMPLETED] = (state: State, action: any):
const byId = Object.assign({}, state.byId);
neb-b (Migrated from github.com) commented 2020-06-17 07:00:03 +02:00

comment

comment
jessopb commented 2020-06-19 04:11:51 +02:00 (Migrated from github.com)

I think myChannelUrls could be removed.

selectChannelUrls could just look like

export const selectMyChannelUrls = createSelector(
  selectState,
  state => state.myChannelClaims.map(claim => claim.canonical_url)
);

Changed this (myChannelClaims is actually [claimId, ...]). fall back on permanent_url for new channels still pending.

> I think `myChannelUrls` could be removed. > > `selectChannelUrls` could just look like > > ``` > export const selectMyChannelUrls = createSelector( > selectState, > state => state.myChannelClaims.map(claim => claim.canonical_url) > ); > ``` Changed this (myChannelClaims is actually [claimId, ...]). fall back on permanent_url for new channels still pending.
neb-b (Migrated from github.com) approved these changes 2020-06-19 17:07:14 +02:00
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-redux#325
No description provided.