aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/pages
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-08-17 05:28:07 +0800
committerEsteban MIno <efmino@uc.cl>2018-08-17 05:28:07 +0800
commit2ace30bcd1d8280b440a4ce2a7156f94cf4f78f2 (patch)
treec31eff02e70c1be97de3387ff7c51ca756ba31da /ui/app/components/pages
parenta36ea0e2328e6ffedd5b526470dc1133c4f2f556 (diff)
downloadtangerine-wallet-browser-2ace30bcd1d8280b440a4ce2a7156f94cf4f78f2.tar
tangerine-wallet-browser-2ace30bcd1d8280b440a4ce2a7156f94cf4f78f2.tar.gz
tangerine-wallet-browser-2ace30bcd1d8280b440a4ce2a7156f94cf4f78f2.tar.bz2
tangerine-wallet-browser-2ace30bcd1d8280b440a4ce2a7156f94cf4f78f2.tar.lz
tangerine-wallet-browser-2ace30bcd1d8280b440a4ce2a7156f94cf4f78f2.tar.xz
tangerine-wallet-browser-2ace30bcd1d8280b440a4ce2a7156f94cf4f78f2.tar.zst
tangerine-wallet-browser-2ace30bcd1d8280b440a4ce2a7156f94cf4f78f2.zip
WIP
Diffstat (limited to 'ui/app/components/pages')
-rw-r--r--ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js5
-rw-r--r--ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js7
-rw-r--r--ui/app/components/pages/home.js1
3 files changed, 10 insertions, 3 deletions
diff --git a/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js b/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
index 5de0859cd..e8155b5f0 100644
--- a/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.js
+++ b/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.component.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)
})
}}
>
diff --git a/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js b/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js
index fba33222e..97e07afda 100644
--- a/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js
+++ b/ui/app/components/pages/confirm-add-suggested-token/confirm-add-suggested-token.container.js
@@ -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)
diff --git a/ui/app/components/pages/home.js b/ui/app/components/pages/home.js
index 6ee083579..629dc11fc 100644
--- a/ui/app/components/pages/home.js
+++ b/ui/app/components/pages/home.js
@@ -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)
}