-
Notifications
You must be signed in to change notification settings - Fork 44
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
Conversation
@@ -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)) |
There was a problem hiding this comment.
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)
.
There was a problem hiding this comment.
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.
Relates to #110
Cleaning of the warning message was added on
componentWillUnmount
event for every screen, where it can appear during screen lifecycle.