diff options
author | Dan <danjm.com@gmail.com> | 2017-09-20 16:05:27 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-24 08:33:50 +0800 |
commit | 0eeba3771c2396c12de3f254dbfaae957344411d (patch) | |
tree | e07191adb37e501b46449dd68689446f00c05933 /ui/app/components/modals/export-private-key-modal.js | |
parent | e1077836ce916e2bd788451e3f365324024a1c0c (diff) | |
download | tangerine-wallet-browser-0eeba3771c2396c12de3f254dbfaae957344411d.tar.gz tangerine-wallet-browser-0eeba3771c2396c12de3f254dbfaae957344411d.tar.zst tangerine-wallet-browser-0eeba3771c2396c12de3f254dbfaae957344411d.zip |
Exports private key modal opens from dropdown.
Diffstat (limited to 'ui/app/components/modals/export-private-key-modal.js')
-rw-r--r-- | ui/app/components/modals/export-private-key-modal.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ui/app/components/modals/export-private-key-modal.js b/ui/app/components/modals/export-private-key-modal.js new file mode 100644 index 000000000..bbcd25e0d --- /dev/null +++ b/ui/app/components/modals/export-private-key-modal.js @@ -0,0 +1,41 @@ +const Component = require('react').Component +const h = require('react-hyperscript') +const inherits = require('util').inherits +const connect = require('react-redux').connect +const actions = require('../../actions') +const AccountModalContainer = require('./account-modal-container') +const { getSelectedIdentity } = require('../../selectors') +const ReadOnlyInput = require('../readonly-input') + +function mapStateToProps (state) { + return { + network: state.metamask.network, + selectedIdentity: getSelectedIdentity(state), + } +} + +inherits(ExportPrivateKeyModal, Component) +function ExportPrivateKeyModal () { + Component.call(this) +} + +module.exports = connect(mapStateToProps)(ExportPrivateKeyModal) + +ExportPrivateKeyModal.prototype.render = function () { + const { selectedIdentity, network } = this.props + const { name, address } = selectedIdentity + + return h(AccountModalContainer, {}, [ + + h('span.account-name', name), + + h(ReadOnlyInput, { + wrapperClass: 'ellip-address-wrapper', + inputClass: 'ellip-address', + value: address, + }), + + h('div.account-modal-divider'), + + ]) +} |