newui - unlock - dont catch errors unrelated to tryUnlockMetamask

feature/default_network_editable
kumavis 7 years ago
parent 12492aae60
commit a7b7c8f034
  1. 4
      ui/app/components/pages/unlock-page/unlock-page.component.js

@ -37,8 +37,8 @@ class UnlockPage extends Component {
tryUnlockMetamask (password) { tryUnlockMetamask (password) {
const { tryUnlockMetamask, history } = this.props const { tryUnlockMetamask, history } = this.props
tryUnlockMetamask(password) tryUnlockMetamask(password)
.then(() => history.push(DEFAULT_ROUTE))
.catch(({ message }) => this.setState({ error: message })) .catch(({ message }) => this.setState({ error: message }))
.then(() => history.push(DEFAULT_ROUTE))
} }
handleSubmit (event) { handleSubmit (event) {
@ -55,8 +55,8 @@ class UnlockPage extends Component {
this.setState({ error: null }) this.setState({ error: null })
tryUnlockMetamask(password) tryUnlockMetamask(password)
.then(() => history.push(DEFAULT_ROUTE))
.catch(({ message }) => this.setState({ error: message })) .catch(({ message }) => this.setState({ error: message }))
.then(() => history.push(DEFAULT_ROUTE))
} }
handleInputChange ({ target }) { handleInputChange ({ target }) {

Loading…
Cancel
Save