2018-04-26 18:38:38 +02:00
|
|
|
import { connect } from 'react-redux'
|
|
|
|
import {
|
|
|
|
getConversionRate,
|
2018-06-23 00:05:50 +02:00
|
|
|
getCurrentCurrency,
|
2018-10-26 10:26:43 +02:00
|
|
|
getNativeCurrency,
|
2018-04-26 18:38:38 +02:00
|
|
|
} from '../send.selectors.js'
|
2019-01-30 13:16:12 +01:00
|
|
|
import {
|
2019-02-26 19:30:41 +01:00
|
|
|
getIsMainnet,
|
2019-01-30 13:16:12 +01:00
|
|
|
isBalanceCached,
|
2019-02-26 19:30:41 +01:00
|
|
|
preferencesSelector,
|
2019-04-17 21:15:13 +02:00
|
|
|
} from '../../../selectors/selectors'
|
2018-04-26 18:38:38 +02:00
|
|
|
import AccountListItem from './account-list-item.component'
|
|
|
|
|
|
|
|
export default connect(mapStateToProps)(AccountListItem)
|
|
|
|
|
|
|
|
function mapStateToProps (state) {
|
2019-02-26 19:30:41 +01:00
|
|
|
const { showFiatInTestnets } = preferencesSelector(state)
|
|
|
|
const isMainnet = getIsMainnet(state)
|
|
|
|
|
2018-04-26 18:38:38 +02:00
|
|
|
return {
|
|
|
|
conversionRate: getConversionRate(state),
|
2018-06-23 00:05:50 +02:00
|
|
|
currentCurrency: getCurrentCurrency(state),
|
2018-10-26 10:26:43 +02:00
|
|
|
nativeCurrency: getNativeCurrency(state),
|
2019-01-30 13:16:12 +01:00
|
|
|
balanceIsCached: isBalanceCached(state),
|
2019-02-26 19:30:41 +01:00
|
|
|
showFiat: (isMainnet || !!showFiatInTestnets),
|
2018-04-26 18:38:38 +02:00
|
|
|
}
|
2018-04-27 21:03:00 +02:00
|
|
|
}
|