aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrunobar79 <brunobar79@gmail.com>2018-08-11 00:09:54 +0800
committerbrunobar79 <brunobar79@gmail.com>2018-08-11 00:09:54 +0800
commiteb2f4914588be3229ff96b0a471e37077a269b1b (patch)
tree6f06f4526e3087684d36058da2b52cafed1effe2
parente905c9f055cf9a5efbfa67a5371f2224934c49ab (diff)
downloadtangerine-wallet-browser-eb2f4914588be3229ff96b0a471e37077a269b1b.tar
tangerine-wallet-browser-eb2f4914588be3229ff96b0a471e37077a269b1b.tar.gz
tangerine-wallet-browser-eb2f4914588be3229ff96b0a471e37077a269b1b.tar.bz2
tangerine-wallet-browser-eb2f4914588be3229ff96b0a471e37077a269b1b.tar.lz
tangerine-wallet-browser-eb2f4914588be3229ff96b0a471e37077a269b1b.tar.xz
tangerine-wallet-browser-eb2f4914588be3229ff96b0a471e37077a269b1b.tar.zst
tangerine-wallet-browser-eb2f4914588be3229ff96b0a471e37077a269b1b.zip
add error messages
-rw-r--r--ui/app/components/pages/create-account/connect-hardware/index.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/app/components/pages/create-account/connect-hardware/index.js b/ui/app/components/pages/create-account/connect-hardware/index.js
index 3f66e7098..6ad44e540 100644
--- a/ui/app/components/pages/create-account/connect-hardware/index.js
+++ b/ui/app/components/pages/create-account/connect-hardware/index.js
@@ -77,7 +77,7 @@ class ConnectHardwareForm extends Component {
this.showTemporaryAlert()
}
- const newState = { unlocked: true }
+ const newState = { unlocked: true, error: null }
// Default to the first account
if (this.state.selectedAccount === null) {
accounts.forEach((a, i) => {
@@ -105,6 +105,8 @@ class ConnectHardwareForm extends Component {
.catch(e => {
if (e === 'Window blocked') {
this.setState({ browserSupported: false })
+ } else {
+ this.setState({ error: e.toString() })
}
this.setState({ btnText: this.context.t('connectToTrezor') })
})
@@ -145,7 +147,7 @@ class ConnectHardwareForm extends Component {
renderError () {
return this.state.error
- ? h('span.error', { style: { marginBottom: 40 } }, this.state.error)
+ ? h('span.error', { style: { margin: '20px 20px 10px', display: 'block', textAlign: 'center' } }, this.state.error)
: null
}