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
a06bb790
Unverified
Commit
a06bb790
authored
Dec 01, 2022
by
Vignesh Mohankumar
Committed by
GitHub
Dec 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove all remaining unused exports (#5510)
chore: remove unused tokens/core variables
parent
a446dc7f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
0 additions
and
105 deletions
+0
-105
index.tsx
src/components/Card/index.tsx
+0
-4
styleds.tsx
src/components/SearchModal/styleds.tsx
+0
-13
constants.ts
src/components/Tokens/constants.ts
+0
-1
styleds.tsx
src/components/swap/styleds.tsx
+0
-6
Tokens.ts
src/hooks/Tokens.ts
+0
-10
useColor.ts
src/hooks/useColor.ts
+0
-23
transactionResponse.ts
src/nft/utils/transactionResponse.ts
+0
-8
hooks.ts
src/state/application/hooks.ts
+0
-5
hooks.tsx
src/state/user/hooks.tsx
+0
-11
index.tsx
src/theme/components/index.tsx
+0
-12
formatChartTimes.ts
src/utils/formatChartTimes.ts
+0
-6
index.ts
src/utils/index.ts
+0
-6
No files found.
src/components/Card/index.tsx
View file @
a06bb790
...
...
@@ -14,10 +14,6 @@ export const LightCard = styled(Card)`
background
-
color
:
$
{({
theme
})
=>
theme
.
deprecated_bg1
};
`
export const LightGrayCard = styled(Card)`
background
-
color
:
$
{({
theme
})
=>
theme
.
deprecated_bg2
};
`
export const GrayCard = styled(Card)`
background
-
color
:
$
{({
theme
})
=>
theme
.
deprecated_bg3
};
`
...
...
src/components/SearchModal/styleds.tsx
View file @
a06bb790
...
...
@@ -5,13 +5,6 @@ import styled from 'styled-components/macro'
import
{
AutoColumn
}
from
'
../Column
'
import
{
RowBetween
}
from
'
../Row
'
export
const
TextDot
=
styled
.
div
`
height: 3px;
width: 3px;
background-color:
${({
theme
})
=>
theme
.
deprecated_text2
}
;
border-radius: 50%;
`
export
const
Checkbox
=
styled
.
input
`
border: 1px solid
${({
theme
})
=>
theme
.
deprecated_red3
}
;
height: 20px;
...
...
@@ -77,12 +70,6 @@ export const Separator = styled.div`
background-color:
${({
theme
})
=>
theme
.
backgroundOutline
}
;
`
export
const
SeparatorDark
=
styled
.
div
`
width: 100%;
height: 1px;
background-color:
${({
theme
})
=>
theme
.
deprecated_bg3
}
;
`
export
const
LoadingRows
=
styled
(
BaseLoadingRows
)
`
grid-column-gap: 0.5em;
grid-template-columns: repeat(12, 1fr);
...
...
src/components/Tokens/constants.ts
View file @
a06bb790
...
...
@@ -5,4 +5,3 @@ export const MEDIUM_MEDIA_BREAKPOINT = '720px'
export
const
SMALL_MEDIA_BREAKPOINT
=
'
540px
'
export
const
MOBILE_MEDIA_BREAKPOINT
=
'
420px
'
export
const
SMALL_MOBILE_MEDIA_BREAKPOINT
=
'
390px
'
export
const
SMALLEST_MOBILE_MEDIA_BREAKPOINT
=
'
320px
'
src/components/swap/styleds.tsx
View file @
a06bb790
...
...
@@ -57,12 +57,6 @@ export const ArrowWrapper = styled.div<{ clickable: boolean }>`
:
null
}
`
export
const
SectionBreak
=
styled
.
div
`
height: 1px;
width: 100%;
background-color:
${({
theme
})
=>
theme
.
deprecated_bg3
}
;
`
export
const
ErrorText
=
styled
(
Text
)
<
{
severity
?:
0
|
1
|
2
|
3
|
4
}
>
`
color:
${({
theme
,
severity
})
=>
severity
===
3
||
severity
===
4
...
...
src/hooks/Tokens.ts
View file @
a06bb790
...
...
@@ -133,16 +133,6 @@ export function useSearchInactiveTokenLists(search: string | undefined, minResul
},
[
activeTokens
,
chainId
,
inactiveUrls
,
lists
,
minResults
,
search
])
}
export
function
useIsTokenActive
(
token
:
Token
|
undefined
|
null
):
boolean
{
const
activeTokens
=
useAllTokens
()
if
(
!
activeTokens
||
!
token
)
{
return
false
}
return
!!
activeTokens
[
token
.
address
]
}
// Check if currency is included in custom list from user storage
export
function
useIsUserAddedToken
(
currency
:
Currency
|
undefined
|
null
):
boolean
{
const
userAddedTokens
=
useUserAddedTokens
()
...
...
src/hooks/useColor.ts
View file @
a06bb790
...
...
@@ -89,26 +89,3 @@ export function useColor(token?: Token) {
return
color
}
export
function
useListColor
(
listImageUri
?:
string
)
{
const
[
color
,
setColor
]
=
useState
(
'
#2172E5
'
)
useEffect
(()
=>
{
let
stale
=
false
if
(
listImageUri
)
{
getColorFromUriPath
(
listImageUri
).
then
((
color
)
=>
{
if
(
!
stale
&&
color
!==
null
)
{
setColor
(
color
)
}
})
}
return
()
=>
{
stale
=
true
setColor
(
'
#2172E5
'
)
}
},
[
listImageUri
])
return
color
}
src/nft/utils/transactionResponse.ts
View file @
a06bb790
...
...
@@ -3,14 +3,6 @@ import { formatEther } from '@ethersproject/units'
import
{
TxResponse
,
UpdatedGenieAsset
}
from
'
nft/types
'
import
{
getTotalNftValue
}
from
'
nft/utils
'
// Shortens a given txHash. With standard charsToShorten var of 4, a hash will become 0x1234...1234
export
const
shortenTxHash
=
(
txHash
:
string
,
charsToShorten
=
4
,
addCharsToBack
=
0
):
string
=>
{
return
`
${
txHash
.
substring
(
0
,
charsToShorten
+
2
)}
...
${
txHash
.
substring
(
txHash
.
length
-
charsToShorten
,
txHash
.
length
-
(
charsToShorten
+
addCharsToBack
)
)}
`
}
export
const
parseTransactionResponse
=
(
transactionResponse
:
TxResponse
|
undefined
,
ethPrice
:
number
)
=>
{
let
nftsPurchased
:
UpdatedGenieAsset
[]
=
[]
let
nftsNotPurchased
:
UpdatedGenieAsset
[]
=
[]
...
...
src/state/application/hooks.ts
View file @
a06bb790
...
...
@@ -16,11 +16,6 @@ export function useToggleModal(modal: ApplicationModal): () => void {
return
useCallback
(()
=>
dispatch
(
setOpenModal
(
isOpen
?
null
:
modal
)),
[
dispatch
,
modal
,
isOpen
])
}
export
function
useOpenModal
(
modal
:
ApplicationModal
):
()
=>
void
{
const
dispatch
=
useAppDispatch
()
return
useCallback
(()
=>
dispatch
(
setOpenModal
(
modal
)),
[
dispatch
,
modal
])
}
export
function
useCloseModal
(
_modal
:
ApplicationModal
):
()
=>
void
{
const
dispatch
=
useAppDispatch
()
return
useCallback
(()
=>
dispatch
(
setOpenModal
(
null
)),
[
dispatch
])
...
...
src/state/user/hooks.tsx
View file @
a06bb790
...
...
@@ -17,7 +17,6 @@ import { AppState } from '../index'
import
{
addSerializedPair
,
addSerializedToken
,
removeSerializedToken
,
updateHideClosedPositions
,
updateHideNFTWelcomeModal
,
updateShowNftPromoBanner
,
...
...
@@ -234,16 +233,6 @@ export function useAddUserToken(): (token: Token) => void {
)
}
export
function
useRemoveUserAddedToken
():
(
chainId
:
number
,
address
:
string
)
=>
void
{
const
dispatch
=
useAppDispatch
()
return
useCallback
(
(
chainId
:
number
,
address
:
string
)
=>
{
dispatch
(
removeSerializedToken
({
chainId
,
address
}))
},
[
dispatch
]
)
}
export
function
useUserAddedTokensOnChain
(
chainId
:
number
|
undefined
|
null
):
Token
[]
{
const
serializedTokensMap
=
useAppSelector
(({
user
:
{
tokens
}
})
=>
tokens
)
...
...
src/theme/components/index.tsx
View file @
a06bb790
...
...
@@ -9,7 +9,6 @@ import {
Copy
,
ExternalLink
as
ExternalLinkIconFeather
,
Link
as
LinkIconFeather
,
Trash
,
X
,
}
from
'
react-feather
'
import
{
Link
}
from
'
react-router-dom
'
...
...
@@ -136,17 +135,6 @@ const CopyIcon = styled(Copy)`
stroke
:
$
{({
theme
})
=>
theme
.
accentAction
};
`
export const TrashIcon = styled(Trash)`
$
{
ClickableStyle
}
$
{
IconStyle
}
stroke
:
$
{({
theme
})
=>
theme
.
deprecated_text3
};
cursor
:
pointer
;
align
-
items
:
center
;
justify
-
content
:
center
;
display
:
flex
;
`
const rotateImg = keyframes`
0
%
{
transform
:
perspective
(
1000
px
)
rotateY
(
0
deg
);
...
...
src/utils/formatChartTimes.ts
View file @
a06bb790
...
...
@@ -28,12 +28,6 @@ export const monthDayFormatter = (locale: string) => (timestamp: NumberValue) =>
day
:
'
numeric
'
,
})
export
const
monthYearFormatter
=
(
locale
:
string
)
=>
(
timestamp
:
NumberValue
)
=>
createDateFormatter
(
timestamp
,
locale
,
{
month
:
'
long
'
,
year
:
'
numeric
'
,
})
export
const
monthYearDayFormatter
=
(
locale
:
string
)
=>
(
timestamp
:
NumberValue
)
=>
createDateFormatter
(
timestamp
,
locale
,
{
month
:
'
short
'
,
...
...
src/utils/index.ts
View file @
a06bb790
...
...
@@ -2,8 +2,6 @@ import { getAddress } from '@ethersproject/address'
import
{
AddressZero
}
from
'
@ethersproject/constants
'
import
{
Contract
}
from
'
@ethersproject/contracts
'
import
type
{
JsonRpcProvider
,
JsonRpcSigner
}
from
'
@ethersproject/providers
'
import
{
Token
}
from
'
@uniswap/sdk-core
'
import
{
ChainTokenMap
}
from
'
lib/hooks/useTokenList/utils
'
// returns the checksummed address if the address is valid, otherwise returns false
export
function
isAddress
(
value
:
any
):
string
|
false
{
...
...
@@ -47,7 +45,3 @@ export function getContract(address: string, ABI: any, provider: JsonRpcProvider
export
function
escapeRegExp
(
string
:
string
):
string
{
return
string
.
replace
(
/
[
.*+?^${}()|[
\]\\]
/g
,
'
\\
$&
'
)
// $& means the whole matched string
}
export
function
isTokenOnList
(
chainTokenMap
:
ChainTokenMap
,
token
?:
Token
):
boolean
{
return
Boolean
(
token
?.
isToken
&&
chainTokenMap
[
token
.
chainId
]?.[
token
.
address
])
}
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