2019-04-17 21:15:13 +02:00
|
|
|
import { connect } from 'react-redux'
|
2020-05-29 19:46:10 +02:00
|
|
|
import { getMetaMaskAccounts, getSendTokenAddress } from '../../../../selectors'
|
2020-06-01 19:54:32 +02:00
|
|
|
import { updateSendToken } from '../../../../store/actions'
|
2020-08-18 21:18:25 +02:00
|
|
|
import SendAssetRow from './send-asset-row.component'
|
2019-04-17 21:15:13 +02:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
function mapStateToProps(state) {
|
2019-04-17 21:15:13 +02:00
|
|
|
return {
|
|
|
|
tokens: state.metamask.tokens,
|
|
|
|
selectedAddress: state.metamask.selectedAddress,
|
2020-05-29 19:46:10 +02:00
|
|
|
sendTokenAddress: getSendTokenAddress(state),
|
2019-04-17 21:15:13 +02:00
|
|
|
accounts: getMetaMaskAccounts(state),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
function mapDispatchToProps(dispatch) {
|
2019-04-17 21:15:13 +02:00
|
|
|
return {
|
2020-06-01 19:54:32 +02:00
|
|
|
setSendToken: (token) => dispatch(updateSendToken(token)),
|
2019-04-17 21:15:13 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SendAssetRow)
|