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
7fb7517a
Unverified
Commit
7fb7517a
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 more unused exports (#5529)
* chore: remove more unused exports * fix * undo top tokens change
parent
1a6fe3c1
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
16 additions
and
176 deletions
+16
-176
index.ts
src/components/analytics/index.ts
+1
-1
chainInfo.ts
src/constants/chainInfo.ts
+3
-3
tokens.ts
src/constants/tokens.ts
+1
-23
index.tsx
src/featureFlags/index.tsx
+1
-1
RelayEnvironment.ts
src/graphql/data/RelayEnvironment.ts
+1
-1
Token.ts
src/graphql/data/Token.ts
+1
-1
util.ts
src/graphql/data/util.ts
+1
-1
useAssetLogoSource.ts
src/hooks/useAssetLogoSource.ts
+1
-1
useAutoSlippageTolerance.ts
src/hooks/useAutoSlippageTolerance.ts
+2
-2
useMultiNetworkAddressBalances.ts
src/hooks/useMultiNetworkAddressBalances.ts
+0
-123
useSwapApproval.ts
src/lib/hooks/swap/useSwapApproval.ts
+0
-2
useCurrency.ts
src/lib/hooks/useCurrency.ts
+1
-1
index.tsx
src/pages/Tokens/index.tsx
+1
-1
document.ts
src/serviceWorker/document.ts
+1
-1
hooks.tsx
src/state/user/hooks.tsx
+0
-13
styles.ts
src/theme/styles.ts
+1
-1
No files found.
src/components/analytics/index.ts
View file @
7fb7517a
...
@@ -7,7 +7,7 @@ import { getCLS, getFCP, getFID, getLCP, Metric } from 'web-vitals'
...
@@ -7,7 +7,7 @@ import { getCLS, getFCP, getFID, getLCP, Metric } from 'web-vitals'
import
GoogleAnalyticsProvider
from
'
./GoogleAnalyticsProvider
'
import
GoogleAnalyticsProvider
from
'
./GoogleAnalyticsProvider
'
export
const
GOOGLE_ANALYTICS_CLIENT_ID_STORAGE_KEY
=
'
ga_client_id
'
const
GOOGLE_ANALYTICS_CLIENT_ID_STORAGE_KEY
=
'
ga_client_id
'
const
GOOGLE_ANALYTICS_ID
:
string
|
undefined
=
process
.
env
.
REACT_APP_GOOGLE_ANALYTICS_ID
const
GOOGLE_ANALYTICS_ID
:
string
|
undefined
=
process
.
env
.
REACT_APP_GOOGLE_ANALYTICS_ID
const
storedClientId
=
window
.
localStorage
.
getItem
(
GOOGLE_ANALYTICS_CLIENT_ID_STORAGE_KEY
)
const
storedClientId
=
window
.
localStorage
.
getItem
(
GOOGLE_ANALYTICS_CLIENT_ID_STORAGE_KEY
)
...
...
src/constants/chainInfo.ts
View file @
7fb7517a
...
@@ -36,7 +36,7 @@ interface BaseChainInfo {
...
@@ -36,7 +36,7 @@ interface BaseChainInfo {
readonly
backgroundColor
?:
string
readonly
backgroundColor
?:
string
}
}
export
interface
L1ChainInfo
extends
BaseChainInfo
{
interface
L1ChainInfo
extends
BaseChainInfo
{
readonly
networkType
:
NetworkType
.
L1
readonly
networkType
:
NetworkType
.
L1
readonly
defaultListUrl
?:
string
readonly
defaultListUrl
?:
string
}
}
...
@@ -48,7 +48,7 @@ export interface L2ChainInfo extends BaseChainInfo {
...
@@ -48,7 +48,7 @@ export interface L2ChainInfo extends BaseChainInfo {
readonly
defaultListUrl
:
string
readonly
defaultListUrl
:
string
}
}
export
type
ChainInfoMap
=
{
readonly
[
chainId
:
number
]:
L1ChainInfo
|
L2ChainInfo
}
&
{
type
ChainInfoMap
=
{
readonly
[
chainId
:
number
]:
L1ChainInfo
|
L2ChainInfo
}
&
{
readonly
[
chainId
in
SupportedL2ChainId
]:
L2ChainInfo
readonly
[
chainId
in
SupportedL2ChainId
]:
L2ChainInfo
}
&
{
readonly
[
chainId
in
SupportedL1ChainId
]:
L1ChainInfo
}
}
&
{
readonly
[
chainId
in
SupportedL1ChainId
]:
L1ChainInfo
}
...
@@ -240,7 +240,7 @@ export function getChainInfo(chainId: any): any {
...
@@ -240,7 +240,7 @@ export function getChainInfo(chainId: any): any {
return
undefined
return
undefined
}
}
export
const
MAINNET_INFO
=
CHAIN_INFO
[
SupportedChainId
.
MAINNET
]
const
MAINNET_INFO
=
CHAIN_INFO
[
SupportedChainId
.
MAINNET
]
export
function
getChainInfoOrDefault
(
chainId
:
number
|
undefined
)
{
export
function
getChainInfoOrDefault
(
chainId
:
number
|
undefined
)
{
return
getChainInfo
(
chainId
)
??
MAINNET_INFO
return
getChainInfo
(
chainId
)
??
MAINNET_INFO
}
}
src/constants/tokens.ts
View file @
7fb7517a
...
@@ -89,13 +89,6 @@ export const PORTAL_USDC_CELO = new Token(
...
@@ -89,13 +89,6 @@ export const PORTAL_USDC_CELO = new Token(
'
USDCet
'
,
'
USDCet
'
,
'
USDC (Portal from Ethereum)
'
'
USDC (Portal from Ethereum)
'
)
)
const
USDC_CELO_ALFAJORES
=
new
Token
(
SupportedChainId
.
CELO_ALFAJORES
,
'
0x41F4a5d2632b019Ae6CE9625bE3c9CaC143AcC7D
'
,
6
,
'
USDC
'
,
'
USD//C
'
)
export
const
AMPL
=
new
Token
(
export
const
AMPL
=
new
Token
(
SupportedChainId
.
MAINNET
,
SupportedChainId
.
MAINNET
,
'
0xD46bA6D942050d489DBd938a2C909A5d5039A161
'
,
'
0xD46bA6D942050d489DBd938a2C909A5d5039A161
'
,
...
@@ -124,21 +117,6 @@ export const DAI_OPTIMISM = new Token(
...
@@ -124,21 +117,6 @@ export const DAI_OPTIMISM = new Token(
'
DAI
'
,
'
DAI
'
,
'
Dai stable coin
'
'
Dai stable coin
'
)
)
export
const
USDC
:
{
[
chainId
in
SupportedChainId
]:
Token
}
=
{
[
SupportedChainId
.
MAINNET
]:
USDC_MAINNET
,
[
SupportedChainId
.
ARBITRUM_ONE
]:
USDC_ARBITRUM
,
[
SupportedChainId
.
OPTIMISM
]:
USDC_OPTIMISM
,
[
SupportedChainId
.
ARBITRUM_RINKEBY
]:
USDC_ARBITRUM_RINKEBY
,
[
SupportedChainId
.
OPTIMISM_GOERLI
]:
USDC_OPTIMISM_GOERLI
,
[
SupportedChainId
.
POLYGON
]:
USDC_POLYGON
,
[
SupportedChainId
.
POLYGON_MUMBAI
]:
USDC_POLYGON_MUMBAI
,
[
SupportedChainId
.
CELO
]:
PORTAL_USDC_CELO
,
[
SupportedChainId
.
CELO_ALFAJORES
]:
USDC_CELO_ALFAJORES
,
[
SupportedChainId
.
GOERLI
]:
USDC_GOERLI
,
[
SupportedChainId
.
RINKEBY
]:
USDC_RINKEBY
,
[
SupportedChainId
.
KOVAN
]:
USDC_KOVAN
,
[
SupportedChainId
.
ROPSTEN
]:
USDC_ROPSTEN
,
}
export
const
DAI_POLYGON
=
new
Token
(
export
const
DAI_POLYGON
=
new
Token
(
SupportedChainId
.
POLYGON
,
SupportedChainId
.
POLYGON
,
'
0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063
'
,
'
0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063
'
,
...
@@ -436,7 +414,7 @@ class MaticNativeCurrency extends NativeCurrency {
...
@@ -436,7 +414,7 @@ class MaticNativeCurrency extends NativeCurrency {
}
}
}
}
export
class
ExtendedEther
extends
Ether
{
class
ExtendedEther
extends
Ether
{
public
get
wrapped
():
Token
{
public
get
wrapped
():
Token
{
const
wrapped
=
WRAPPED_NATIVE_CURRENCY
[
this
.
chainId
]
const
wrapped
=
WRAPPED_NATIVE_CURRENCY
[
this
.
chainId
]
if
(
wrapped
)
return
wrapped
if
(
wrapped
)
return
wrapped
...
...
src/featureFlags/index.tsx
View file @
7fb7517a
...
@@ -9,7 +9,7 @@ interface FeatureFlagsContextType {
...
@@ -9,7 +9,7 @@ interface FeatureFlagsContextType {
const
FeatureFlagContext
=
createContext
<
FeatureFlagsContextType
>
({
isLoaded
:
false
,
flags
:
{}
})
const
FeatureFlagContext
=
createContext
<
FeatureFlagsContextType
>
({
isLoaded
:
false
,
flags
:
{}
})
export
function
useFeatureFlagsContext
():
FeatureFlagsContextType
{
function
useFeatureFlagsContext
():
FeatureFlagsContextType
{
const
context
=
useContext
(
FeatureFlagContext
)
const
context
=
useContext
(
FeatureFlagContext
)
if
(
!
context
)
{
if
(
!
context
)
{
throw
Error
(
'
Feature flag hooks can only be used by children of FeatureFlagProvider.
'
)
throw
Error
(
'
Feature flag hooks can only be used by children of FeatureFlagProvider.
'
)
...
...
src/graphql/data/RelayEnvironment.ts
View file @
7fb7517a
...
@@ -50,7 +50,7 @@ const network = new RelayNetworkLayer(
...
@@ -50,7 +50,7 @@ const network = new RelayNetworkLayer(
{
noThrow
:
true
}
{
noThrow
:
true
}
)
)
export
const
CachingEnvironment
=
new
Environment
({
const
CachingEnvironment
=
new
Environment
({
network
,
network
,
store
:
new
Store
(
new
RecordSource
(),
{
gcReleaseBufferSize
,
queryCacheExpirationTime
}),
store
:
new
Store
(
new
RecordSource
(),
{
gcReleaseBufferSize
,
queryCacheExpirationTime
}),
})
})
...
...
src/graphql/data/Token.ts
View file @
7fb7517a
...
@@ -55,7 +55,7 @@ export const tokenQuery = graphql`
...
@@ -55,7 +55,7 @@ export const tokenQuery = graphql`
}
}
}
}
`
`
export
type
{
Chain
,
ContractInput
,
TokenQuery
}
from
'
./__generated__/TokenQuery.graphql
'
export
type
{
Chain
,
TokenQuery
}
from
'
./__generated__/TokenQuery.graphql
'
export
type
TokenQueryData
=
NonNullable
<
TokenQuery$data
[
'
tokens
'
]
>
[
number
]
export
type
TokenQueryData
=
NonNullable
<
TokenQuery$data
[
'
tokens
'
]
>
[
number
]
...
...
src/graphql/data/util.ts
View file @
7fb7517a
...
@@ -52,7 +52,7 @@ export function chainIdToBackendName(chainId: number | undefined) {
...
@@ -52,7 +52,7 @@ export function chainIdToBackendName(chainId: number | undefined) {
:
CHAIN_ID_TO_BACKEND_NAME
[
SupportedChainId
.
MAINNET
]
:
CHAIN_ID_TO_BACKEND_NAME
[
SupportedChainId
.
MAINNET
]
}
}
export
const
URL_CHAIN_PARAM_TO_BACKEND
:
{
[
key
:
string
]:
Chain
}
=
{
const
URL_CHAIN_PARAM_TO_BACKEND
:
{
[
key
:
string
]:
Chain
}
=
{
ethereum
:
'
ETHEREUM
'
,
ethereum
:
'
ETHEREUM
'
,
polygon
:
'
POLYGON
'
,
polygon
:
'
POLYGON
'
,
celo
:
'
CELO
'
,
celo
:
'
CELO
'
,
...
...
src/hooks/useAssetLogoSource.ts
View file @
7fb7517a
...
@@ -4,7 +4,7 @@ import uriToHttp from 'lib/utils/uriToHttp'
...
@@ -4,7 +4,7 @@ import uriToHttp from 'lib/utils/uriToHttp'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
isAddress
}
from
'
utils
'
import
{
isAddress
}
from
'
utils
'
export
const
BAD_SRCS
:
{
[
tokenAddress
:
string
]:
true
}
=
{}
const
BAD_SRCS
:
{
[
tokenAddress
:
string
]:
true
}
=
{}
// Converts uri's into fetchable urls
// Converts uri's into fetchable urls
function
parseLogoSources
(
uris
:
string
[])
{
function
parseLogoSources
(
uris
:
string
[])
{
...
...
src/hooks/useAutoSlippageTolerance.ts
View file @
7fb7517a
...
@@ -13,9 +13,9 @@ import { InterfaceTrade } from 'state/routing/types'
...
@@ -13,9 +13,9 @@ import { InterfaceTrade } from 'state/routing/types'
import
useGasPrice
from
'
./useGasPrice
'
import
useGasPrice
from
'
./useGasPrice
'
import
useStablecoinPrice
,
{
useStablecoinValue
}
from
'
./useStablecoinPrice
'
import
useStablecoinPrice
,
{
useStablecoinValue
}
from
'
./useStablecoinPrice
'
export
const
V3_SWAP_DEFAULT_SLIPPAGE
=
new
Percent
(
50
,
10
_000
)
// .50%
const
V3_SWAP_DEFAULT_SLIPPAGE
=
new
Percent
(
50
,
10
_000
)
// .50%
const
ONE_TENTHS_PERCENT
=
new
Percent
(
10
,
10
_000
)
// .10%
const
ONE_TENTHS_PERCENT
=
new
Percent
(
10
,
10
_000
)
// .10%
export
const
DEFAULT_AUTO_SLIPPAGE
=
ONE_TENTHS_PERCENT
const
DEFAULT_AUTO_SLIPPAGE
=
ONE_TENTHS_PERCENT
const
GAS_ESTIMATE_BUFFER
=
new
Percent
(
10
,
100
)
// 10%
const
GAS_ESTIMATE_BUFFER
=
new
Percent
(
10
,
100
)
// 10%
// Base costs regardless of how many hops in the route
// Base costs regardless of how many hops in the route
...
...
src/hooks/useMultiNetworkAddressBalances.ts
deleted
100644 → 0
View file @
1a6fe3c1
import
{
Currency
,
CurrencyAmount
,
NativeCurrency
,
Token
}
from
'
@uniswap/sdk-core
'
import
{
useWeb3React
}
from
'
@web3-react/core
'
import
{
Weth
}
from
'
abis/types
'
import
WETH_ABI
from
'
abis/weth.json
'
import
{
ALL_SUPPORTED_CHAIN_IDS
,
isSupportedChain
,
SupportedChainId
,
TESTNET_CHAIN_IDS
}
from
'
constants/chains
'
import
{
RPC_PROVIDERS
}
from
'
constants/providers
'
import
{
NATIVE_CHAIN_ID
,
nativeOnChain
,
WRAPPED_NATIVE_CURRENCY
}
from
'
constants/tokens
'
import
{
BaseVariant
,
FeatureFlag
,
useBaseFlag
}
from
'
featureFlags
'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
getContract
}
from
'
utils
'
interface
useMultiNetworkAddressBalancesArgs
{
ownerAddress
:
string
|
undefined
tokenAddress
:
'
NATIVE
'
|
string
|
undefined
}
type
AddressNetworkBalanceData
=
Partial
<
Record
<
SupportedChainId
,
Record
<
string
|
'
NATIVE
'
,
CurrencyAmount
<
Token
>
|
CurrencyAmount
<
NativeCurrency
>
|
undefined
>
>
>
interface
handleBalanceArg
{
amount
:
CurrencyAmount
<
Currency
>
chainId
:
SupportedChainId
tokenAddress
:
string
|
'
NATIVE
'
}
const
testnetSet
=
new
Set
(
TESTNET_CHAIN_IDS
)
as
Set
<
SupportedChainId
>
export
function
useMultiNetworkAddressBalances
({
ownerAddress
,
tokenAddress
}:
useMultiNetworkAddressBalancesArgs
)
{
const
[
data
,
setData
]
=
useState
<
AddressNetworkBalanceData
>
({})
const
[
error
]
=
useState
<
string
|
null
>
(
null
)
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
{
chainId
:
connectedChainId
}
=
useWeb3React
()
const
feature_flag_multi_network_balances
=
useBaseFlag
(
FeatureFlag
.
multiNetworkBalances
)
const
handleBalance
=
useCallback
(({
amount
,
chainId
,
tokenAddress
}:
handleBalanceArg
)
=>
{
if
(
!
amount
.
greaterThan
(
0
)
||
!
tokenAddress
)
{
return
}
setData
((
data
)
=>
({
...
data
,
[
chainId
]:
{
...(
data
[
chainId
]
??
{}),
[
tokenAddress
]:
amount
,
},
}))
},
[])
useEffect
(()
=>
{
if
(
!
ownerAddress
||
!
tokenAddress
)
{
return
}
const
isConnecteToTestnet
=
connectedChainId
?
TESTNET_CHAIN_IDS
.
includes
(
connectedChainId
)
:
false
setLoading
(
true
)
const
isNative
=
tokenAddress
===
NATIVE_CHAIN_ID
const
promises
:
Promise
<
any
>
[]
=
[]
const
isWrappedNative
=
ALL_SUPPORTED_CHAIN_IDS
.
some
(
(
chainId
)
=>
WRAPPED_NATIVE_CURRENCY
[
chainId
]?.
address
.
toLowerCase
()
===
tokenAddress
.
toLowerCase
()
)
const
chainsToCheck
:
SupportedChainId
[]
=
feature_flag_multi_network_balances
===
BaseVariant
.
Enabled
?
ALL_SUPPORTED_CHAIN_IDS
:
isSupportedChain
(
connectedChainId
)
?
[
SupportedChainId
.
MAINNET
,
connectedChainId
]
:
[
SupportedChainId
.
MAINNET
]
chainsToCheck
.
forEach
((
chainId
)
=>
{
const
isTestnet
=
testnetSet
.
has
(
chainId
)
if
((
isConnecteToTestnet
&&
isTestnet
)
||
!
isTestnet
)
{
const
provider
=
RPC_PROVIDERS
[
chainId
]
if
(
isWrappedNative
||
isNative
)
{
const
wrappedNative
=
WRAPPED_NATIVE_CURRENCY
[
chainId
]
if
(
wrappedNative
)
{
promises
.
push
(
new
Promise
(
async
(
resolve
)
=>
{
try
{
const
wrappedNativeContract
=
getContract
(
wrappedNative
.
address
,
WETH_ABI
,
provider
)
as
Weth
const
balance
=
await
wrappedNativeContract
.
balanceOf
(
ownerAddress
,
{
blockTag
:
'
latest
'
})
const
amount
=
CurrencyAmount
.
fromRawAmount
(
wrappedNative
,
balance
.
toString
())
resolve
(
handleBalance
({
amount
,
chainId
,
tokenAddress
:
wrappedNative
.
address
.
toLowerCase
()
}))
}
catch
(
e
)
{}
})
)
}
promises
.
push
(
new
Promise
(
async
(
resolve
)
=>
{
try
{
const
balance
=
await
provider
.
getBalance
(
ownerAddress
,
'
latest
'
)
const
nativeCurrency
=
nativeOnChain
(
chainId
)
const
amount
=
CurrencyAmount
.
fromRawAmount
(
nativeCurrency
,
balance
.
toString
())
resolve
(
handleBalance
({
amount
,
chainId
,
tokenAddress
:
'
NATIVE
'
}))
}
catch
(
e
)
{}
})
)
// todo (jordan): support multi-network ERC20 balances
// } else {
// promises.push(
// new Promise(async (resolve) => {
// try {
// const ERC20Contract = getContract(tokenAddress, ERC20_ABI, provider) as Erc20
// const balance = await ERC20Contract.balanceOf(ownerAddress, { blockTag: 'latest' })
// const amount = //
// resolve(handleBalance({ amount, chainId, tokenAddress }))
// } catch (e) {}
// })
// )
}
}
})
Promise
.
all
(
promises
)
.
catch
(()
=>
({}))
.
finally
(()
=>
setLoading
(
false
))
},
[
connectedChainId
,
feature_flag_multi_network_balances
,
handleBalance
,
ownerAddress
,
tokenAddress
])
return
{
data
,
error
,
loading
}
}
src/lib/hooks/swap/useSwapApproval.ts
View file @
7fb7517a
...
@@ -6,8 +6,6 @@ import { useMemo } from 'react'
...
@@ -6,8 +6,6 @@ import { useMemo } from 'react'
import
{
useApproval
}
from
'
../useApproval
'
import
{
useApproval
}
from
'
../useApproval
'
export
{
ApprovalState
}
from
'
../useApproval
'
// wraps useApproveCallback in the context of a swap
// wraps useApproveCallback in the context of a swap
export
default
function
useSwapApproval
(
export
default
function
useSwapApproval
(
trade
:
Trade
<
Currency
,
Currency
,
TradeType
>
|
undefined
,
trade
:
Trade
<
Currency
,
Currency
,
TradeType
>
|
undefined
,
...
...
src/lib/hooks/useCurrency.ts
View file @
7fb7517a
...
@@ -26,7 +26,7 @@ function parseStringOrBytes32(str: string | undefined, bytes32: string | undefin
...
@@ -26,7 +26,7 @@ function parseStringOrBytes32(str: string | undefined, bytes32: string | undefin
}
}
export
const
UNKNOWN_TOKEN_SYMBOL
=
'
UNKNOWN
'
export
const
UNKNOWN_TOKEN_SYMBOL
=
'
UNKNOWN
'
export
const
UNKNOWN_TOKEN_NAME
=
'
Unknown Token
'
const
UNKNOWN_TOKEN_NAME
=
'
Unknown Token
'
/**
/**
* Returns a Token from the tokenAddress.
* Returns a Token from the tokenAddress.
...
...
src/pages/Tokens/index.tsx
View file @
7fb7517a
...
@@ -30,7 +30,7 @@ const ExploreContainer = styled.div`
...
@@ -30,7 +30,7 @@ const ExploreContainer = styled.div`
padding-top: 20px;
padding-top: 20px;
}
}
`
`
export
const
TitleContainer
=
styled
.
div
`
const
TitleContainer
=
styled
.
div
`
margin-bottom: 32px;
margin-bottom: 32px;
max-width:
${
MAX_WIDTH_MEDIA_BREAKPOINT
}
;
max-width:
${
MAX_WIDTH_MEDIA_BREAKPOINT
}
;
margin-left: auto;
margin-left: auto;
...
...
src/serviceWorker/document.ts
View file @
7fb7517a
...
@@ -5,7 +5,7 @@ import { Route } from 'workbox-routing'
...
@@ -5,7 +5,7 @@ import { Route } from 'workbox-routing'
import
{
isDevelopment
}
from
'
./utils
'
import
{
isDevelopment
}
from
'
./utils
'
const
fileExtensionRegexp
=
new
RegExp
(
'
/[^/?]+
\\
.[^/]+$
'
)
const
fileExtensionRegexp
=
new
RegExp
(
'
/[^/?]+
\\
.[^/]+$
'
)
export
const
DOCUMENT
=
process
.
env
.
PUBLIC_URL
+
'
/index.html
'
const
DOCUMENT
=
process
.
env
.
PUBLIC_URL
+
'
/index.html
'
/**
/**
* Matches with App Shell-style routing, so that navigation requests are fulfilled with an index.html shell.
* Matches with App Shell-style routing, so that navigation requests are fulfilled with an index.html shell.
...
...
src/state/user/hooks.tsx
View file @
7fb7517a
...
@@ -20,7 +20,6 @@ import {
...
@@ -20,7 +20,6 @@ import {
updateHideClosedPositions
,
updateHideClosedPositions
,
updateHideNFTWelcomeModal
,
updateHideNFTWelcomeModal
,
updateShowNftPromoBanner
,
updateShowNftPromoBanner
,
updateShowSurveyPopup
,
updateUserClientSideRouter
,
updateUserClientSideRouter
,
updateUserDarkMode
,
updateUserDarkMode
,
updateUserDeadline
,
updateUserDeadline
,
...
@@ -106,18 +105,6 @@ export function useExpertModeManager(): [boolean, () => void] {
...
@@ -106,18 +105,6 @@ export function useExpertModeManager(): [boolean, () => void] {
return
[
expertMode
,
toggleSetExpertMode
]
return
[
expertMode
,
toggleSetExpertMode
]
}
}
export
function
useShowSurveyPopup
():
[
boolean
|
undefined
,
(
showPopup
:
boolean
)
=>
void
]
{
const
dispatch
=
useAppDispatch
()
const
showSurveyPopup
=
useAppSelector
((
state
)
=>
state
.
user
.
showSurveyPopup
)
const
toggleShowSurveyPopup
=
useCallback
(
(
showPopup
:
boolean
)
=>
{
dispatch
(
updateShowSurveyPopup
({
showSurveyPopup
:
showPopup
}))
},
[
dispatch
]
)
return
[
showSurveyPopup
,
toggleShowSurveyPopup
]
}
export
function
useHideNFTWelcomeModal
():
[
boolean
|
undefined
,
()
=>
void
]
{
export
function
useHideNFTWelcomeModal
():
[
boolean
|
undefined
,
()
=>
void
]
{
const
dispatch
=
useAppDispatch
()
const
dispatch
=
useAppDispatch
()
const
hideNFTWelcomeModal
=
useAppSelector
((
state
)
=>
state
.
user
.
hideNFTWelcomeModal
)
const
hideNFTWelcomeModal
=
useAppSelector
((
state
)
=>
state
.
user
.
hideNFTWelcomeModal
)
...
...
src/theme/styles.ts
View file @
7fb7517a
...
@@ -30,7 +30,7 @@ const transitions = {
...
@@ -30,7 +30,7 @@ const transitions = {
},
},
}
}
export
const
fadeIn
=
keyframes
`
const
fadeIn
=
keyframes
`
from {
from {
opacity: 0;
opacity: 0;
}
}
...
...
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