aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/dropdowns/token-menu-dropdown.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/dropdowns/token-menu-dropdown.js')
-rw-r--r--ui/app/components/dropdowns/token-menu-dropdown.js68
1 files changed, 0 insertions, 68 deletions
diff --git a/ui/app/components/dropdowns/token-menu-dropdown.js b/ui/app/components/dropdowns/token-menu-dropdown.js
deleted file mode 100644
index 8a072b1bc..000000000
--- a/ui/app/components/dropdowns/token-menu-dropdown.js
+++ /dev/null
@@ -1,68 +0,0 @@
-const Component = require('react').Component
-const PropTypes = require('prop-types')
-const h = require('react-hyperscript')
-const inherits = require('util').inherits
-const connect = require('react-redux').connect
-const actions = require('../../actions')
-const genAccountLink = require('etherscan-link').createAccountLink
-const { Menu, Item, CloseArea } = require('./components/menu')
-
-TokenMenuDropdown.contextTypes = {
- t: PropTypes.func,
-}
-
-module.exports = connect(mapStateToProps, mapDispatchToProps)(TokenMenuDropdown)
-
-function mapStateToProps (state) {
- return {
- network: state.metamask.network,
- }
-}
-
-function mapDispatchToProps (dispatch) {
- return {
- showHideTokenConfirmationModal: (token) => {
- dispatch(actions.showModal({ name: 'HIDE_TOKEN_CONFIRMATION', token }))
- },
- }
-}
-
-
-inherits(TokenMenuDropdown, Component)
-function TokenMenuDropdown () {
- Component.call(this)
-
- this.onClose = this.onClose.bind(this)
-}
-
-TokenMenuDropdown.prototype.onClose = function (e) {
- e.stopPropagation()
- this.props.onClose()
-}
-
-TokenMenuDropdown.prototype.render = function () {
- const { showHideTokenConfirmationModal } = this.props
-
- return h(Menu, { className: 'token-menu-dropdown', isShowing: true }, [
- h(CloseArea, {
- onClick: this.onClose,
- }),
- h(Item, {
- onClick: (e) => {
- e.stopPropagation()
- showHideTokenConfirmationModal(this.props.token)
- this.props.onClose()
- },
- text: this.context.t('hideToken'),
- }),
- h(Item, {
- onClick: (e) => {
- e.stopPropagation()
- const url = genAccountLink(this.props.token.address, this.props.network)
- global.platform.openWindow({ url })
- this.props.onClose()
- },
- text: this.context.t('viewOnEtherscan'),
- }),
- ])
-}