diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/pages/create-account/connect-hardware/index.js | 8 | ||||
-rw-r--r-- | ui/app/css/itcss/components/new-account.scss | 6 |
2 files changed, 11 insertions, 3 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 689e88f2e..dc9907f31 100644 --- a/ui/app/components/pages/create-account/connect-hardware/index.js +++ b/ui/app/components/pages/create-account/connect-hardware/index.js @@ -59,8 +59,11 @@ class ConnectHardwareForm extends Component { const newState = {} // Default to the first account if (this.state.selectedAccount === null) { - const firstAccount = accounts[0] - newState.selectedAccount = firstAccount.index.toString() === '0' ? firstAccount.index.toString() : null + accounts.forEach((a, i) => { + if (a.address.toLowerCase() === this.props.address) { + newState.selectedAccount = a.index.toString() + } + }) // If the page doesn't contain the selected account, let's deselect it } else if (!accounts.filter(a => a.index.toString() === this.state.selectedAccount).length) { newState.selectedAccount = null @@ -167,6 +170,7 @@ ConnectHardwareForm.propTypes = { t: PropTypes.func, network: PropTypes.string, accounts: PropTypes.object, + address: PropTypes.string, } const mapStateToProps = state => { diff --git a/ui/app/css/itcss/components/new-account.scss b/ui/app/css/itcss/components/new-account.scss index 4552f0bf2..a44fab3be 100644 --- a/ui/app/css/itcss/components/new-account.scss +++ b/ui/app/css/itcss/components/new-account.scss @@ -242,7 +242,7 @@ &__item__index { display: flex; - margin-right: 20px; + width: 28px; } &__item__radio { @@ -337,4 +337,8 @@ width: 150px; min-width: initial; } + + &__button.btn-primary--disabled { + cursor: 'not-allowed'; + } } |