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

(Fix) Error is constantly shown through screens #127

Merged
merged 5 commits into from
Sep 12, 2018

Conversation

vbaranov
Copy link
Collaborator

Relates to #110

Cleaning of the warning message was added on componentWillUnmount event for every screen, where it can appear during screen lifecycle.

@@ -502,7 +502,7 @@ function requestRevealSeed (password) {
return new Promise((resolve, reject) => {
background.submitPassword(password, err => {
if (err) {
dispatch(actions.displayWarning(err.message))
dispatch(actions.displayWarning(err))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for this change? Every ohter usage of displayWarning seems to do displayWarning(err.message).

Copy link
Collaborator Author

@vbaranov vbaranov Sep 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fvictorio this is because submitPassword actually returns string and not Error object:
https://github.com/vbaranov/KeyringController/blob/a3251d6306f155c23eba785ddf9ef75a2a609e32/index.js#L449. But it will be unified in the next version of eth-keychain-controller: all catches will return Error object.

@vbaranov vbaranov merged commit 1c79119 into develop Sep 12, 2018
@vbaranov vbaranov deleted the error-through-screens branch September 12, 2018 14:25
@ghost ghost removed the awaiting for review label Sep 12, 2018
@vbaranov vbaranov mentioned this pull request Oct 18, 2018
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.

4 participants