Support for lbrynet daemon v0.30.0 #79

Merged
eukreign merged 2 commits from lbrynet30 into master 2018-10-26 20:09:44 +02:00
eukreign commented 2018-09-24 07:16:08 +02:00 (Migrated from github.com)

Ready for review

Ready for review
neb-b (Migrated from github.com) reviewed 2018-10-25 18:20:04 +02:00
@ -170,3 +162,4 @@
Object.keys(claimsByUri).forEach((uri) => {
if (claimsByUri[uri] === claimId) {
delete claimsByUri[uri];
}
neb-b (Migrated from github.com) commented 2018-10-25 18:20:04 +02:00

This never worked, not sure how the channel selector worked in the first place ¯_(ツ)_/¯

This never worked, not sure how the channel selector worked in the first place ¯\_(ツ)_/¯
kauffj (Migrated from github.com) reviewed 2018-10-25 18:27:46 +02:00
@ -170,3 +162,4 @@
Object.keys(claimsByUri).forEach((uri) => {
if (claimsByUri[uri] === claimId) {
delete claimsByUri[uri];
}
kauffj (Migrated from github.com) commented 2018-10-25 18:27:46 +02:00

\ you dropped this

\ you dropped this
neb-b (Migrated from github.com) reviewed 2018-10-25 18:30:22 +02:00
@ -170,3 +162,4 @@
Object.keys(claimsByUri).forEach((uri) => {
if (claimsByUri[uri] === claimId) {
delete claimsByUri[uri];
}
neb-b (Migrated from github.com) commented 2018-10-25 18:30:22 +02:00

Appreciate it ¯\_(ツ)_/¯

Appreciate it ¯\\\_(ツ)_/¯
neb-b (Migrated from github.com) reviewed 2018-10-25 18:55:08 +02:00
neb-b (Migrated from github.com) commented 2018-10-25 18:55:08 +02:00

The response used to just be a boolean

The response used to just be a boolean
neb-b (Migrated from github.com) reviewed 2018-10-25 18:57:13 +02:00
@ -77,2 +69,3 @@
.forEach(pendingClaim => {
.filter((pendingClaim) => byId[pendingClaim.claim_id])
.forEach((pendingClaim) => {
delete pendingById[pendingClaim.claim_id];
neb-b (Migrated from github.com) commented 2018-10-25 18:57:13 +02:00

This is probably the biggest change, now we are only looking at confirmations to see if a claim is pending. Before it wouldn't be returned in claim_list_mine until it was confirmed so we had to keep track of it ourselves.

This is probably the biggest change, now we are only looking at `confirmations` to see if a claim is pending. Before it wouldn't be returned in `claim_list_mine` until it was confirmed so we had to keep track of it ourselves.
skhameneh (Migrated from github.com) approved these changes 2018-10-26 19:55:32 +02:00
skhameneh (Migrated from github.com) left a comment

Nothing major, just a few optimizations and formatting comments.

As per formatting, extraneous code gets reduced at build time; we can focus on legibility when writing source. (if you were trying to be minimalistic)

Nothing major, just a few optimizations and formatting comments. As per formatting, extraneous code gets reduced at build time; we can focus on legibility when writing source. (if you were trying to be minimalistic)
skhameneh (Migrated from github.com) commented 2018-10-26 19:50:09 +02:00

Adjust parens:
claims.filter(claim => claim.type && claim.type.match(/claim|update/))
to claims.filter(claim => ( claim.type && claim.type.match(/claim|update/) ))

Just for legibility

Adjust parens: ```claims.filter(claim => claim.type && claim.type.match(/claim|update/))``` to ```claims.filter(claim => ( claim.type && claim.type.match(/claim|update/) ))``` Just for legibility
skhameneh (Migrated from github.com) commented 2018-10-26 19:50:44 +02:00

You can also combine the filter and forEach to prevent lopping twice

You can also combine the filter and forEach to prevent lopping twice
skhameneh (Migrated from github.com) commented 2018-10-26 19:51:34 +02:00

Can combine the filter and forEach to prevent looping twice

Can combine the filter and forEach to prevent looping twice
@ -31,15 +30,43 @@ export const selectClaimsByUri = createSelector(selectState, selectClaimsById, (
export const selectAllClaimsByChannel = createSelector(
selectState,
skhameneh (Migrated from github.com) commented 2018-10-26 19:53:29 +02:00

Would you mind making each arrow fn => have parens since it's multi-line?

export const selectPendingClaims = createSelector(selectState, state => (
  Object.values(state.pendingById || {})
));

Not required and this is subjective to preference, let me know what you think, I find it easier to read.

Would you mind making each arrow fn ` => ` have parens since it's multi-line? ``` export const selectPendingClaims = createSelector(selectState, state => ( Object.values(state.pendingById || {}) )); ``` Not required and this is subjective to preference, let me know what you think, I find it easier to read.
@ -132,3 +132,3 @@
amount,
fee: amount < 0 ? (-1 * tx.fee) / append.length : 0,
fee: amount < 0 ? -1 * tx.fee / append.length : 0,
claim_id: item.claim_id,
skhameneh (Migrated from github.com) commented 2018-10-26 19:54:03 +02:00

why remove the parens?

why remove the parens?
neb-b (Migrated from github.com) reviewed 2018-10-26 19:59:05 +02:00
@ -31,15 +30,43 @@ export const selectClaimsByUri = createSelector(selectState, selectClaimsById, (
export const selectAllClaimsByChannel = createSelector(
selectState,
neb-b (Migrated from github.com) commented 2018-10-26 19:59:05 +02:00

We can add that, I don't really have a preference.

I belive it's a prettier option

We can add that, I don't really have a preference. I belive it's a prettier option
neb-b (Migrated from github.com) reviewed 2018-10-26 20:09:17 +02:00
@ -132,3 +132,3 @@
amount,
fee: amount < 0 ? (-1 * tx.fee) / append.length : 0,
fee: amount < 0 ? -1 * tx.fee / append.length : 0,
claim_id: item.claim_id,
neb-b (Migrated from github.com) commented 2018-10-26 20:09:16 +02:00

That's just prettier doing it's thing I belive. Although I'm not sure why that is happening now. It should have been run on that file.

That's just prettier doing it's thing I belive. Although I'm not sure why that is happening now. It should have been run on that file.
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#79
No description provided.