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

Change clearErrors action to resetState #865

Merged
merged 2 commits into from
Jul 10, 2018
Merged

Change clearErrors action to resetState #865

merged 2 commits into from
Jul 10, 2018

Conversation

lyyder
Copy link
Contributor

@lyyder lyyder commented Jul 10, 2018

#863 changed the TransactionPage.duck.js so that the loadData function did not clear the whole state anymore but instead just cleared any possible errors in the state. This fixed a bug where any errors caused from sending an initial message in the checkout page were not passed to the tx page. Unfortunately, this also introduced a new bug. As the reducer uses messages in the state to create paging for the messages, old messages we're left hanging in the state and unrelated messages started showing up in activity feeds.

This PR removes the clearErrors action and introduces an action called resetState which in addition to clearing the errors also clears messages from the state.

Suggestions for a more accurate name for resetState are welcome.

@lyyder lyyder merged commit 8925b1b into master Jul 10, 2018
@lyyder lyyder deleted the tx-duck-clear-state branch July 10, 2018 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant