diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-07-14 03:19:21 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-07-14 03:19:21 +0800 |
commit | 55382e9842c4f4136c88e441298193cc7abd8ba9 (patch) | |
tree | 2d0b284115977f8a864dc130eaa677a2097f3088 /ui | |
parent | 53995463883c062157a3d725e7cb8fe54486badb (diff) | |
download | tangerine-wallet-browser-55382e9842c4f4136c88e441298193cc7abd8ba9.tar tangerine-wallet-browser-55382e9842c4f4136c88e441298193cc7abd8ba9.tar.gz tangerine-wallet-browser-55382e9842c4f4136c88e441298193cc7abd8ba9.tar.bz2 tangerine-wallet-browser-55382e9842c4f4136c88e441298193cc7abd8ba9.tar.lz tangerine-wallet-browser-55382e9842c4f4136c88e441298193cc7abd8ba9.tar.xz tangerine-wallet-browser-55382e9842c4f4136c88e441298193cc7abd8ba9.tar.zst tangerine-wallet-browser-55382e9842c4f4136c88e441298193cc7abd8ba9.zip |
fix account selection
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'; + } } |