A Metamask fork with Infura removed and default networks editable
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.
 
 
 
 
 
ciphermask/ui/components/ui/token-input/token-input.container.js

28 lines
732 B

import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { getTokenExchangeRates, getShouldShowFiat } from '../../../selectors';
import TokenInput from './token-input.component';
const mapStateToProps = (state) => {
const {
metamask: { currentCurrency },
} = state;
return {
currentCurrency,
tokenExchangeRates: getTokenExchangeRates(state),
hideConversion: !getShouldShowFiat(state),
};
};
const TokenInputContainer = connect(mapStateToProps)(TokenInput);
TokenInputContainer.propTypes = {
token: PropTypes.shape({
address: PropTypes.string.isRequired,
decimals: PropTypes.number,
symbol: PropTypes.string,
}).isRequired,
};
export default TokenInputContainer;