Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced authentication actions/reducers with new actions architecture #586

Merged
merged 7 commits into from
Jan 23, 2018

Conversation

mhuggins
Copy link
Contributor

@mhuggins mhuggins commented Jan 21, 2018

What current issue(s) from Trello/Github does this address?
N/A

What problem does this PR solve?
This is a continuation of the redux refactor from PR's #542 and #575. It replaces the accounts actions & reducers with a new set of actions & higher-order components for logging in through the various mechanisms & logging out.

This also introduces a couple other changes and fixes:

  • Added "failed" component for when data fails to load. (This needs to be cleaned up & styled.)
  • Fixed withData to account for data not being fetched yet.

How did you solve this problem?
I added several new actions for logging in and out. I also introduced a handful of new higher-order components:

  • withAccountData passes account data down to components.
  • withLoginRedirect watches for account redux state change to redirect to the dashboard.
  • withLogoutRedirect watches for account redux state change to redirect back to the home screen.
  • withFailureNotification watches the failed actions and displays an error notification accordingly.

How did you make sure your solution works?
I smoke tested as best I could. This is still a WIP because I need to do more thorough QA. I also need help with the ledger path because I don't have one yet, and I just had to guess my way through that code path.

Are there any special changes in the code that we should be aware of?
N/A

Is there anything else we should know?
I need help testing the ledger code changes. I don't have a ledger, and they're sold out until March. 😞

  • Unit tests written?

@coveralls
Copy link

coveralls commented Jan 21, 2018

Coverage Status

Coverage increased (+7.4%) to 44.345% when pulling 9380b2c on neoverse:auth-actions2 into d2d1cd2 on CityOfZion:dev.

@mhuggins mhuggins force-pushed the auth-actions2 branch 3 times, most recently from bed2dfb to dc14e89 Compare January 22, 2018 00:42
@mhuggins mhuggins changed the title [WIP] Replaced authentication actions/reducers with new actions architecture Replaced authentication actions/reducers with new actions architecture Jan 22, 2018
@evgenyboxer evgenyboxer merged commit 6276a54 into CityOfZion:dev Jan 23, 2018
dvdschwrtz-zz pushed a commit that referenced this pull request Feb 3, 2018
#586)

* Add failed screen when data can't be fetched

* Replaced module auth functions with actions

* Fixed withData to account for data not being loaded yet

* Added redirects when user logs in or out

* Added error notifications to login actions

* Fixed showing back to back error notifications

* Added wallet reload when network changes
dvdschwrtz-zz pushed a commit that referenced this pull request Feb 14, 2018
#586)

* Add failed screen when data can't be fetched

* Replaced module auth functions with actions

* Fixed withData to account for data not being loaded yet

* Added redirects when user logs in or out

* Added error notifications to login actions

* Fixed showing back to back error notifications

* Added wallet reload when network changes
mhuggins added a commit to neoverse/neon-wallet that referenced this pull request Feb 22, 2018
CityOfZion#586)

* Add failed screen when data can't be fetched

* Replaced module auth functions with actions

* Fixed withData to account for data not being loaded yet

* Added redirects when user logs in or out

* Added error notifications to login actions

* Fixed showing back to back error notifications

* Added wallet reload when network changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants