2018-04-26 18:38:38 +02:00
|
|
|
import { connect } from 'react-redux'
|
|
|
|
import {
|
2019-07-31 22:17:11 +02:00
|
|
|
getNativeCurrency,
|
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,
|
2020-05-02 21:41:17 +02:00
|
|
|
} from '../../../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 {
|
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
|
|
|
}
|