diff options
author | Dan Finlay <dan@danfinlay.com> | 2018-06-19 06:33:50 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2018-06-19 06:33:50 +0800 |
commit | f14ed329801ab65c31e84f8e9d8d93700ed56670 (patch) | |
tree | 63122081a404e0ae765658770b4da52cea4c44c0 /ui | |
parent | 5d7c2810a701097ef1a4f9de23948418340f9cb4 (diff) | |
download | tangerine-wallet-browser-f14ed329801ab65c31e84f8e9d8d93700ed56670.tar tangerine-wallet-browser-f14ed329801ab65c31e84f8e9d8d93700ed56670.tar.gz tangerine-wallet-browser-f14ed329801ab65c31e84f8e9d8d93700ed56670.tar.bz2 tangerine-wallet-browser-f14ed329801ab65c31e84f8e9d8d93700ed56670.tar.lz tangerine-wallet-browser-f14ed329801ab65c31e84f8e9d8d93700ed56670.tar.xz tangerine-wallet-browser-f14ed329801ab65c31e84f8e9d8d93700ed56670.tar.zst tangerine-wallet-browser-f14ed329801ab65c31e84f8e9d8d93700ed56670.zip |
Begin letting UI show suggested tokens
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/pages/confirm-add-token/confirm-add-token.container.js | 8 | ||||
-rw-r--r-- | ui/app/components/pages/home.js | 7 |
2 files changed, 13 insertions, 2 deletions
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 0190024d9..500b406bb 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 @@ -1,12 +1,16 @@ import { connect } from 'react-redux' import ConfirmAddToken from './confirm-add-token.component' +const extend = require('xtend') + const { addTokens, clearPendingTokens } = require('../../../actions') const mapStateToProps = ({ metamask }) => { - const { pendingTokens } = metamask + const { pendingTokens, suggestedTokens } = metamask + const params = extend(pendingTokens, suggestedTokens) + return { - pendingTokens, + pendingTokens: params, } } diff --git a/ui/app/components/pages/home.js b/ui/app/components/pages/home.js index c53413d3b..f37366396 100644 --- a/ui/app/components/pages/home.js +++ b/ui/app/components/pages/home.js @@ -25,6 +25,7 @@ const { RESTORE_VAULT_ROUTE, CONFIRM_TRANSACTION_ROUTE, NOTICE_ROUTE, + CONFIRM_ADD_TOKEN_ROUTE, } = require('../../routes') class Home extends Component { @@ -35,8 +36,14 @@ class Home extends Component { unapprovedMsgCount = 0, unapprovedPersonalMsgCount = 0, unapprovedTypedMessagesCount = 0, + suggestedTokens = {}, } = this.props + // suggested new tokens + if (suggestedTokens.length > 0) { + history.push(CONFIRM_ADD_TOKEN_ROUTE) + } + // unapprovedTxs and unapproved messages if (Object.keys(unapprovedTxs).length || unapprovedTypedMessagesCount + unapprovedMsgCount + unapprovedPersonalMsgCount > 0) { |