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
70e9257c
Unverified
Commit
70e9257c
authored
May 28, 2019
by
Noah Zinsmeister
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warnings + bugs
parent
f2f960f6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
21 deletions
+23
-21
index.js
src/components/ContextualInfoNew/index.js
+4
-2
index.js
src/components/Web3Status/index.js
+0
-6
index.js
src/hooks/index.js
+14
-8
index.js
src/pages/Swap/index.js
+2
-2
components.js
src/theme/components.js
+3
-3
No files found.
src/components/ContextualInfoNew/index.js
View file @
70e9257c
...
@@ -40,6 +40,8 @@ const Details = styled.div`
...
@@ -40,6 +40,8 @@ const Details = styled.div`
const
ErrorSpan
=
styled
.
span
`
const
ErrorSpan
=
styled
.
span
`
margin-right: 12px;
margin-right: 12px;
font-size: 0.75rem;
line-height: 0.75rem;
color:
${({
isError
,
theme
})
=>
isError
&&
theme
.
salmonRed
}
;
color:
${({
isError
,
theme
})
=>
isError
&&
theme
.
salmonRed
}
;
${({
slippageWarning
,
highSlippageWarning
,
theme
})
=>
${({
slippageWarning
,
highSlippageWarning
,
theme
})
=>
...
@@ -56,7 +58,7 @@ const ErrorSpan = styled.span`
...
@@ -56,7 +58,7 @@ const ErrorSpan = styled.span`
`
}
`
}
`
`
const
WrappedDropup
=
({
isError
,
...
rest
})
=>
<
Dropup
{...
rest
}
/
>
const
WrappedDropup
=
({
isError
,
highSlippageWarning
,
...
rest
})
=>
<
Dropup
{...
rest
}
/
>
const
ColoredDropup
=
styled
(
WrappedDropup
)
`
const
ColoredDropup
=
styled
(
WrappedDropup
)
`
path {
path {
stroke:
${({
isError
,
theme
})
=>
isError
&&
theme
.
salmonRed
}
;
stroke:
${({
isError
,
theme
})
=>
isError
&&
theme
.
salmonRed
}
;
...
@@ -69,7 +71,7 @@ const ColoredDropup = styled(WrappedDropup)`
...
@@ -69,7 +71,7 @@ const ColoredDropup = styled(WrappedDropup)`
}
}
`
`
const
WrappedDropdown
=
({
isError
,
...
rest
})
=>
<
Dropdown
{...
rest
}
/
>
const
WrappedDropdown
=
({
isError
,
highSlippageWarning
,
...
rest
})
=>
<
Dropdown
{...
rest
}
/
>
const
ColoredDropdown
=
styled
(
WrappedDropdown
)
`
const
ColoredDropdown
=
styled
(
WrappedDropdown
)
`
path {
path {
stroke:
${({
isError
,
theme
})
=>
isError
&&
theme
.
salmonRed
}
;
stroke:
${({
isError
,
theme
})
=>
isError
&&
theme
.
salmonRed
}
;
...
...
src/components/Web3Status/index.js
View file @
70e9257c
...
@@ -212,12 +212,6 @@ export default function Web3Status() {
...
@@ -212,12 +212,6 @@ export default function Web3Status() {
}
}
},
[
connectorName
,
setConnector
])
},
[
connectorName
,
setConnector
])
useEffect
(()
=>
{
if
(
account
)
{
setError
()
}
})
function
onClick
()
{
function
onClick
()
{
if
(
walletModalError
)
{
if
(
walletModalError
)
{
openWalletModal
()
openWalletModal
()
...
...
src/hooks/index.js
View file @
70e9257c
...
@@ -58,8 +58,9 @@ export function useENSName(address) {
...
@@ -58,8 +58,9 @@ export function useENSName(address) {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
isAddress
(
address
))
{
if
(
isAddress
(
address
))
{
let
stale
=
false
let
stale
=
false
library
library
.
lookupAddress
(
address
).
then
(
name
=>
{
.
lookupAddress
(
address
)
.
then
(
name
=>
{
if
(
!
stale
)
{
if
(
!
stale
)
{
if
(
name
)
{
if
(
name
)
{
setENSNname
(
name
)
setENSNname
(
name
)
...
@@ -68,6 +69,11 @@ export function useENSName(address) {
...
@@ -68,6 +69,11 @@ export function useENSName(address) {
}
}
}
}
})
})
.
catch
(()
=>
{
if
(
!
stale
)
{
setENSNname
(
null
)
}
})
return
()
=>
{
return
()
=>
{
stale
=
true
stale
=
true
...
...
src/pages/Swap/index.js
View file @
70e9257c
...
@@ -599,8 +599,8 @@ export default function Swap() {
...
@@ -599,8 +599,8 @@ export default function Swap() {
contextualInfo
=
{
contextualInfo
?
contextualInfo
:
slippageWarningText
}
contextualInfo
=
{
contextualInfo
?
contextualInfo
:
slippageWarningText
}
allowExpand
=
{
!!
(
inputCurrency
&&
outputCurrency
&&
inputValueParsed
&&
outputValueParsed
)}
allowExpand
=
{
!!
(
inputCurrency
&&
outputCurrency
&&
inputValueParsed
&&
outputValueParsed
)}
isError
=
{
isError
}
isError
=
{
isError
}
slippageWarning
=
{
slippageWarning
&&
slippageWarningText
}
slippageWarning
=
{
slippageWarning
&&
!
contextualInfo
}
highSlippageWarning
=
{
highSlippageWarning
&&
slippageWarningText
}
highSlippageWarning
=
{
highSlippageWarning
&&
!
contextualInfo
}
renderTransactionDetails
=
{
renderTransactionDetails
}
renderTransactionDetails
=
{
renderTransactionDetails
}
/
>
/
>
)
)
...
...
src/theme/components.js
View file @
70e9257c
import
styled
from
'
styled-components
'
import
styled
from
'
styled-components
'
import
{
lighten
,
darken
}
from
'
polished
'
import
{
lighten
,
darken
}
from
'
polished
'
export
const
Button
=
styled
.
button
.
attrs
({
export
const
Button
=
styled
.
button
.
attrs
(
({
warning
,
theme
})
=>
(
{
backgroundColor
:
({
warning
,
theme
})
=>
(
warning
?
theme
.
salmonRed
:
theme
.
royalBlue
)
backgroundColor
:
warning
?
theme
.
salmonRed
:
theme
.
royalBlue
})
`
})
)
`
padding: 1rem 2rem 1rem 2rem;
padding: 1rem 2rem 1rem 2rem;
border-radius: 3rem;
border-radius: 3rem;
cursor: pointer;
cursor: pointer;
...
...
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