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.
32 lines
936 B
32 lines
936 B
import { connect } from 'react-redux';
|
|
import { compose } from 'redux';
|
|
import { withRouter } from 'react-router-dom';
|
|
import { rejectWatchAsset, acceptWatchAsset } from '../../store/actions';
|
|
import { getMostRecentOverviewPage } from '../../ducks/history/history';
|
|
import ConfirmAddSuggestedToken from './confirm-add-suggested-token.component';
|
|
|
|
const mapStateToProps = (state) => {
|
|
const {
|
|
metamask: { suggestedAssets, tokens },
|
|
} = state;
|
|
|
|
return {
|
|
mostRecentOverviewPage: getMostRecentOverviewPage(state),
|
|
suggestedAssets,
|
|
tokens,
|
|
};
|
|
};
|
|
|
|
const mapDispatchToProps = (dispatch) => {
|
|
return {
|
|
rejectWatchAsset: (suggestedAssetID) =>
|
|
dispatch(rejectWatchAsset(suggestedAssetID)),
|
|
acceptWatchAsset: (suggestedAssetID) =>
|
|
dispatch(acceptWatchAsset(suggestedAssetID)),
|
|
};
|
|
};
|
|
|
|
export default compose(
|
|
withRouter,
|
|
connect(mapStateToProps, mapDispatchToProps),
|
|
)(ConfirmAddSuggestedToken);
|
|
|