diff options
Diffstat (limited to 'ui/app/components/currency-input/currency-input.container.js')
-rw-r--r-- | ui/app/components/currency-input/currency-input.container.js | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/ui/app/components/currency-input/currency-input.container.js b/ui/app/components/currency-input/currency-input.container.js deleted file mode 100644 index 428be4557..000000000 --- a/ui/app/components/currency-input/currency-input.container.js +++ /dev/null @@ -1,31 +0,0 @@ -import { connect } from 'react-redux' -import CurrencyInput from './currency-input.component' -import { ETH } from '../../constants/common' -import {getIsMainnet, preferencesSelector} from '../../selectors' - -const mapStateToProps = state => { - const { metamask: { nativeCurrency, currentCurrency, conversionRate } } = state - const { showFiatInTestnets } = preferencesSelector(state) - const isMainnet = getIsMainnet(state) - - return { - nativeCurrency, - currentCurrency, - conversionRate, - hideFiat: (!isMainnet && !showFiatInTestnets), - } -} - -const mergeProps = (stateProps, dispatchProps, ownProps) => { - const { nativeCurrency, currentCurrency } = stateProps - - return { - ...stateProps, - ...dispatchProps, - ...ownProps, - nativeSuffix: nativeCurrency || ETH, - fiatSuffix: currentCurrency.toUpperCase(), - } -} - -export default connect(mapStateToProps, null, mergeProps)(CurrencyInput) |