From 4dd6ba9c1b6704dafcf9d10e1db02a3bb3071cb6 Mon Sep 17 00:00:00 2001 From: kumavis Date: Sat, 28 Jan 2017 19:19:03 -0800 Subject: migration 5 - move keyring controller state to substate --- ui/app/account-detail.js | 5 +++-- ui/app/accounts/account-list-item.js | 5 +++-- ui/app/first-time/init-menu.js | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'ui/app') diff --git a/ui/app/account-detail.js b/ui/app/account-detail.js index 387a1720a..0bcfbcaab 100644 --- a/ui/app/account-detail.js +++ b/ui/app/account-detail.js @@ -41,6 +41,7 @@ function AccountDetailScreen () { AccountDetailScreen.prototype.render = function () { var props = this.props var selected = props.address || Object.keys(props.accounts)[0] + var checksumAddress = selected && ethUtil.toChecksumAddress(selected) var identity = props.identities[selected] var account = props.accounts[selected] const { network } = props @@ -116,7 +117,7 @@ AccountDetailScreen.prototype.render = function () { marginBottom: '15px', color: '#AEAEAE', }, - }, ethUtil.toChecksumAddress(selected)), + }, checksumAddress), // copy and export @@ -129,7 +130,7 @@ AccountDetailScreen.prototype.render = function () { h(AccountInfoLink, { selected, network }), h(CopyButton, { - value: ethUtil.toChecksumAddress(selected), + value: checksumAddress, }), h(Tooltip, { diff --git a/ui/app/accounts/account-list-item.js b/ui/app/accounts/account-list-item.js index 16019c88a..74ecef07f 100644 --- a/ui/app/accounts/account-list-item.js +++ b/ui/app/accounts/account-list-item.js @@ -17,6 +17,7 @@ function AccountListItem () { AccountListItem.prototype.render = function () { const { identity, selectedAccount, accounts, onShowDetail } = this.props + const checksumAddress = identity && identity.address && ethUtil.toChecksumAddress(identity.address) const isSelected = selectedAccount === identity.address const account = accounts[identity.address] const selectedClass = isSelected ? '.selected' : '' @@ -48,7 +49,7 @@ AccountListItem.prototype.render = function () { overflow: 'hidden', textOverflow: 'ellipsis', }, - }, ethUtil.toChecksumAddress(identity.address)), + }, checksumAddress), h(EthBalance, { value: account && account.balance, style: { @@ -65,7 +66,7 @@ AccountListItem.prototype.render = function () { }, }, [ h(CopyButton, { - value: ethUtil.toChecksumAddress(identity.address), + value: checksumAddress, }), ]), ]) diff --git a/ui/app/first-time/init-menu.js b/ui/app/first-time/init-menu.js index 152d28809..cc7c51bd3 100644 --- a/ui/app/first-time/init-menu.js +++ b/ui/app/first-time/init-menu.js @@ -152,7 +152,6 @@ InitializeMenuScreen.prototype.createNewVaultAndKeychain = function () { var password = passwordBox.value var passwordConfirmBox = document.getElementById('password-box-confirm') var passwordConfirm = passwordConfirmBox.value - // var entropy = document.getElementById('entropy-text-entry').value if (password.length < 8) { this.warning = 'password not long enough' -- cgit