diff --git a/ui/css/itcss/components/send.scss b/ui/css/itcss/components/send.scss index 41f7677eb..e5e799570 100644 --- a/ui/css/itcss/components/send.scss +++ b/ui/css/itcss/components/send.scss @@ -825,17 +825,6 @@ height: 0; } - &__gas-fee-display { - width: 100%; - position: relative; - - .currency-display--message { - padding: 8px 38px 8px 10px; - display: flex; - align-items: center; - } - } - &__sliders-icon-container { @include Paragraph; diff --git a/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js deleted file mode 100644 index 8e61794e6..000000000 --- a/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.js +++ /dev/null @@ -1,45 +0,0 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import UserPreferencedCurrencyDisplay from '../../../../../components/app/user-preferenced-currency-display'; -import { PRIMARY, SECONDARY } from '../../../../../helpers/constants/common'; - -export default class GasFeeDisplay extends Component { - static propTypes = { - gasLoadingError: PropTypes.bool, - gasTotal: PropTypes.string, - onReset: PropTypes.func, - }; - - static contextTypes = { - t: PropTypes.func, - }; - - render() { - const { gasTotal, gasLoadingError, onReset } = this.props; - - return ( -
- {/* eslint-disable-next-line no-nested-ternary */} - {gasTotal ? ( -
- - -
- ) : gasLoadingError ? ( -
- {this.context.t('setGasPrice')} -
- ) : ( -
{this.context.t('loading')}
- )} - -
- ); - } -} diff --git a/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js deleted file mode 100644 index fa9edb29f..000000000 --- a/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.component.test.js +++ /dev/null @@ -1,59 +0,0 @@ -import React from 'react'; -import { shallow } from 'enzyme'; -import sinon from 'sinon'; -import UserPreferencedCurrencyDisplay from '../../../../../components/app/user-preferenced-currency-display'; -import GasFeeDisplay from './gas-fee-display.component'; - -const propsMethodSpies = { - showCustomizeGasModal: sinon.spy(), - onReset: sinon.spy(), -}; - -describe('GasFeeDisplay Component', () => { - let wrapper; - - describe('render', () => { - beforeEach(() => { - wrapper = shallow( - , - { context: { t: (str) => `${str}_t` } }, - ); - }); - - afterEach(() => { - propsMethodSpies.showCustomizeGasModal.resetHistory(); - }); - - it('should render a CurrencyDisplay component', () => { - expect(wrapper.find(UserPreferencedCurrencyDisplay)).toHaveLength(2); - }); - - it('should render the CurrencyDisplay with the correct props', () => { - const { type, value } = wrapper - .find(UserPreferencedCurrencyDisplay) - .at(0) - .props(); - expect(type).toStrictEqual('PRIMARY'); - expect(value).toStrictEqual('mockGasTotal'); - }); - - it('should render the reset button with the correct props', () => { - const { onClick, className } = wrapper.find('button').props(); - expect(className).toStrictEqual('gas-fee-reset'); - expect(propsMethodSpies.onReset.callCount).toStrictEqual(0); - onClick(); - expect(propsMethodSpies.onReset.callCount).toStrictEqual(1); - }); - - it('should render the reset button with the correct text', () => { - expect(wrapper.find('button').text()).toStrictEqual('reset_t'); - }); - }); -}); diff --git a/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.stories.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.stories.js deleted file mode 100644 index b02ce345d..000000000 --- a/ui/pages/send/send-content/send-gas-row/gas-fee-display/gas-fee-display.stories.js +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import GasFeeDisplay from './gas-fee-display.component'; - -export default { - title: 'Pages/Send/SendContent/SendGasRow/GasFeeDisplay', - id: __filename, - argTypes: { - gasTotal: { control: 'number' }, - gasLoadingError: { control: 'boolean' }, - onReset: { action: 'OnReset' }, - }, -}; - -export const DefaultStory = (args) => { - return ; -}; - -DefaultStory.storyName = 'Default'; -DefaultStory.args = { - gasTotal: 10000000000, - gasLoadingError: false, -}; diff --git a/ui/pages/send/send-content/send-gas-row/gas-fee-display/index.js b/ui/pages/send/send-content/send-gas-row/gas-fee-display/index.js deleted file mode 100644 index e8c5d464f..000000000 --- a/ui/pages/send/send-content/send-gas-row/gas-fee-display/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './gas-fee-display.component';