2021-02-04 19:15:23 +01:00
|
|
|
import { connect } from 'react-redux';
|
2022-01-10 17:23:53 +01:00
|
|
|
import {
|
2023-02-16 20:23:29 +01:00
|
|
|
getNftContracts,
|
|
|
|
getNfts,
|
2022-01-10 17:23:53 +01:00
|
|
|
getNativeCurrency,
|
|
|
|
} from '../../../../ducks/metamask/metamask';
|
2021-02-04 19:15:23 +01:00
|
|
|
import {
|
|
|
|
getMetaMaskAccounts,
|
2021-04-02 00:57:00 +02:00
|
|
|
getNativeCurrencyImage,
|
2021-02-04 19:15:23 +01:00
|
|
|
} from '../../../../selectors';
|
2022-01-10 17:23:53 +01:00
|
|
|
import { updateSendAsset, getSendAsset } from '../../../../ducks/send';
|
2021-02-04 19:15:23 +01: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,
|
2023-02-16 20:23:29 +01:00
|
|
|
nfts: getNfts(state),
|
|
|
|
collections: getNftContracts(state),
|
2022-01-10 17:23:53 +01:00
|
|
|
sendAsset: getSendAsset(state),
|
2019-04-17 21:15:13 +02:00
|
|
|
accounts: getMetaMaskAccounts(state),
|
2021-02-11 19:20:08 +01:00
|
|
|
nativeCurrency: getNativeCurrency(state),
|
2021-04-02 00:57:00 +02:00
|
|
|
nativeCurrencyImage: getNativeCurrencyImage(state),
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-04-17 21:15:13 +02:00
|
|
|
}
|
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
function mapDispatchToProps(dispatch) {
|
2019-04-17 21:15:13 +02:00
|
|
|
return {
|
2021-06-23 23:35:25 +02:00
|
|
|
updateSendAsset: ({ type, details }) =>
|
|
|
|
dispatch(updateSendAsset({ type, details })),
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-04-17 21:15:13 +02:00
|
|
|
}
|
|
|
|
|
2021-02-04 19:15:23 +01:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SendAssetRow);
|