From 0ed1add110ec630ed358aa44af030623bab1ad92 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 26 Oct 2017 14:45:05 -0230 Subject: Clear import error state on logout. --- ui/app/accounts/import/private-key.js | 4 ++++ ui/app/components/account-menu/index.js | 1 + 2 files changed, 5 insertions(+) (limited to 'ui/app') diff --git a/ui/app/accounts/import/private-key.js b/ui/app/accounts/import/private-key.js index 68ccee58e..e214bcbbe 100644 --- a/ui/app/accounts/import/private-key.js +++ b/ui/app/accounts/import/private-key.js @@ -17,6 +17,10 @@ function PrivateKeyImportView () { Component.call(this) } +PrivateKeyImportView.prototype.componentWillUnmount = function () { + this.props.dispatch(actions.displayWarning(null)) +} + PrivateKeyImportView.prototype.render = function () { const { error } = this.props diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 38c7bcb2d..a9f075ec7 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -32,6 +32,7 @@ function mapDispatchToProps (dispatch) { }, lockMetamask: () => { dispatch(actions.lockMetamask()) + dispatch(actions.displayWarning(null)) dispatch(actions.toggleAccountMenu()) }, showConfigPage: () => { -- cgit