mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 19:10:22 +01:00
e2fbc7ce8e
* Remove button group for non-EIP-1559 networks * Fix tests...maybe * Remove unnecessary props, as well as gas display * Remove unused string * test progress * fix test * fix test * add customizes gas block to improve e2e pass rate Co-authored-by: Alex <adonesky@gmail.com>
54 lines
1.4 KiB
JavaScript
54 lines
1.4 KiB
JavaScript
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>
|
|
);
|
|
}
|
|
}
|