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 balance, claim, & transaction history actions/reducers with new actions architecture #611

Merged
merged 11 commits into from
Jan 30, 2018

Conversation

mhuggins
Copy link
Contributor

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, #575, #586, and #595. It replaces most of the claim & wallet actions & reducers with a new set of actions for fetching balances, available claims, and transaction history. It also renames the accountActions to authActions for clarity.

In addition to this work, I also:

  • Removed the complex loadWalletData function and replaced it with a batch request in the new redux architecture (a long time coming!).
  • Introduced several new higher-order components:
    • withResponsiveAction: perform an action when a prop changes or condition is met.
    • withReset: resets data in a portion of the store when a prop changes or condition is met.
    • withLogoutReset: resets action data when the user logs out.
  • Cleaned out all data related to the current account when the user logs out.
  • Added a testHelpers.js file to help consolidate repetitive test code.
  • Prevent tokens data from being cleared on a bad balance fetch.

How did you solve this problem?
I added new actions for fetching balances, claims, and transaction history using the new actions architecture.

How did you make sure your solution works?
I smoke tested and addressed any test failures associated with these changes.

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

Is there anything else we should know?
N/A

  • Unit tests written?

@mhuggins mhuggins changed the title Balance actions Replaced wallet, claim, & transaction history actions/reducers with new actions architecture Jan 27, 2018
@mhuggins mhuggins changed the title Replaced wallet, claim, & transaction history actions/reducers with new actions architecture Replaced balance, claim, & transaction history actions/reducers with new actions architecture Jan 27, 2018
@coveralls
Copy link

coveralls commented Jan 27, 2018

Coverage Status

Coverage decreased (-0.9%) to 43.44% when pulling 2812ecc on neoverse:balance-actions into 737f3cd on CityOfZion:dev.

@evgenyboxer
Copy link
Contributor

Fantastic work @mhuggins

@mhuggins
Copy link
Contributor Author

@evgenyboxer Rebased.

@mhuggins
Copy link
Contributor Author

mhuggins commented Jan 28, 2018

Looks like another intermittent failure on these end-to-end tests. These were working prior to rebasing. Can someone kick off the circle test to retry? /cc @evgenyboxer

@evgenyboxer evgenyboxer merged commit bcb8a4c into CityOfZion:dev Jan 30, 2018
dvdschwrtz-zz pushed a commit that referenced this pull request Feb 3, 2018
…new actions architecture (#611)

* Added actions for fetching asset & token balances

* Removed unused prop mapping from app store

* Added balance actions and HOC's to replaced most of loadWalletData function

* Reset stores on logout

* Renamed accountActions to authActions

* Removed unused deprecated functions

* Fixed fetching state from action that has not been fetched

* Added claims actions and account actions

* Replaced load wallet claim sync with new action data

* Replaced load wallet transactions sync with new action data

* Fixed tokens argument being passed to account request action
dvdschwrtz-zz pushed a commit that referenced this pull request Feb 14, 2018
…new actions architecture (#611)

* Added actions for fetching asset & token balances

* Removed unused prop mapping from app store

* Added balance actions and HOC's to replaced most of loadWalletData function

* Reset stores on logout

* Renamed accountActions to authActions

* Removed unused deprecated functions

* Fixed fetching state from action that has not been fetched

* Added claims actions and account actions

* Replaced load wallet claim sync with new action data

* Replaced load wallet transactions sync with new action data

* Fixed tokens argument being passed to account request action
mhuggins added a commit to neoverse/neon-wallet that referenced this pull request Feb 22, 2018
…new actions architecture (CityOfZion#611)

* Added actions for fetching asset & token balances

* Removed unused prop mapping from app store

* Added balance actions and HOC's to replaced most of loadWalletData function

* Reset stores on logout

* Renamed accountActions to authActions

* Removed unused deprecated functions

* Fixed fetching state from action that has not been fetched

* Added claims actions and account actions

* Replaced load wallet claim sync with new action data

* Replaced load wallet transactions sync with new action data

* Fixed tokens argument being passed to account request action
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