diff options
eth_watchToken working
Diffstat (limited to 'ui/app/components/pages')
-rw-r--r-- | ui/app/components/pages/confirm-add-token/confirm-add-token.component.js | 9 | ||||
-rw-r--r-- | ui/app/components/pages/confirm-add-token/confirm-add-token.container.js | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js b/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js index 65d654b92..ad5264b30 100644 --- a/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js +++ b/ui/app/components/pages/confirm-add-token/confirm-add-token.component.js @@ -15,6 +15,7 @@ export default class ConfirmAddToken extends Component { clearPendingTokens: PropTypes.func, addTokens: PropTypes.func, pendingTokens: PropTypes.object, + removeSuggestedTokens: PropTypes.func, } componentDidMount () { @@ -32,7 +33,7 @@ export default class ConfirmAddToken extends Component { } render () { - const { history, addTokens, clearPendingTokens, pendingTokens } = this.props + const { history, addTokens, clearPendingTokens, pendingTokens, removeSuggestedTokens } = this.props return ( <div className="page-container"> @@ -90,7 +91,11 @@ export default class ConfirmAddToken extends Component { type="default" large className="page-container__footer-button" - onClick={() => history.push(ADD_TOKEN_ROUTE)} + onClick={() => { + // TODO find the right pace to removeSuggestedTokens + removeSuggestedTokens() + history.push(ADD_TOKEN_ROUTE) + }} > { this.context.t('back') } </Button> diff --git a/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js b/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js index 500b406bb..47d7a105b 100644 --- a/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js +++ b/ui/app/components/pages/confirm-add-token/confirm-add-token.container.js @@ -3,7 +3,7 @@ import ConfirmAddToken from './confirm-add-token.component' const extend = require('xtend') -const { addTokens, clearPendingTokens } = require('../../../actions') +const { addTokens, clearPendingTokens, removeSuggestedTokens } = require('../../../actions') const mapStateToProps = ({ metamask }) => { const { pendingTokens, suggestedTokens } = metamask @@ -18,6 +18,7 @@ const mapDispatchToProps = dispatch => { return { addTokens: tokens => dispatch(addTokens(tokens)), clearPendingTokens: () => dispatch(clearPendingTokens()), + removeSuggestedTokens: () => dispatch(removeSuggestedTokens()), } } |