mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
clean confirm add token component
This commit is contained in:
parent
af35b415ab
commit
a57f56fdca
@ -15,7 +15,6 @@ export default class ConfirmAddToken extends Component {
|
|||||||
clearPendingTokens: PropTypes.func,
|
clearPendingTokens: PropTypes.func,
|
||||||
addTokens: PropTypes.func,
|
addTokens: PropTypes.func,
|
||||||
pendingTokens: PropTypes.object,
|
pendingTokens: PropTypes.object,
|
||||||
removeSuggestedTokens: PropTypes.func,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
@ -33,7 +32,7 @@ export default class ConfirmAddToken extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { history, addTokens, clearPendingTokens, pendingTokens, removeSuggestedTokens } = this.props
|
const { history, addTokens, clearPendingTokens, pendingTokens } = this.props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="page-container">
|
<div className="page-container">
|
||||||
@ -92,8 +91,6 @@ export default class ConfirmAddToken extends Component {
|
|||||||
large
|
large
|
||||||
className="page-container__footer-button"
|
className="page-container__footer-button"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// TODO find the right pace to removeSuggestedTokens
|
|
||||||
removeSuggestedTokens()
|
|
||||||
history.push(ADD_TOKEN_ROUTE)
|
history.push(ADD_TOKEN_ROUTE)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
@ -3,7 +3,7 @@ import ConfirmAddToken from './confirm-add-token.component'
|
|||||||
|
|
||||||
const extend = require('xtend')
|
const extend = require('xtend')
|
||||||
|
|
||||||
const { addTokens, clearPendingTokens, removeSuggestedTokens } = require('../../../actions')
|
const { addTokens, clearPendingTokens } = require('../../../actions')
|
||||||
|
|
||||||
const mapStateToProps = ({ metamask }) => {
|
const mapStateToProps = ({ metamask }) => {
|
||||||
const { pendingTokens, suggestedTokens } = metamask
|
const { pendingTokens, suggestedTokens } = metamask
|
||||||
@ -18,7 +18,6 @@ const mapDispatchToProps = dispatch => {
|
|||||||
return {
|
return {
|
||||||
addTokens: tokens => dispatch(addTokens(tokens)),
|
addTokens: tokens => dispatch(addTokens(tokens)),
|
||||||
clearPendingTokens: () => dispatch(clearPendingTokens()),
|
clearPendingTokens: () => dispatch(clearPendingTokens()),
|
||||||
removeSuggestedTokens: () => dispatch(removeSuggestedTokens()),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user