Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
0d410893
Unverified
Commit
0d410893
authored
May 12, 2020
by
Ian Lapham
Committed by
GitHub
May 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ui changes (#747)
* copy changes * remove unused input on toggle * comparison fix
parent
6da8e2c8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
22 deletions
+32
-22
index.tsx
src/components/AddressInputPanel/index.tsx
+9
-10
index.tsx
src/components/CreatePool/index.tsx
+1
-1
index.tsx
src/components/CurrencyInputPanel/index.tsx
+0
-1
index.tsx
src/components/ExchangePage/index.tsx
+22
-10
No files found.
src/components/AddressInputPanel/index.tsx
View file @
0d410893
...
...
@@ -190,16 +190,15 @@ export default function AddressInputPanel({
<
TYPE
.
black
color=
{
theme
.
text2
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
Recipient
</
TYPE
.
black
>
{
data
.
name
?
(
<
Link
href=
{
getEtherscanLink
(
chainId
,
data
.
name
,
'
address
'
)
}
style=
{
{
fontSize
:
'
14px
'
}
}
>
(View on Etherscan)
</
Link
>
)
:
(
<
Link
href=
{
getEtherscanLink
(
chainId
,
data
.
address
,
'
address
'
)
}
style=
{
{
fontSize
:
'
14px
'
}
}
>
{
data
.
name
||
(
data
.
address
&&
(
<
Link
href=
{
getEtherscanLink
(
chainId
,
data
.
name
||
data
.
address
,
'
address
'
)
}
style=
{
{
fontSize
:
'
14px
'
}
}
>
(View on Etherscan)
</
Link
>
)
}
)
)
}
</
RowBetween
>
<
Input
type=
"text"
...
...
src/components/CreatePool/index.tsx
View file @
0d410893
...
...
@@ -130,7 +130,7 @@ function CreatePool({ history }) {
setShowSearch
(
false
)
}
}
hiddenToken=
{
activeField
===
Fields
.
TOKEN0
?
token1Address
:
token0Address
}
showCommonBases=
{
true
}
showCommonBases=
{
activeField
===
Fields
.
TOKEN0
}
/>
</
AutoColumn
>
)
...
...
src/components/CurrencyInputPanel/index.tsx
View file @
0d410893
...
...
@@ -175,7 +175,6 @@ export default function CurrencyInputPanel({
<
TYPE
.
body
color=
{
theme
.
text2
}
fontWeight=
{
500
}
fontSize=
{
14
}
>
{
label
}
</
TYPE
.
body
>
{
account
&&
(
<
Hover
>
<
TYPE
.
body
...
...
src/components/ExchangePage/index.tsx
View file @
0d410893
...
...
@@ -22,6 +22,7 @@ import { useAllTokens, useToken } from '../../contexts/Tokens'
import
{
usePendingApproval
,
useTransactionAdder
}
from
'
../../contexts/Transactions
'
import
{
useTokenContract
,
useWeb3React
}
from
'
../../hooks
'
import
{
useTradeExactIn
,
useTradeExactOut
}
from
'
../../hooks/Trades
'
import
{
useWalletModalToggle
}
from
'
../../state/application/hooks
'
import
{
Hover
,
TYPE
}
from
'
../../theme
'
import
{
Link
}
from
'
../../theme/components
'
import
{
...
...
@@ -88,6 +89,9 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
// adding notifications on txns
const
addTransaction
=
useTransactionAdder
()
// toggle wallet when disconnected
const
toggleWalletModal
=
useWalletModalToggle
()
// sending state
const
[
sending
]
=
useState
<
boolean
>
(
sendingInput
)
const
[
sendingWithSwap
,
setSendingWithSwap
]
=
useState
<
boolean
>
(
false
)
...
...
@@ -835,7 +839,7 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
<
RowBetween
>
<
RowFixed
>
<
TYPE
.
black
color=
{
theme
.
text2
}
fontSize=
{
14
}
fontWeight=
{
400
}
>
Price
i
mpact
Price
I
mpact
</
TYPE
.
black
>
<
QuestionHelper
text=
"The difference between the market price and your price due to trade size."
/>
</
RowFixed
>
...
...
@@ -1021,7 +1025,7 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
<>
<CurrencyInputPanel
field={Field.INPUT}
label={'From'}
label={
independentField === Field.OUTPUT && parsedAmounts[Field.INPUT] ? 'From (estimated)' :
'From'}
value={formattedAmounts[Field.INPUT]}
atMax={atMaxAmountInput}
token={tokens[Field.INPUT]}
...
...
@@ -1071,7 +1075,7 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
onMax={() => {
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
)}
</AutoColumn>
<BottomGrouping>
{noRoute && userHasSpecifiedInputOutput ? (
{!account ? (
<ButtonLight
onClick={() => {
toggleWalletModal()
}}
>
Connect Wallet
</ButtonLight>
) : noRoute && userHasSpecifiedInputOutput ? (
<GreyCard style={{ textAlign: 'center' }}>
<TYPE.main>No path found.</TYPE.main>
<TYPE.main mb="4px">Insufficient liquidity for this trade.</TYPE.main>
<Link
onClick={() => {
history.push('/add/' + tokens[Field.INPUT]?.address + '-' + tokens[Field.OUTPUT]?.address)
}}
>
Create one now
{' '}
Add liquidity now.
</Link>
</GreyCard>
) : !userHasApprovedRouter && !inputError ? (
...
...
@@ -1298,7 +1310,7 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
<SectionBreak />
<RowFixed padding={'0 20px'}>
<TYPE.black fontWeight={400} fontSize={14} color={theme.text2}>
Set
front running resist
ance
Set
slippage toler
ance
</TYPE.black>
<QuestionHelper text="Your transaction will revert if the price changes more than this amount after you submit your trade." />
</RowFixed>
...
...
@@ -1326,8 +1338,8 @@ function ExchangePage({ sendingInput = false, history, params }: ExchangePagePro
</RowFixed>
</RowBetween>
<Text lineHeight="145.23%;" fontSize={16} fontWeight={400} color={theme.text1}>
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.
</Text>
</AutoColumn>
</YellowCard>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment