2021-02-04 19:15:23 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { getPreferences } from '../../../selectors';
|
|
|
|
import UserPreferencedTokenInput from './user-preferenced-token-input.component';
|
2018-10-17 01:03:29 +02:00
|
|
|
|
2020-02-15 21:34:12 +01:00
|
|
|
const mapStateToProps = (state) => {
|
2021-02-04 19:15:23 +01:00
|
|
|
const { useNativeCurrencyAsPrimaryCurrency } = getPreferences(state);
|
2018-10-17 01:03:29 +02:00
|
|
|
|
|
|
|
return {
|
2018-10-26 10:26:43 +02:00
|
|
|
useNativeCurrencyAsPrimaryCurrency,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
|
|
|
};
|
2018-10-17 01:03:29 +02:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
const UserPreferencedTokenInputContainer = connect(mapStateToProps)(
|
|
|
|
UserPreferencedTokenInput,
|
2021-02-04 19:15:23 +01:00
|
|
|
);
|
2020-05-29 00:08:11 +02:00
|
|
|
|
|
|
|
UserPreferencedTokenInputContainer.propTypes = {
|
|
|
|
token: PropTypes.shape({
|
|
|
|
address: PropTypes.string.isRequired,
|
|
|
|
decimals: PropTypes.number,
|
|
|
|
symbol: PropTypes.string,
|
|
|
|
}).isRequired,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2020-05-29 00:08:11 +02:00
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export default UserPreferencedTokenInputContainer;
|