store user supports #144

Merged
neb-b merged 2 commits from supports into master 2019-05-14 00:55:41 +02:00
neb-b commented 2019-05-10 06:58:27 +02:00 (Migrated from github.com)

The new sdk removed supports from claim_list, so we have to fetch and store them on our own

The new sdk removed supports from `claim_list`, so we have to fetch and store them on our own
akinwale (Migrated from github.com) reviewed 2019-05-10 06:58:27 +02:00
neb-b (Migrated from github.com) reviewed 2019-05-10 07:01:35 +02:00
neb-b (Migrated from github.com) commented 2019-05-10 07:01:34 +02:00

I just moved the old reducer functions to use the handleActions util. The actual changes I made are from here.
L92 - L133

I just moved the old reducer functions to use the `handleActions` util. The actual changes I made are from here. L92 - L133
neb-b commented 2019-05-10 07:21:01 +02:00 (Migrated from github.com)

@akinwale not sure you can unlock tips in the android app, but if you can, you will need to use this.

Desktop commit to work with it: 6f1201d898

@akinwale not sure you can unlock tips in the android app, but if you can, you will need to use this. Desktop commit to work with it: https://github.com/lbryio/lbry-desktop/commit/6f1201d898caa53b50e0be340b945761418a144b
kauffj (Migrated from github.com) approved these changes 2019-05-14 00:17:50 +02:00
kauffj (Migrated from github.com) left a comment

lgtm

lgtm
@ -86,1 +88,4 @@
export const selectSupportsById = createSelector(
selectState,
state => state.supports || {}
);
kauffj (Migrated from github.com) commented 2019-05-14 00:17:44 +02:00

If we set the default state values to {}, are the or clauses lines really necessary? (more curiosity than an objection)

If we set the default state values to `{}`, are the or clauses lines really necessary? (more curiosity than an objection)
neb-b (Migrated from github.com) reviewed 2019-05-14 00:55:21 +02:00
@ -86,1 +88,4 @@
export const selectSupportsById = createSelector(
selectState,
state => state.supports || {}
);
neb-b (Migrated from github.com) commented 2019-05-14 00:55:21 +02:00

I've been doing that to safeguard if the value ends up being set to null or undefined for some reason. Not that I noticed it happening, but just in case.

I've been doing that to safeguard if the value ends up being set to `null` or `undefined` for some reason. Not that I noticed it happening, but just in case.
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#144
No description provided.