You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
876 B
29 lines
876 B
4 years ago
|
import { connect } from 'react-redux';
|
||
7 years ago
|
|
||
4 years ago
|
import { setPendingTokens, clearPendingTokens } from '../../store/actions';
|
||
|
import { getMostRecentOverviewPage } from '../../ducks/history/history';
|
||
4 years ago
|
import { getIsMainnet } from '../../selectors/selectors';
|
||
4 years ago
|
import AddToken from './add-token.component';
|
||
7 years ago
|
|
||
5 years ago
|
const mapStateToProps = (state) => {
|
||
4 years ago
|
const {
|
||
|
metamask: { identities, tokens, pendingTokens },
|
||
4 years ago
|
} = state;
|
||
7 years ago
|
return {
|
||
|
identities,
|
||
5 years ago
|
mostRecentOverviewPage: getMostRecentOverviewPage(state),
|
||
7 years ago
|
tokens,
|
||
|
pendingTokens,
|
||
4 years ago
|
showSearchTab: getIsMainnet(state) || process.env.IN_TEST === 'true',
|
||
4 years ago
|
};
|
||
|
};
|
||
7 years ago
|
|
||
5 years ago
|
const mapDispatchToProps = (dispatch) => {
|
||
7 years ago
|
return {
|
||
5 years ago
|
setPendingTokens: (tokens) => dispatch(setPendingTokens(tokens)),
|
||
7 years ago
|
clearPendingTokens: () => dispatch(clearPendingTokens()),
|
||
4 years ago
|
};
|
||
|
};
|
||
7 years ago
|
|
||
4 years ago
|
export default connect(mapStateToProps, mapDispatchToProps)(AddToken);
|