diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-08-15 07:22:00 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-08-15 07:22:00 +0800 |
commit | c72ced79aeb3d79d12ae240b680e0561122e5209 (patch) | |
tree | 948a64adfcd8f7d831bb1c660758fc926523bf3a /ui/app/components/modals | |
parent | b77cc3d9690304362471fbfe207bdad461c2ca3a (diff) | |
download | tangerine-wallet-browser-c72ced79aeb3d79d12ae240b680e0561122e5209.tar.gz tangerine-wallet-browser-c72ced79aeb3d79d12ae240b680e0561122e5209.tar.zst tangerine-wallet-browser-c72ced79aeb3d79d12ae240b680e0561122e5209.zip |
ui fixes
Diffstat (limited to 'ui/app/components/modals')
-rw-r--r-- | ui/app/components/modals/account-details-modal.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ui/app/components/modals/account-details-modal.js b/ui/app/components/modals/account-details-modal.js index 5607cf051..cc90cf578 100644 --- a/ui/app/components/modals/account-details-modal.js +++ b/ui/app/components/modals/account-details-modal.js @@ -14,6 +14,7 @@ function mapStateToProps (state) { return { network: state.metamask.network, selectedIdentity: getSelectedIdentity(state), + keyrings: state.metamask.keyrings, } } @@ -50,9 +51,20 @@ AccountDetailsModal.prototype.render = function () { network, showExportPrivateKeyModal, setAccountLabel, + keyrings, } = this.props const { name, address } = selectedIdentity + const keyring = keyrings.find((kr) => { + return kr.accounts.includes(address) + }) + + let exportPrivateKeyFeatureEnabled = true + // This feature is disabled for hardware wallets + if (keyring.type.search('Hardware') !== -1) { + exportPrivateKeyFeatureEnabled = false + } + return h(AccountModalContainer, {}, [ h(EditableLabel, { className: 'account-modal__name', @@ -73,9 +85,9 @@ AccountDetailsModal.prototype.render = function () { }, this.context.t('etherscanView')), // Holding on redesign for Export Private Key functionality - h('button.btn-primary.account-modal__button', { + exportPrivateKeyFeatureEnabled ? h('button.btn-primary.account-modal__button', { onClick: () => showExportPrivateKeyModal(), - }, this.context.t('exportPrivateKey')), + }, this.context.t('exportPrivateKey')) : null, ]) } |