You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.4 KiB
53 lines
1.4 KiB
import React, { Component } from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import SendRowWrapper from '../send-row-wrapper';
|
|
import AdvancedGasInputs from '../../../../components/app/gas-customization/advanced-gas-inputs';
|
|
import { GAS_INPUT_MODES } from '../../../../ducks/send';
|
|
|
|
export default class SendGasRow extends Component {
|
|
static propTypes = {
|
|
updateGasPrice: PropTypes.func,
|
|
updateGasLimit: PropTypes.func,
|
|
gasInputMode: PropTypes.oneOf(Object.values(GAS_INPUT_MODES)),
|
|
gasPrice: PropTypes.string,
|
|
gasLimit: PropTypes.string,
|
|
insufficientBalance: PropTypes.bool,
|
|
minimumGasLimit: PropTypes.string,
|
|
};
|
|
|
|
static contextTypes = {
|
|
t: PropTypes.func,
|
|
trackEvent: PropTypes.func,
|
|
};
|
|
|
|
render() {
|
|
const {
|
|
updateGasPrice,
|
|
updateGasLimit,
|
|
gasPrice,
|
|
gasLimit,
|
|
insufficientBalance,
|
|
minimumGasLimit,
|
|
gasInputMode,
|
|
} = this.props;
|
|
|
|
if (gasInputMode !== GAS_INPUT_MODES.INLINE) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<SendRowWrapper>
|
|
<AdvancedGasInputs
|
|
updateCustomGasPrice={updateGasPrice}
|
|
updateCustomGasLimit={updateGasLimit}
|
|
customGasPrice={gasPrice}
|
|
customGasLimit={gasLimit}
|
|
insufficientBalance={insufficientBalance}
|
|
minimumGasLimit={minimumGasLimit}
|
|
customPriceIsSafe
|
|
isSpeedUp={false}
|
|
/>
|
|
</SendRowWrapper>
|
|
);
|
|
}
|
|
}
|
|
|