feature/default_network_editable
Esteban MIno 6 years ago
parent a36ea0e232
commit 2ace30bcd1
  1. 5
      ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
  2. 7
      ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js
  3. 1
      ui/app/components/pages/home.js

@ -33,7 +33,7 @@ export default class ConfirmAddSuggestedToken extends Component {
}
render () {
const { addToken, clearPendingTokens, pendingTokens, removeSuggestedTokens } = this.props
const { addToken, clearPendingTokens, pendingTokens, removeSuggestedTokens, history } = this.props
const pendingTokenKey = Object.keys(pendingTokens)[0]
const pendingToken = pendingTokens[pendingTokenKey]
@ -96,6 +96,7 @@ export default class ConfirmAddSuggestedToken extends Component {
className="page-container__footer-button"
onClick={() => {
removeSuggestedTokens()
history.push(DEFAULT_ROUTE)
}}
>
{ this.context.t('cancel') }
@ -107,8 +108,8 @@ export default class ConfirmAddSuggestedToken extends Component {
onClick={() => {
addToken(pendingToken)
.then(() => {
clearPendingTokens()
removeSuggestedTokens()
history.push(DEFAULT_ROUTE)
})
}}
>

@ -1,5 +1,7 @@
import { connect } from 'react-redux'
import { compose } from 'recompose'
import ConfirmAddSuggestedToken from './confirm-add-suggested-token.component'
import { withRouter } from 'react-router-dom'
const extend = require('xtend')
@ -22,4 +24,7 @@ const mapDispatchToProps = dispatch => {
}
}
export default connect(mapStateToProps, mapDispatchToProps)(ConfirmAddSuggestedToken)
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(ConfirmAddSuggestedToken)

@ -40,6 +40,7 @@ class Home extends Component {
// suggested new tokens
if (Object.keys(suggestedTokens).length > 0) {
console.log('CALLING CONFIRM ADD SUGGESTED')
history.push(CONFIRM_ADD_SUGGESTED_TOKEN_ROUTE)
}

Loading…
Cancel
Save