1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Fixing persisting error message from MobileSyncPage (#11835)

This commit is contained in:
ryanml 2021-08-13 12:59:06 -07:00 committed by GitHub
parent d1e264446d
commit 1837397202
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,7 @@ export default class MobileSyncPage extends Component {
requestRevealSeedWords: PropTypes.func.isRequired,
exportAccounts: PropTypes.func.isRequired,
keyrings: PropTypes.array,
hideWarning: PropTypes.func.isRequired,
};
state = {
@ -277,6 +278,9 @@ export default class MobileSyncPage extends Component {
}
componentWillUnmount() {
if (this.state.error) {
this.props.hideWarning();
}
this.clearTimeouts();
this.disconnectWebsockets();
}

View File

@ -4,6 +4,7 @@ import {
requestRevealSeedWords,
fetchInfoToSync,
exportAccounts,
hideWarning,
} from '../../store/actions';
import { getMostRecentOverviewPage } from '../../ducks/history/history';
import { getMetaMaskKeyrings } from '../../selectors';
@ -17,6 +18,7 @@ const mapDispatchToProps = (dispatch) => {
displayWarning: (message) => dispatch(displayWarning(message || null)),
exportAccounts: (password, addresses) =>
dispatch(exportAccounts(password, addresses)),
hideWarning: () => dispatch(hideWarning()),
};
};