Skip to content
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

Fixing hardware connect error display #7519

Merged
merged 1 commit into from
Nov 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions ui/app/pages/create-account/connect-hardware/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ class ConnectHardwareForm extends Component {
}
})
.catch(e => {
if (e === 'Window blocked') {
const errorMessage = e.message
if (errorMessage === 'Window blocked') {
this.setState({ browserSupported: false, error: null})
} else if (e !== 'Window closed' && e !== 'Popup closed') {
this.setState({ error: e.toString() })
} else if (errorMessage !== 'Window closed' && errorMessage !== 'Popup closed') {
this.setState({ error: errorMessage })
}
})
}
Expand All @@ -134,7 +135,7 @@ class ConnectHardwareForm extends Component {
unlocked: false,
})
}).catch(e => {
this.setState({ error: e.toString() })
this.setState({ error: e.message })
})
}

Expand Down Expand Up @@ -162,10 +163,10 @@ class ConnectHardwareForm extends Component {
name: 'Error connecting hardware wallet',
},
customVariables: {
error: e.toString(),
error: e.message,
},
})
this.setState({ error: e.toString() })
this.setState({ error: e.message })
})
}

Expand Down