aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/modals/account-details-modal.js
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-08-21 06:35:38 +0800
committerEsteban MIno <efmino@uc.cl>2018-08-21 06:35:38 +0800
commit81cd29df43feb2469b78c6240d12ffcb9a68678e (patch)
tree15b14d9d3a29e5c21776ce5f9a3b35c7934abb81 /ui/app/components/modals/account-details-modal.js
parentdbab9a007fc9663427cebdbe1d41c51df67fd1fe (diff)
parent887cad973f25f43d2d4502ff31657f156a44b188 (diff)
downloadtangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar.gz
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.tar.zst
tangerine-wallet-browser-81cd29df43feb2469b78c6240d12ffcb9a68678e.zip
Merge branch 'develop' into WatchTokenFeature
Diffstat (limited to 'ui/app/components/modals/account-details-modal.js')
-rw-r--r--ui/app/components/modals/account-details-modal.js16
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,
])
}