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
a49ff491
Unverified
Commit
a49ff491
authored
Dec 02, 2022
by
Vignesh Mohankumar
Committed by
GitHub
Dec 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove some unused exports (#5514)
* remove some unused exports * undo
parent
ca1dc593
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
186 deletions
+17
-186
tokens.ts
src/constants/tokens.ts
+10
-22
common.css.ts
src/nft/css/common.css.ts
+1
-30
cssStringFromTheme.ts
src/nft/css/cssStringFromTheme.ts
+1
-1
loading.css.ts
src/nft/css/loading.css.ts
+1
-1
sprinkles.css.ts
src/nft/css/sprinkles.css.ts
+0
-7
Asset.css.ts
src/nft/pages/asset/Asset.css.ts
+0
-103
types.ts
src/state/routing/types.ts
+2
-2
reducer.ts
src/state/user/reducer.ts
+0
-18
tuple.ts
src/types/tuple.ts
+1
-1
prices.ts
src/utils/prices.ts
+1
-1
No files found.
src/constants/tokens.ts
View file @
a49ff491
...
...
@@ -18,34 +18,28 @@ export const USDC_MAINNET = new Token(
'
USDC
'
,
'
USD//C
'
)
export
const
USDC_ROPSTEN
=
new
Token
(
const
USDC_ROPSTEN
=
new
Token
(
SupportedChainId
.
ROPSTEN
,
'
0x07865c6e87b9f70255377e024ace6630c1eaa37f
'
,
6
,
'
USDC
'
,
'
USD//C
'
)
export
const
USDC_RINKEBY
=
new
Token
(
const
USDC_RINKEBY
=
new
Token
(
SupportedChainId
.
RINKEBY
,
'
0x4DBCdF9B62e891a7cec5A2568C3F4FAF9E8Abe2b
'
,
6
,
'
tUSDC
'
,
'
test USD//C
'
)
export
const
USDC_GOERLI
=
new
Token
(
const
USDC_GOERLI
=
new
Token
(
SupportedChainId
.
GOERLI
,
'
0x07865c6e87b9f70255377e024ace6630c1eaa37f
'
,
6
,
'
USDC
'
,
'
USD//C
'
)
export
const
USDC_KOVAN
=
new
Token
(
SupportedChainId
.
KOVAN
,
'
0x31eeb2d0f9b6fd8642914ab10f4dd473677d80df
'
,
6
,
'
USDC
'
,
'
USD//C
'
)
const
USDC_KOVAN
=
new
Token
(
SupportedChainId
.
KOVAN
,
'
0x31eeb2d0f9b6fd8642914ab10f4dd473677d80df
'
,
6
,
'
USDC
'
,
'
USD//C
'
)
export
const
USDC_OPTIMISM
=
new
Token
(
SupportedChainId
.
OPTIMISM
,
'
0x7F5c764cBc14f9669B88837ca1490cCa17c31607
'
,
...
...
@@ -53,7 +47,7 @@ export const USDC_OPTIMISM = new Token(
'
USDC
'
,
'
USD//C
'
)
export
const
USDC_OPTIMISM_GOERLI
=
new
Token
(
const
USDC_OPTIMISM_GOERLI
=
new
Token
(
SupportedChainId
.
OPTIMISM_GOERLI
,
'
0x7E07E15D2a87A24492740D16f5bdF58c16db0c4E
'
,
6
,
...
...
@@ -67,7 +61,7 @@ export const USDC_ARBITRUM = new Token(
'
USDC
'
,
'
USD//C
'
)
export
const
USDC_ARBITRUM_RINKEBY
=
new
Token
(
const
USDC_ARBITRUM_RINKEBY
=
new
Token
(
SupportedChainId
.
ARBITRUM_RINKEBY
,
'
0x09b98f8b2395d076514037ff7d39a091a536206c
'
,
6
,
...
...
@@ -81,7 +75,7 @@ export const USDC_POLYGON = new Token(
'
USDC
'
,
'
USD//C
'
)
export
const
USDC_POLYGON_MUMBAI
=
new
Token
(
const
USDC_POLYGON_MUMBAI
=
new
Token
(
SupportedChainId
.
POLYGON_MUMBAI
,
'
0xe11a86849d99f524cac3e7a0ec1241828e332c62
'
,
6
,
...
...
@@ -95,7 +89,7 @@ export const PORTAL_USDC_CELO = new Token(
'
USDCet
'
,
'
USDC (Portal from Ethereum)
'
)
export
const
USDC_CELO_ALFAJORES
=
new
Token
(
const
USDC_CELO_ALFAJORES
=
new
Token
(
SupportedChainId
.
CELO_ALFAJORES
,
'
0x41F4a5d2632b019Ae6CE9625bE3c9CaC143AcC7D
'
,
6
,
...
...
@@ -286,13 +280,7 @@ export const WETH_POLYGON = new Token(
'
WETH
'
,
'
Wrapped Ether
'
)
export
const
CELO_CELO
=
new
Token
(
SupportedChainId
.
CELO
,
'
0x471EcE3750Da237f93B8E339c536989b8978a438
'
,
18
,
'
CELO
'
,
'
Celo
'
)
const
CELO_CELO
=
new
Token
(
SupportedChainId
.
CELO
,
'
0x471EcE3750Da237f93B8E339c536989b8978a438
'
,
18
,
'
CELO
'
,
'
Celo
'
)
export
const
CUSD_CELO
=
new
Token
(
SupportedChainId
.
CELO
,
'
0x765DE816845861e75A25fCA122bb6898B8B1282a
'
,
...
...
@@ -321,7 +309,7 @@ export const CMC02_CELO = new Token(
'
cMCO2
'
,
'
Celo Moss Carbon Credit
'
)
export
const
CELO_CELO_ALFAJORES
=
new
Token
(
const
CELO_CELO_ALFAJORES
=
new
Token
(
SupportedChainId
.
CELO_ALFAJORES
,
'
0xF194afDf50B03e69Bd7D057c1Aa9e10c9954E4C9
'
,
18
,
...
...
src/nft/css/common.css.ts
View file @
a49ff491
...
...
@@ -8,18 +8,6 @@ export const center = sprinkles({
alignItems
:
'
center
'
,
})
export
const
row
=
sprinkles
({
display
:
'
flex
'
,
flexDirection
:
'
row
'
,
alignItems
:
'
center
'
,
})
export
const
column
=
sprinkles
({
display
:
'
flex
'
,
flexDirection
:
'
column
'
,
alignItems
:
'
center
'
,
})
// TYPOGRAPHY
export
const
headlineLarge
=
sprinkles
({
fontWeight
:
'
semibold
'
,
fontSize
:
'
36
'
,
lineHeight
:
'
44
'
})
export
const
headlineMedium
=
sprinkles
({
fontWeight
:
'
semibold
'
,
fontSize
:
'
28
'
,
lineHeight
:
'
36
'
})
...
...
@@ -67,24 +55,7 @@ export const buttonMedium = style([
},
])
export
const
disabled
=
style
([
{
padding
:
'
19px 17px
'
,
boxSizing
:
'
border-box
'
,
textAlign
:
'
left
'
,
},
sprinkles
({
color
:
'
textTertiary
'
,
fontWeight
:
'
medium
'
,
background
:
'
whitesmoke
'
,
borderRadius
:
'
14
'
,
borderStyle
:
'
none
'
,
width
:
'
full
'
,
fontSize
:
'
16
'
,
}),
])
export
const
magicalGradient
=
style
({
const
magicalGradient
=
style
({
selectors
:
{
'
&::before
'
:
{
content
:
''
,
...
...
src/nft/css/cssStringFromTheme.ts
View file @
a49ff491
...
...
@@ -4,7 +4,7 @@ import { lightTheme } from 'nft/themes/lightTheme'
import
{
cssObjectFromTheme
}
from
'
./cssObjectFromTheme
'
import
{
Theme
}
from
'
./sprinkles.css
'
export
function
cssStringFromTheme
(
theme
:
Theme
|
(()
=>
Theme
),
options
:
{
extends
?:
Theme
|
(()
=>
Theme
)
}
=
{})
{
function
cssStringFromTheme
(
theme
:
Theme
|
(()
=>
Theme
),
options
:
{
extends
?:
Theme
|
(()
=>
Theme
)
}
=
{})
{
return
Object
.
entries
(
cssObjectFromTheme
(
theme
,
options
))
.
map
(([
key
,
value
])
=>
`
${
key
}
:
${
value
}
;`
)
.
join
(
''
)
...
...
src/nft/css/loading.css.ts
View file @
a49ff491
...
...
@@ -3,7 +3,7 @@ import { darken } from 'polished'
import
{
sprinkles
}
from
'
./sprinkles.css
'
export
const
loadingAnimation
=
keyframes
({
const
loadingAnimation
=
keyframes
({
'
0%
'
:
{
backgroundPosition
:
'
100% 50%
'
,
},
...
...
src/nft/css/sprinkles.css.ts
View file @
a49ff491
...
...
@@ -51,11 +51,6 @@ const themeContractValues = {
export
type
Theme
=
typeof
themeContractValues
type
DeepPartial
<
T
>
=
{
[
P
in
keyof
T
]?:
DeepPartial
<
T
[
P
]
>
}
export
type
ThemePartial
=
DeepPartial
<
Theme
>
export
const
themeVars
=
createGlobalThemeContract
(
themeContractValues
,
(
_
,
path
)
=>
`genie-
${
path
.
join
(
'
-
'
)}
`
)
const
dimensions
=
{
...
...
@@ -423,7 +418,5 @@ const unresponsiveProperties = defineProperties({
},
})
export
type
UnresponsiveProperties
=
keyof
typeof
unresponsiveProperties
export
const
sprinkles
=
createSprinkles
(
layoutStyles
,
colorStyles
,
unresponsiveProperties
)
export
type
Sprinkles
=
Parameters
<
typeof
sprinkles
>
[
0
]
src/nft/pages/asset/Asset.css.ts
deleted
100644 → 0
View file @
ca1dc593
import
{
style
}
from
'
@vanilla-extract/css
'
import
{
center
}
from
'
../../css/common.css
'
import
{
sprinkles
}
from
'
../../css/sprinkles.css
'
export
const
image
=
style
([
sprinkles
({
borderRadius
:
'
20
'
,
height
:
'
full
'
,
alignSelf
:
'
center
'
}),
{
width
:
'
calc(90vh - 165px)
'
,
height
:
'
calc(90vh - 165px)
'
,
maxHeight
:
'
678px
'
,
maxWidth
:
'
678px
'
,
boxShadow
:
`0px 20px 50px var(--shadow), 0px 10px 50px rgba(70, 115, 250, 0.2)`
,
'
@media
'
:
{
'
(max-width: 1024px)
'
:
{
maxHeight
:
'
64vh
'
,
maxWidth
:
'
64vh
'
,
},
'
(max-width: 640px)
'
:
{
maxHeight
:
'
56vh
'
,
maxWidth
:
'
56vh
'
,
},
},
},
])
export
const
container
=
style
([
center
,
{
minHeight
:
'
calc(100vh - 97px)
'
,
},
])
export
const
marketplace
=
sprinkles
({
borderRadius
:
'
4
'
})
export
const
creator
=
style
({
'
@media
'
:
{
'
(max-width: 640px)
'
:
{
display
:
'
none
'
,
},
},
})
export
const
columns
=
style
([
sprinkles
({
display
:
'
flex
'
,
flexDirection
:
'
row
'
,
justifyContent
:
'
center
'
,
width
:
'
full
'
,
paddingLeft
:
{
sm
:
'
16
'
,
lg
:
'
24
'
,
xl
:
'
52
'
},
paddingRight
:
{
sm
:
'
16
'
,
lg
:
'
24
'
,
xl
:
'
52
'
},
paddingBottom
:
{
sm
:
'
16
'
,
lg
:
'
24
'
,
xl
:
'
52
'
},
paddingTop
:
'
16
'
,
gap
:
{
sm
:
'
32
'
,
lg
:
'
28
'
,
xl
:
'
52
'
},
}),
{
boxSizing
:
'
border-box
'
,
'
@media
'
:
{
'
(max-width: 1024px)
'
:
{
flexDirection
:
'
column
'
,
alignItems
:
'
center
'
,
},
},
},
])
export
const
column
=
style
({
maxWidth
:
'
50%
'
,
width
:
'
50%
'
,
alignSelf
:
'
center
'
,
'
@media
'
:
{
'
(max-width: 1024px)
'
:
{
maxWidth
:
'
calc(88%)
'
,
width
:
'
calc(88%)
'
,
},
},
})
export
const
columnRight
=
style
({
maxHeight
:
'
calc(100vh - 165px)
'
,
overflow
:
'
scroll
'
,
'
@media
'
:
{
'
(max-width: 1024px)
'
:
{
maxHeight
:
'
100%
'
,
},
},
selectors
:
{
'
&::-webkit-scrollbar
'
:
{
display
:
'
none
'
,
},
},
scrollbarWidth
:
'
none
'
,
})
export
const
audioControls
=
style
({
position
:
'
absolute
'
,
left
:
'
0
'
,
right
:
'
0
'
,
textAlign
:
'
center
'
,
marginRight
:
'
auto
'
,
marginLeft
:
'
auto
'
,
bottom
:
'
calc(10%)
'
,
})
src/state/routing/types.ts
View file @
a49ff491
...
...
@@ -13,7 +13,7 @@ export enum TradeState {
// from https://github.com/Uniswap/routing-api/blob/main/lib/handlers/schema.ts
export
type
TokenInRoute
=
Pick
<
Token
,
'
address
'
|
'
chainId
'
|
'
symbol
'
|
'
decimals
'
>
type
TokenInRoute
=
Pick
<
Token
,
'
address
'
|
'
chainId
'
|
'
symbol
'
|
'
decimals
'
>
export
type
V3PoolInRoute
=
{
type
:
'
v3-pool
'
...
...
@@ -30,7 +30,7 @@ export type V3PoolInRoute = {
address
?:
string
}
export
type
V2Reserve
=
{
type
V2Reserve
=
{
token
:
TokenInRoute
quotient
:
string
}
...
...
src/state/user/reducer.ts
View file @
a49ff491
...
...
@@ -134,14 +134,6 @@ const userSlice = createSlice({
state
.
tokens
[
serializedToken
.
chainId
][
serializedToken
.
address
]
=
serializedToken
state
.
timestamp
=
currentTimestamp
()
},
removeSerializedToken
(
state
,
{
payload
:
{
address
,
chainId
}
})
{
if
(
!
state
.
tokens
)
{
state
.
tokens
=
{}
}
state
.
tokens
[
chainId
]
=
state
.
tokens
[
chainId
]
||
{}
delete
state
.
tokens
[
chainId
][
address
]
state
.
timestamp
=
currentTimestamp
()
},
addSerializedPair
(
state
,
{
payload
:
{
serializedPair
}
})
{
if
(
serializedPair
.
token0
.
chainId
===
serializedPair
.
token1
.
chainId
&&
...
...
@@ -153,14 +145,6 @@ const userSlice = createSlice({
}
state
.
timestamp
=
currentTimestamp
()
},
removeSerializedPair
(
state
,
{
payload
:
{
chainId
,
tokenAAddress
,
tokenBAddress
}
})
{
if
(
state
.
pairs
[
chainId
])
{
// just delete both keys if either exists
delete
state
.
pairs
[
chainId
][
pairKey
(
tokenAAddress
,
tokenBAddress
)]
delete
state
.
pairs
[
chainId
][
pairKey
(
tokenBAddress
,
tokenAAddress
)]
}
state
.
timestamp
=
currentTimestamp
()
},
},
extraReducers
:
(
builder
)
=>
{
builder
.
addCase
(
updateVersion
,
(
state
)
=>
{
...
...
@@ -203,8 +187,6 @@ export const {
updateSelectedWallet
,
addSerializedPair
,
addSerializedToken
,
removeSerializedPair
,
removeSerializedToken
,
updateHideClosedPositions
,
updateMatchesDarkMode
,
updateShowSurveyPopup
,
...
...
src/types/tuple.ts
View file @
a49ff491
// From https://stackoverflow.com/a/67605309/1345206
// Used for slicing tuples (e.g. picking some subset of a param type)
export
type
TupleSplit
<
T
,
N
extends
number
,
O
extends
readonly
any
[]
=
readonly
[]
>
=
O
[
'
length
'
]
extends
N
type
TupleSplit
<
T
,
N
extends
number
,
O
extends
readonly
any
[]
=
readonly
[]
>
=
O
[
'
length
'
]
extends
N
?
[
O
,
T
]
:
T
extends
readonly
[
infer
F
,
...
infer
R
]
?
TupleSplit
<
readonly
[...
R
],
N
,
readonly
[...
O
,
F
]
>
...
...
src/utils/prices.ts
View file @
a49ff491
...
...
@@ -22,7 +22,7 @@ export function computeRealizedPriceImpact(trade: Trade<Currency, Currency, Trad
}
// computes realized lp fee as a percent
export
function
computeRealizedLPFeePercent
(
trade
:
Trade
<
Currency
,
Currency
,
TradeType
>
):
Percent
{
function
computeRealizedLPFeePercent
(
trade
:
Trade
<
Currency
,
Currency
,
TradeType
>
):
Percent
{
let
percent
:
Percent
// Since routes are either all v2 or all v3 right now, calculate separately
...
...
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