From a4ab2623ab6af1d8be787e61130a1cb823c3ea3b Mon Sep 17 00:00:00 2001 From: Vasek Mlejnsky Date: Wed, 5 Sep 2018 14:46:31 +0200 Subject: [PATCH] Remove unused component --- .../AccountSend/components/AdvancedForm.js | 197 ------------------ 1 file changed, 197 deletions(-) delete mode 100644 src/views/Wallet/views/AccountSend/components/AdvancedForm.js diff --git a/src/views/Wallet/views/AccountSend/components/AdvancedForm.js b/src/views/Wallet/views/AccountSend/components/AdvancedForm.js deleted file mode 100644 index 770b7d3a..00000000 --- a/src/views/Wallet/views/AccountSend/components/AdvancedForm.js +++ /dev/null @@ -1,197 +0,0 @@ -/* @flow */ -import React from 'react'; -import Tooltip from 'rc-tooltip'; -import TooltipContent from 'components/TooltipContent'; -import Link from 'components/Link'; -import styled from 'styled-components'; -import colors from 'config/colors'; -import type { Props as BaseProps } from '../Container'; - -const GreenSpan = styled.span` - color: ${colors.GREEN_PRIMARY}; -`; - -type Props = { - selectedAccount: $ElementType, - sendForm: $ElementType, - sendFormActions: $ElementType, - children?: $ElementType, -}; - -const AdvancedForm = (props: Props) => { - const { - account, - network, - } = props.selectedAccount; - - const { - networkSymbol, - currency, - gasPrice, - gasLimit, - recommendedGasPrice, - calculatingGasLimit, - nonce, - data, - errors, - warnings, - infos, - advanced, - } = props.sendForm; - - const { - toggleAdvanced, - onGasPriceChange, - onGasLimitChange, - onNonceChange, - onDataChange, - } = props.sendFormActions; - - if (!advanced) { - return ( -
- Advanced settings - { props.children } -
- ); - } - - const nonceTooltip = ( - - TODO
-
- ); - - let gasLimitTooltipCurrency: string; - let gasLimitTooltipValue: string; - if (networkSymbol !== currency) { - gasLimitTooltipCurrency = 'tokens'; - gasLimitTooltipValue = network.defaultGasLimitTokens; - } else { - gasLimitTooltipCurrency = networkSymbol; - gasLimitTooltipValue = network.defaultGasLimit; - } - - const gasLimitTooltip = ( - - Gas limit is the amount of gas to send with your transaction.
- TX fee = gas price * gas limit & is paid to miners for including your TX in a block.
- Increasing this number will not get your TX mined faster.
- Default value for sending {gasLimitTooltipCurrency} is {gasLimitTooltipValue} -
- ); - - const gasPriceTooltip = ( - - Gas Price is the amount you pay per unit of gas.
- TX fee = gas price * gas limit & is paid to miners for including your TX in a block.
- Higher the gas price = faster transaction, but more expensive. Recommended is {recommendedGasPrice} GWEI.
- Read more -
- ); - - const dataTooltip = ( - - Data is usually used when you send transactions to contracts. - - ); - - - return ( -
- Advanced settings -
- {/*
-
} - overlay={ nonceTooltip } - placement="top"> - - - - onNonceChange(event.target.value) } /> - { errors.nonce ? ({ errors.nonce }) : null } - { warnings.nonce ? ({ warnings.nonce }) : null } -
*/} -
- - 0} - onChange={event => onGasLimitChange(event.target.value)} - /> - { errors.gasLimit ? ({ errors.gasLimit }) : null } - { warnings.gasLimit ? ({ warnings.gasLimit }) : null } - { calculatingGasLimit ? (Calculating...) : null } -
-
- - onGasPriceChange(event.target.value)} - /> - { errors.gasPrice ? ({ errors.gasPrice }) : null } -
-
- -
- -