2021-02-04 19:15:23 +01:00
|
|
|
import { connect } from 'react-redux';
|
2019-07-31 21:56:44 +02:00
|
|
|
import {
|
2021-04-28 20:02:01 +02:00
|
|
|
getIsEthGasPriceFetched,
|
|
|
|
getNoGasPriceFetched,
|
2021-09-30 13:57:59 +02:00
|
|
|
checkNetworkOrAccountNotSupports1559,
|
2021-02-04 19:15:23 +01:00
|
|
|
} from '../../../selectors';
|
2021-10-29 17:45:50 +02:00
|
|
|
import {
|
|
|
|
getIsBalanceInsufficient,
|
2021-11-03 20:03:54 +01:00
|
|
|
getSendAsset,
|
2022-01-19 19:42:41 +01:00
|
|
|
getAssetError,
|
2022-07-14 00:15:38 +02:00
|
|
|
getRecipient,
|
|
|
|
acknowledgeRecipientWarning,
|
|
|
|
getRecipientWarningAcknowledgement,
|
2021-10-29 17:45:50 +02:00
|
|
|
} from '../../../ducks/send';
|
2021-02-04 19:15:23 +01:00
|
|
|
import SendContent from './send-content.component';
|
2019-07-31 21:56:44 +02:00
|
|
|
|
2020-11-03 00:41:28 +01:00
|
|
|
function mapStateToProps(state) {
|
2022-07-14 00:15:38 +02:00
|
|
|
const recipient = getRecipient(state);
|
2022-07-31 20:26:40 +02:00
|
|
|
const recipientWarningAcknowledged =
|
|
|
|
getRecipientWarningAcknowledgement(state);
|
2022-11-28 17:41:42 +01:00
|
|
|
|
2019-07-31 21:56:44 +02:00
|
|
|
return {
|
2021-04-28 20:02:01 +02:00
|
|
|
isEthGasPrice: getIsEthGasPriceFetched(state),
|
|
|
|
noGasPrice: getNoGasPriceFetched(state),
|
2022-07-31 20:26:40 +02:00
|
|
|
networkOrAccountNotSupports1559:
|
|
|
|
checkNetworkOrAccountNotSupports1559(state),
|
2021-10-29 17:45:50 +02:00
|
|
|
getIsBalanceInsufficient: getIsBalanceInsufficient(state),
|
2021-11-03 20:03:54 +01:00
|
|
|
asset: getSendAsset(state),
|
2022-01-19 19:42:41 +01:00
|
|
|
assetError: getAssetError(state),
|
2022-07-14 00:15:38 +02:00
|
|
|
recipient,
|
|
|
|
recipientWarningAcknowledged,
|
2021-02-04 19:15:23 +01:00
|
|
|
};
|
2019-07-31 21:56:44 +02:00
|
|
|
}
|
|
|
|
|
2022-07-14 00:15:38 +02:00
|
|
|
function mapDispatchToProps(dispatch) {
|
|
|
|
return {
|
|
|
|
acknowledgeRecipientWarning: () => dispatch(acknowledgeRecipientWarning()),
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(SendContent);
|