1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

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>
This commit is contained in:
Thomas Huang 2020-11-19 07:35:20 -08:00 committed by GitHub
parent bb3a0423d4
commit 75de9086de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"