From 0d4108937f9ec94f0559dbfbc97c5609c6271034 Mon Sep 17 00:00:00 2001 From: Ian Lapham Date: Tue, 12 May 2020 11:48:42 -0400 Subject: [PATCH] Ui changes (#747) * copy changes * remove unused input on toggle * comparison fix --- src/components/AddressInputPanel/index.tsx | 19 ++++++------ src/components/CreatePool/index.tsx | 2 +- src/components/CurrencyInputPanel/index.tsx | 1 - src/components/ExchangePage/index.tsx | 32 ++++++++++++++------- 4 files changed, 32 insertions(+), 22 deletions(-) diff --git a/src/components/AddressInputPanel/index.tsx b/src/components/AddressInputPanel/index.tsx index 702176cc99..66171c6b7a 100644 --- a/src/components/AddressInputPanel/index.tsx +++ b/src/components/AddressInputPanel/index.tsx @@ -190,16 +190,15 @@ export default function AddressInputPanel({ Recipient - - {data.name ? ( - - (View on Etherscan) - - ) : ( - - (View on Etherscan) - - )} + {data.name || + (data.address && ( + + (View on Etherscan) + + ))} ) diff --git a/src/components/CurrencyInputPanel/index.tsx b/src/components/CurrencyInputPanel/index.tsx index 4aec78fc15..2bdf9d9075 100644 --- a/src/components/CurrencyInputPanel/index.tsx +++ b/src/components/CurrencyInputPanel/index.tsx @@ -175,7 +175,6 @@ export default function CurrencyInputPanel({ {label} - {account && ( (sendingInput) const [sendingWithSwap, setSendingWithSwap] = useState(false) @@ -835,7 +839,7 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro - Price impact + Price Impact @@ -1021,7 +1025,7 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro <> { maxAmountOutput && onMaxOutput(maxAmountOutput.toExact()) }} - label={'To'} + label={independentField === Field.INPUT && parsedAmounts[Field.OUTPUT] ? 'To (estimated)' : 'To'} atMax={atMaxAmountOutput} token={tokens[Field.OUTPUT]} onTokenSelection={address => onTokenSelection(Field.OUTPUT, address)} @@ -1160,16 +1164,24 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro )} - {noRoute && userHasSpecifiedInputOutput ? ( + {!account ? ( + { + toggleWalletModal() + }} + > + Connect Wallet + + ) : noRoute && userHasSpecifiedInputOutput ? ( - No path found. - + Insufficient liquidity for this trade. { history.push('/add/' + tokens[Field.INPUT]?.address + '-' + tokens[Field.OUTPUT]?.address) }} > - Create one now + {' '} + Add liquidity now. ) : !userHasApprovedRouter && !inputError ? ( @@ -1298,7 +1310,7 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro - Set front running resistance + Set slippage tolerance @@ -1326,8 +1338,8 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro - This trade will move the price by {slippageFromTrade?.toFixed(2)}%. This pool probably doesn’t - have enough liquidity to support this trade. + This trade will move the price by ~{priceSlippage.toFixed(2)}%. This pool probably doesn’t have + enough liquidity to support this trade.