From 73580de922ce3ff642430d71aa24f5c053e6dd4d Mon Sep 17 00:00:00 2001 From: Moody Salem Date: Mon, 24 Aug 2020 13:33:46 -0500 Subject: [PATCH] improvement(swap): show add a send only for expert mode --- src/components/CurrencyInputPanel/index.tsx | 26 ++++++------- src/pages/Swap/index.tsx | 42 ++++++++++----------- src/theme/components.tsx | 6 --- 3 files changed, 32 insertions(+), 42 deletions(-) diff --git a/src/components/CurrencyInputPanel/index.tsx b/src/components/CurrencyInputPanel/index.tsx index bc826f51f2..a7f2a7fdfc 100644 --- a/src/components/CurrencyInputPanel/index.tsx +++ b/src/components/CurrencyInputPanel/index.tsx @@ -7,7 +7,7 @@ import CurrencySearchModal from '../SearchModal/CurrencySearchModal' import CurrencyLogo from '../CurrencyLogo' import DoubleCurrencyLogo from '../DoubleLogo' import { RowBetween } from '../Row' -import { TYPE, CursorPointer } from '../../theme' +import { TYPE } from '../../theme' import { Input as NumericalInput } from '../NumericalInput' import { ReactComponent as DropDown } from '../../assets/images/dropdown.svg' @@ -170,19 +170,17 @@ export default function CurrencyInputPanel({ {label} {account && ( - - - {!hideBalance && !!currency && selectedCurrencyBalance - ? 'Balance: ' + selectedCurrencyBalance?.toSignificant(6) - : ' -'} - - + + {!hideBalance && !!currency && selectedCurrencyBalance + ? 'Balance: ' + selectedCurrencyBalance?.toSignificant(6) + : ' -'} + )} diff --git a/src/pages/Swap/index.tsx b/src/pages/Swap/index.tsx index 8068fbc251..b7b2534e2c 100644 --- a/src/pages/Swap/index.tsx +++ b/src/pages/Swap/index.tsx @@ -41,7 +41,7 @@ import { useUserDeadline, useUserSlippageTolerance } from '../../state/user/hooks' -import { CursorPointer, LinkStyledButton, TYPE } from '../../theme' +import { LinkStyledButton, TYPE } from '../../theme' import { maxAmountSpend } from '../../utils/maxAmountSpend' import { computeTradePriceBreakdown, warningSeverity } from '../../utils/prices' import AppBody from '../AppBody' @@ -285,27 +285,25 @@ export default function Swap() { id="swap-currency-input" /> - - - - - { - setApprovalSubmitted(false) // reset 2 step UI for approvals - onSwitchTokens() - }} - color={currencies[Field.INPUT] && currencies[Field.OUTPUT] ? theme.primary1 : theme.text2} - /> - - {recipient === null && !showWrap ? ( - onChangeRecipient('')}> - + Add a send (optional) - - ) : null} - - - + + + + { + setApprovalSubmitted(false) // reset 2 step UI for approvals + onSwitchTokens() + }} + color={currencies[Field.INPUT] && currencies[Field.OUTPUT] ? theme.primary1 : theme.text2} + /> + + {recipient === null && !showWrap && isExpertMode ? ( + onChangeRecipient('')}> + + Add a send (optional) + + ) : null} + + theme.text1}; `