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/app/components/token-view-balance/token-view-balance.containe...

30 lines
838 B

import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import { compose } from 'recompose'
import TokenViewBalance from './token-view-balance.component'
import { getSelectedToken, getSelectedAddress } from '../../selectors'
import { showModal } from '../../actions'
const mapStateToProps = state => {
const selectedAddress = getSelectedAddress(state)
const { metamask: { network, accounts } } = state
const account = accounts[selectedAddress]
const { balance } = account
return {
selectedToken: getSelectedToken(state),
network,
balance,
}
}
const mapDispatchToProps = dispatch => {
return {
showDepositModal: () => dispatch(showModal({ name: 'DEPOSIT_ETHER' })),
}
}
export default compose(
withRouter,
connect(mapStateToProps, mapDispatchToProps)
)(TokenViewBalance)