11import { connect } from 'react-redux' ;
22import { addToAddressBook , cancelTx } from '../../../store/actions' ;
3- import {
4- getRenderableEstimateDataForSmallButtonsFromGWEI ,
5- getDefaultActiveButtonIndex ,
6- } from '../../../selectors' ;
73import {
84 resetSendState ,
9- getGasPrice ,
105 getSendStage ,
116 getSendTo ,
127 getSendErrors ,
@@ -17,7 +12,6 @@ import {
1712import { getMostRecentOverviewPage } from '../../../ducks/history/history' ;
1813import { addHexPrefix } from '../../../../app/scripts/lib/util' ;
1914import { getSendToAccounts } from '../../../ducks/metamask/metamask' ;
20- import { CUSTOM_GAS_ESTIMATE } from '../../../../shared/constants/gas' ;
2115import SendFooter from './send-footer.component' ;
2216
2317export default connect ( mapStateToProps , mapDispatchToProps ) ( SendFooter ) ;
@@ -31,25 +25,13 @@ function addressIsNew(toAccounts, newAddress) {
3125}
3226
3327function mapStateToProps ( state ) {
34- const gasButtonInfo = getRenderableEstimateDataForSmallButtonsFromGWEI ( state ) ;
35- const gasPrice = getGasPrice ( state ) ;
36- const activeButtonIndex = getDefaultActiveButtonIndex (
37- gasButtonInfo ,
38- gasPrice ,
39- ) ;
40- const gasEstimateType =
41- activeButtonIndex >= 0
42- ? gasButtonInfo [ activeButtonIndex ] . gasEstimateType
43- : CUSTOM_GAS_ESTIMATE ;
44-
4528 return {
4629 disabled : isSendFormInvalid ( state ) ,
4730 to : getSendTo ( state ) ,
4831 toAccounts : getSendToAccounts ( state ) ,
4932 sendStage : getSendStage ( state ) ,
5033 sendErrors : getSendErrors ( state ) ,
5134 draftTransactionID : getDraftTransactionID ( state ) ,
52- gasEstimateType,
5335 mostRecentOverviewPage : getMostRecentOverviewPage ( state ) ,
5436 } ;
5537}
0 commit comments