Commit a49ff491 authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

chore: remove some unused exports (#5514)

* remove some unused exports

* undo
parent ca1dc593
......@@ -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,
......
......@@ -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: '',
......
......@@ -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('')
......
......@@ -3,7 +3,7 @@ import { darken } from 'polished'
import { sprinkles } from './sprinkles.css'
export const loadingAnimation = keyframes({
const loadingAnimation = keyframes({
'0%': {
backgroundPosition: '100% 50%',
},
......
......@@ -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]
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%)',
})
......@@ -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
}
......
......@@ -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,
......
// 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]>
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment