1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

popup initializing with suggested tokens

This commit is contained in:
Esteban MIno 2018-08-03 18:01:40 -04:00
parent 081884bd80
commit 12dd7a7232

View File

@ -34,16 +34,12 @@ class Home extends Component {
componentDidMount () { componentDidMount () {
const { const {
history, history,
unapprovedTxs = {},
unapprovedMsgCount = 0,
unapprovedPersonalMsgCount = 0,
unapprovedTypedMessagesCount = 0,
suggestedTokens = {}, suggestedTokens = {},
unconfirmedTransactionsCount = 0, unconfirmedTransactionsCount = 0,
} = this.props } = this.props
// suggested new tokens // suggested new tokens
if (suggestedTokens.length > 0) { if (Object.keys(suggestedTokens).length > 0) {
history.push(CONFIRM_ADD_TOKEN_ROUTE) history.push(CONFIRM_ADD_TOKEN_ROUTE)
} }
@ -238,7 +234,7 @@ function mapStateToProps (state) {
isRevealingSeedWords: state.metamask.isRevealingSeedWords, isRevealingSeedWords: state.metamask.isRevealingSeedWords,
Qr: state.appState.Qr, Qr: state.appState.Qr,
welcomeScreenSeen: state.metamask.welcomeScreenSeen, welcomeScreenSeen: state.metamask.welcomeScreenSeen,
suggestedTokens: state.metamask.suggestedTokens,
// state needed to get account dropdown temporarily rendering from app bar // state needed to get account dropdown temporarily rendering from app bar
selected, selected,
unconfirmedTransactionsCount: unconfirmedTransactionsCountSelector(state), unconfirmedTransactionsCount: unconfirmedTransactionsCountSelector(state),