[WIP] lbryio internal API calls and rewards component #1

Merged
akinwale merged 2 commits from initial-module into master 2018-07-23 15:12:18 +02:00
akinwale commented 2018-07-03 12:31:20 +02:00 (Migrated from github.com)
No description provided.
kauffj (Migrated from github.com) reviewed 2018-07-03 12:31:20 +02:00
skhameneh (Migrated from github.com) reviewed 2018-07-03 12:31:20 +02:00
neb-b (Migrated from github.com) requested changes 2018-07-03 17:37:20 +02:00
neb-b (Migrated from github.com) left a comment

Two comments, not sure about the window one. That might not be needed.

Two comments, not sure about the window one. That might not be needed.
neb-b (Migrated from github.com) commented 2018-07-03 17:37:01 +02:00

Might as well export the redux stuff too.

Might as well export the redux stuff too.
neb-b (Migrated from github.com) commented 2018-07-03 17:36:11 +02:00

Do you need to check that window is an object so it doesn't break android?

Do you need to check that `window` is an object so it doesn't break android?
kauffj (Migrated from github.com) reviewed 2018-07-03 17:44:07 +02:00
kauffj (Migrated from github.com) left a comment

Comments

Comments
kauffj (Migrated from github.com) commented 2018-07-03 17:42:34 +02:00

This should probably be AUTHENTICATION_START, AUTHENTICATION_SUCCESS, and AUTHENTICATION_FAIL. (AUTH_XXX would also be acceptable).

171ea2b97b/src/renderer/constants/action_types.js (L2)

This should probably be `AUTHENTICATION_START`, `AUTHENTICATION_SUCCESS`, and `AUTHENTICATION_FAIL`. (`AUTH_XXX` would also be acceptable). https://github.com/lbryio/lbry-app/blob/171ea2b97b6a393c880995a42cd4189cdda3e5bd/src/renderer/constants/action_types.js#L2
kauffj (Migrated from github.com) commented 2018-07-03 17:38:48 +02:00

Isn't this more like doAuthentication then doNewInstallation?

Isn't this more like `doAuthentication` then `doNewInstallation`?
kauffj (Migrated from github.com) commented 2018-07-03 17:44:00 +02:00

Guessing you just haven't gotten to it, but worth porting this too 171ea2b97b/src/renderer/redux/actions/user.js (L39)

Guessing you just haven't gotten to it, but worth porting this too https://github.com/lbryio/lbry-app/blob/171ea2b97b6a393c880995a42cd4189cdda3e5bd/src/renderer/redux/actions/user.js#L39
kauffj (Migrated from github.com) reviewed 2018-07-06 23:21:04 +02:00
kauffj (Migrated from github.com) commented 2018-07-06 23:21:04 +02:00

@seanyesmunt @akinwale if window isn't safe to use on Android then I'd propose the convention that it's unacceptable to use it in all shared JS code and instead must be passed in as a dependency. Littering code with window && window.foo() will hurt maintainability, readability, and introduce additional sources of error.

@seanyesmunt @akinwale if `window` isn't safe to use on Android then I'd propose the convention that it's unacceptable to use it in all shared JS code and instead must be passed in as a dependency. Littering code with `window && window.foo()` will hurt maintainability, readability, and introduce additional sources of error.
kauffj (Migrated from github.com) reviewed 2018-07-06 23:21:52 +02:00
kauffj (Migrated from github.com) commented 2018-07-06 23:21:52 +02:00

To be clear, I'm not suggesting passing in window, specifically, but instead a generic term (such as store or whatever is appropriate) to be used in it's stead.

To be clear, I'm not suggesting passing in `window`, specifically, but instead a generic term (such as `store` or whatever is appropriate) to be used in it's stead.
akinwale (Migrated from github.com) reviewed 2018-07-18 13:02:09 +02:00
akinwale (Migrated from github.com) commented 2018-07-18 13:02:08 +02:00

Looks like window exists is actually already set to global React Native (https://github.com/facebook/react-native/blob/master/Libraries/Core/InitializeCore.js#L34-L36), so I can remove this.

Looks like `window` exists is actually already set to `global` React Native (https://github.com/facebook/react-native/blob/master/Libraries/Core/InitializeCore.js#L34-L36), so I can remove this.
akinwale commented 2018-07-18 13:56:55 +02:00 (Migrated from github.com)

@kauffj @seanyesmunt Pushed a new commit which includes the rewards actions/reducers/selectors, user reducers and selectors and a subset of user actions.

@kauffj @seanyesmunt Pushed a new commit which includes the rewards actions/reducers/selectors, user reducers and selectors and a subset of user actions.
skhameneh commented 2018-07-18 15:45:16 +02:00 (Migrated from github.com)

Looks good to me, I'll wait for @seanyesmunt's input on this

Looks good to me, I'll wait for @seanyesmunt's input on this
neb-b (Migrated from github.com) approved these changes 2018-07-19 15:51:54 +02:00
Sign in to join this conversation.
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/lbryinc#1
No description provided.