Include error string from ledger errors (#9911)

* Include error string from ledger errors

* Type check error message

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
feature/default_network_editable
Thomas Huang 4 years ago committed by GitHub
parent bb3a0423d4
commit 75de9086de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ui/app/pages/create-account/connect-hardware/index.js

@ -129,7 +129,7 @@ class ConnectHardwareForm extends Component {
}
})
.catch((e) => {
const errorMessage = e.message
const errorMessage = typeof e === 'string' ? e : e.message
if (errorMessage === 'Window blocked') {
this.setState({ browserSupported: false, error: null })
} else if (errorMessage.includes(U2F_ERROR)) {
@ -210,6 +210,7 @@ class ConnectHardwareForm extends Component {
// eslint-disable-next-line react/jsx-key
<a
href="https://metamask.zendesk.com/hc/en-us/articles/360020394612-How-to-connect-a-Trezor-or-Ledger-Hardware-Wallet"
key="hardware-connection-guide"
target="_blank"
rel="noopener noreferrer"
className="hw-connect__link"

Loading…
Cancel
Save