Skip to content

Commit

Permalink
Hide Warning on componentWillUnmount
Browse files Browse the repository at this point in the history
  • Loading branch information
tmashuang committed Aug 21, 2020
1 parent ee8302b commit 9bce868
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default class ExportPrivateKeyModal extends Component {
warning: PropTypes.node,
showAccountDetailModal: PropTypes.func.isRequired,
hideModal: PropTypes.func.isRequired,
hideWarning: PropTypes.func.isRequired,
clearAccountDetails: PropTypes.func.isRequired,
previousModalState: PropTypes.string,
}
Expand All @@ -37,6 +38,7 @@ export default class ExportPrivateKeyModal extends Component {

componentWillUnmount () {
this.props.clearAccountDetails()
this.props.hideWarning()
}

exportAccountAndGetPrivateKey = (password, address) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function mapDispatchToProps (dispatch) {
},
showAccountDetailModal: () => dispatch(showModal({ name: 'ACCOUNT_DETAILS' })),
hideModal: () => dispatch(hideModal()),
hideWarning: () => dispatch(hideWarning()),
clearAccountDetails: () => dispatch(clearAccountDetails()),
}
}
Expand Down

0 comments on commit 9bce868

Please sign in to comment.