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
37a50372
Unverified
Commit
37a50372
authored
Apr 27, 2021
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve responsiveness of header
parent
ab99cc61
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
319 deletions
+5
-319
index_old.tsx
src/components/CurrencyInputPanel/index_old.tsx
+0
-312
index.tsx
src/components/Header/index.tsx
+1
-3
useWrapCallback.ts
src/hooks/useWrapCallback.ts
+3
-2
App.tsx
src/pages/App.tsx
+1
-1
index.tsx
src/pages/Swap/index.tsx
+0
-1
No files found.
src/components/CurrencyInputPanel/index_old.tsx
deleted
100644 → 0
View file @
ab99cc61
This diff is collapsed.
Click to expand it.
src/components/Header/index.tsx
View file @
37a50372
...
@@ -46,10 +46,8 @@ const HeaderFrame = styled.div`
...
@@ -46,10 +46,8 @@ const HeaderFrame = styled.div`
background-color:
${({
theme
})
=>
theme
.
bg0
}
;
background-color:
${({
theme
})
=>
theme
.
bg0
}
;
${({
theme
})
=>
theme
.
mediaWidth
.
upToMedium
`
${({
theme
})
=>
theme
.
mediaWidth
.
upToMedium
`
grid-template-columns: 1fr
;
display: flex
;
padding: 0 1rem;
padding: 0 1rem;
width: calc(100%);
position: relative;
`
}
;
`
}
;
${({
theme
})
=>
theme
.
mediaWidth
.
upToExtraSmall
`
${({
theme
})
=>
theme
.
mediaWidth
.
upToExtraSmall
`
...
...
src/hooks/useWrapCallback.ts
View file @
37a50372
...
@@ -34,6 +34,7 @@ export default function useWrapCallback(
...
@@ -34,6 +34,7 @@ export default function useWrapCallback(
return
useMemo
(()
=>
{
return
useMemo
(()
=>
{
if
(
!
wethContract
||
!
chainId
||
!
inputCurrency
||
!
outputCurrency
)
return
NOT_APPLICABLE
if
(
!
wethContract
||
!
chainId
||
!
inputCurrency
||
!
outputCurrency
)
return
NOT_APPLICABLE
const
hasInputAmount
=
Boolean
(
inputAmount
?.
greaterThan
(
'
0
'
))
const
sufficientBalance
=
inputAmount
&&
balance
&&
!
balance
.
lessThan
(
inputAmount
)
const
sufficientBalance
=
inputAmount
&&
balance
&&
!
balance
.
lessThan
(
inputAmount
)
if
(
inputCurrency
===
ETHER
&&
currencyEquals
(
WETH9
[
chainId
],
outputCurrency
))
{
if
(
inputCurrency
===
ETHER
&&
currencyEquals
(
WETH9
[
chainId
],
outputCurrency
))
{
...
@@ -50,7 +51,7 @@ export default function useWrapCallback(
...
@@ -50,7 +51,7 @@ export default function useWrapCallback(
}
}
}
}
:
undefined
,
:
undefined
,
inputError
:
sufficientBalance
?
undefined
:
'
Insufficient ETH balance
'
,
inputError
:
sufficientBalance
?
undefined
:
hasInputAmount
?
'
Insufficient ETH balance
'
:
'
Enter ETH amount
'
,
}
}
}
else
if
(
currencyEquals
(
WETH9
[
chainId
],
inputCurrency
)
&&
outputCurrency
===
ETHER
)
{
}
else
if
(
currencyEquals
(
WETH9
[
chainId
],
inputCurrency
)
&&
outputCurrency
===
ETHER
)
{
return
{
return
{
...
@@ -66,7 +67,7 @@ export default function useWrapCallback(
...
@@ -66,7 +67,7 @@ export default function useWrapCallback(
}
}
}
}
:
undefined
,
:
undefined
,
inputError
:
sufficientBalance
?
undefined
:
'
Insufficient WETH balance
'
,
inputError
:
sufficientBalance
?
undefined
:
hasInputAmount
?
'
Insufficient WETH balance
'
:
'
Enter WETH amount
'
,
}
}
}
else
{
}
else
{
return
NOT_APPLICABLE
return
NOT_APPLICABLE
...
...
src/pages/App.tsx
View file @
37a50372
...
@@ -50,7 +50,7 @@ const BodyWrapper = styled.div`
...
@@ -50,7 +50,7 @@ const BodyWrapper = styled.div`
${({
theme
})
=>
theme
.
mediaWidth
.
upToSmall
`
${({
theme
})
=>
theme
.
mediaWidth
.
upToSmall
`
padding: 16px;
padding: 16px;
padding-top:
2
rem;
padding-top:
6
rem;
`
}
;
`
}
;
`
`
...
...
src/pages/Swap/index.tsx
View file @
37a50372
...
@@ -94,7 +94,6 @@ export default function Swap({ history }: RouteComponentProps) {
...
@@ -94,7 +94,6 @@ export default function Swap({ history }: RouteComponentProps) {
parsedAmount
,
parsedAmount
,
currencies
,
currencies
,
inputError
:
swapInputError
,
inputError
:
swapInputError
,
// v3Trade,
}
=
useDerivedSwapInfo
()
}
=
useDerivedSwapInfo
()
const
{
wrapType
,
execute
:
onWrap
,
inputError
:
wrapInputError
}
=
useWrapCallback
(
const
{
wrapType
,
execute
:
onWrap
,
inputError
:
wrapInputError
}
=
useWrapCallback
(
...
...
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