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
bea5c048
Unverified
Commit
bea5c048
authored
May 12, 2021
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix lint errors, show source list in extra tokens
parent
27960532
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
CurrencyList.tsx
src/components/SearchModal/CurrencyList.tsx
+1
-2
ImportRow.tsx
src/components/SearchModal/ImportRow.tsx
+3
-3
Tokens.ts
src/hooks/Tokens.ts
+0
-1
No files found.
src/components/SearchModal/CurrencyList.tsx
View file @
bea5c048
import
{
Currency
,
CurrencyAmount
,
currencyEquals
,
ETHER
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
CurrencyAmount
,
currencyEquals
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
TokenList
}
from
'
@uniswap/token-lists/dist/types
'
import
React
,
{
CSSProperties
,
MutableRefObject
,
useCallback
,
useMemo
}
from
'
react
'
import
React
,
{
CSSProperties
,
MutableRefObject
,
useCallback
,
useMemo
}
from
'
react
'
import
{
FixedSizeList
}
from
'
react-window
'
import
{
FixedSizeList
}
from
'
react-window
'
import
{
Text
}
from
'
rebass
'
import
{
Text
}
from
'
rebass
'
...
...
src/components/SearchModal/ImportRow.tsx
View file @
bea5c048
import
{
TokenList
}
from
'
@uniswap/token-lists/dist/types
'
import
React
,
{
CSSProperties
}
from
'
react
'
import
React
,
{
CSSProperties
}
from
'
react
'
import
{
Token
}
from
'
@uniswap/sdk-core
'
import
{
Token
}
from
'
@uniswap/sdk-core
'
import
{
AutoRow
,
RowFixed
}
from
'
components/Row
'
import
{
AutoRow
,
RowFixed
}
from
'
components/Row
'
...
@@ -11,6 +10,7 @@ import { ButtonPrimary } from 'components/Button'
...
@@ -11,6 +10,7 @@ import { ButtonPrimary } from 'components/Button'
import
styled
from
'
styled-components
'
import
styled
from
'
styled-components
'
import
{
useIsUserAddedToken
,
useIsTokenActive
}
from
'
hooks/Tokens
'
import
{
useIsUserAddedToken
,
useIsTokenActive
}
from
'
hooks/Tokens
'
import
{
CheckCircle
}
from
'
react-feather
'
import
{
CheckCircle
}
from
'
react-feather
'
import
{
WrappedTokenInfo
}
from
'
../../state/lists/wrappedTokenInfo
'
const
TokenSection
=
styled
.
div
<
{
dim
?:
boolean
}
>
`
const
TokenSection
=
styled
.
div
<
{
dim
?:
boolean
}
>
`
padding: 4px 20px;
padding: 4px 20px;
...
@@ -43,14 +43,12 @@ export default function ImportRow({
...
@@ -43,14 +43,12 @@ export default function ImportRow({
token
,
token
,
style
,
style
,
dim
,
dim
,
list
,
showImportView
,
showImportView
,
setImportToken
,
setImportToken
,
}:
{
}:
{
token
:
Token
token
:
Token
style
?:
CSSProperties
style
?:
CSSProperties
dim
?:
boolean
dim
?:
boolean
list
?:
TokenList
showImportView
:
()
=>
void
showImportView
:
()
=>
void
setImportToken
:
(
token
:
Token
)
=>
void
setImportToken
:
(
token
:
Token
)
=>
void
})
{
})
{
...
@@ -60,6 +58,8 @@ export default function ImportRow({
...
@@ -60,6 +58,8 @@ export default function ImportRow({
const
isAdded
=
useIsUserAddedToken
(
token
)
const
isAdded
=
useIsUserAddedToken
(
token
)
const
isActive
=
useIsTokenActive
(
token
)
const
isActive
=
useIsTokenActive
(
token
)
const
list
=
token
instanceof
WrappedTokenInfo
?
token
.
list
:
undefined
return
(
return
(
<
TokenSection
style=
{
style
}
>
<
TokenSection
style=
{
style
}
>
<
CurrencyLogo
currency=
{
token
}
size=
{
'
24px
'
}
style=
{
{
opacity
:
dim
?
'
0.6
'
:
'
1
'
}
}
/>
<
CurrencyLogo
currency=
{
token
}
size=
{
'
24px
'
}
style=
{
{
opacity
:
dim
?
'
0.6
'
:
'
1
'
}
}
/>
...
...
src/hooks/Tokens.ts
View file @
bea5c048
import
{
parseBytes32String
}
from
'
@ethersproject/strings
'
import
{
parseBytes32String
}
from
'
@ethersproject/strings
'
import
{
Currency
,
currencyEquals
,
ETHER
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
Currency
,
currencyEquals
,
ETHER
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
TokenList
}
from
'
@uniswap/token-lists/dist/types
'
import
{
arrayify
}
from
'
ethers/lib/utils
'
import
{
arrayify
}
from
'
ethers/lib/utils
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
filterTokens
}
from
'
../components/SearchModal/filtering
'
import
{
filterTokens
}
from
'
../components/SearchModal/filtering
'
...
...
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