2019-04-17 21:15:13 +02:00
|
|
|
import { connect } from 'react-redux'
|
|
|
|
import SendAssetRow from './send-asset-row.component'
|
2020-05-02 21:41:17 +02:00
|
|
|
import { getMetaMaskAccounts } from '../../../../selectors'
|
2019-04-17 21:15:13 +02:00
|
|
|
import { setSelectedToken } from '../../../../store/actions'
|
|
|
|
|
|
|
|
function mapStateToProps (state) {
|
|
|
|
return {
|
|
|
|
tokens: state.metamask.tokens,
|
|
|
|
selectedAddress: state.metamask.selectedAddress,
|
|
|
|
selectedTokenAddress: state.metamask.selectedTokenAddress,
|
|
|
|
accounts: getMetaMaskAccounts(state),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function mapDispatchToProps (dispatch) {
|
|
|
|
return {
|
2020-02-15 21:34:12 +01:00
|
|
|
setSelectedToken: (address) => dispatch(setSelectedToken(address)),
|
2019-04-17 21:15:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SendAssetRow)
|