2021-06-02 00:20:31 +03:00
|
|
|
import '@reach/dialog/styles.css'
|
2021-10-07 01:09:29 +03:00
|
|
|
import 'inter-ui'
|
2021-09-01 21:17:49 +03:00
|
|
|
import 'polyfills'
|
2021-10-07 01:09:29 +03:00
|
|
|
import 'components/analytics'
|
2021-09-22 02:21:28 +03:00
|
|
|
|
2022-08-04 22:02:52 +03:00
|
|
|
import { FeatureFlagsProvider } from 'featureFlags'
|
2022-08-19 22:31:10 +03:00
|
|
|
import RelayEnvironment from 'graphql/data/RelayEnvironment'
|
2022-04-12 20:10:57 +03:00
|
|
|
import { BlockNumberProvider } from 'lib/hooks/useBlockNumber'
|
2022-01-13 19:54:08 +03:00
|
|
|
import { MulticallUpdater } from 'lib/state/multicall'
|
2021-06-25 17:52:49 +03:00
|
|
|
import { StrictMode } from 'react'
|
2022-07-13 23:56:09 +03:00
|
|
|
import { createRoot } from 'react-dom/client'
|
2022-08-11 02:38:23 +03:00
|
|
|
import { QueryClient, QueryClientProvider } from 'react-query'
|
2020-05-12 01:23:01 +03:00
|
|
|
import { Provider } from 'react-redux'
|
2022-08-19 22:31:10 +03:00
|
|
|
import { RelayEnvironmentProvider } from 'react-relay'
|
2020-09-24 19:18:57 +03:00
|
|
|
import { HashRouter } from 'react-router-dom'
|
2021-09-22 02:21:28 +03:00
|
|
|
|
2022-06-16 21:39:23 +03:00
|
|
|
import Web3Provider from './components/Web3Provider'
|
2021-05-26 23:34:52 +03:00
|
|
|
import { LanguageProvider } from './i18n'
|
2019-04-15 19:56:40 +03:00
|
|
|
import App from './pages/App'
|
2021-02-18 21:10:53 +03:00
|
|
|
import * as serviceWorkerRegistration from './serviceWorkerRegistration'
|
2021-09-22 02:21:28 +03:00
|
|
|
import store from './state'
|
2020-05-13 19:58:20 +03:00
|
|
|
import ApplicationUpdater from './state/application/updater'
|
2020-07-25 18:41:03 +03:00
|
|
|
import ListsUpdater from './state/lists/updater'
|
2021-07-01 22:44:02 +03:00
|
|
|
import LogsUpdater from './state/logs/updater'
|
feat(lists): allow selecting and adding token lists (#1023)
* more list stuff
Use the selected list instead of the default list, but also use the default list
start list selection code
* move token warning to a modal, fix the install issue
* add/remove/enter key
* handle enter on currency select for ETHER
* change slippage tolerance to be a slider
* make ui closer to the mocks
* commit slider changes
* back to tabs
* copy changes
* bump list version
* some styling for the list select
* bump uniswap default list version
* use contract calls to get ens names and addresses
* show list logo
* fix failing integration test
* .eth.link
* list introduction screen
* remove showSendWithSwap
* fix integration and unit tests
* resolve ENS names
* logos from ens
* fix the lint errors
* some refactoring to better support using a the library provider from the user for resolving ENS names
* load list info from the list url for the introduction page
* make it slightly harder to remove a list
* minor clean up, some help text and links
* remove icon from list update popup
* show added/removed tokens
* add GA everywhere, don't debounce contenthash lookups
* show tags
* fix tag key
* tag display, list rendering, needs optimization
* fix list fetching in firefox, style issue in safari
* sort the lists, clean up styling
* use client provider when possible
* show token warning for url loaded tokens
* improve the warning modal
* some refactoring to fix the list fetching on networks other than mainnet
* fix tests
* some minor improvements
* increase timeout to maybe fix integration tests which pass locally
* build for tests using the dev network url
* reset the lists if we deleted the other two copies
* improve how we handle updating the default list of lists
* fix integration test
* Update token list selection styles
* fix external links, reuse the on click outside code, show add errors
* show the list origin instead of the full url
* fix update list link
* show host instead of hostname
do not automatically dismiss major version upgrades for lists
* fix link to tokenlists.org
* add uma
* clean up styling in list rows
* bump token list version
* bump token list version again
* hover symbol to see currency name
* bump version
* add cmc lists, dharma list
Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2020-08-26 16:46:21 +03:00
|
|
|
import TransactionUpdater from './state/transactions/updater'
|
|
|
|
import UserUpdater from './state/user/updater'
|
2021-06-01 05:10:36 +03:00
|
|
|
import ThemeProvider, { ThemedGlobalStyle } from './theme'
|
2019-11-26 01:56:31 +03:00
|
|
|
|
2022-08-11 02:38:23 +03:00
|
|
|
const queryClient = new QueryClient()
|
|
|
|
|
2021-02-01 18:44:47 +03:00
|
|
|
if (!!window.ethereum) {
|
|
|
|
window.ethereum.autoRefreshOnNetworkChange = false
|
2020-07-25 18:41:03 +03:00
|
|
|
}
|
|
|
|
|
2019-05-03 23:37:59 +03:00
|
|
|
function Updaters() {
|
|
|
|
return (
|
|
|
|
<>
|
2020-07-25 18:41:03 +03:00
|
|
|
<ListsUpdater />
|
2020-05-13 19:58:20 +03:00
|
|
|
<UserUpdater />
|
|
|
|
<ApplicationUpdater />
|
|
|
|
<TransactionUpdater />
|
2020-05-29 04:17:45 +03:00
|
|
|
<MulticallUpdater />
|
2021-07-01 22:44:02 +03:00
|
|
|
<LogsUpdater />
|
2019-05-03 23:37:59 +03:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2022-07-13 23:56:09 +03:00
|
|
|
const container = document.getElementById('root') as HTMLElement
|
|
|
|
|
|
|
|
createRoot(container).render(
|
feat(lists): allow selecting and adding token lists (#1023)
* more list stuff
Use the selected list instead of the default list, but also use the default list
start list selection code
* move token warning to a modal, fix the install issue
* add/remove/enter key
* handle enter on currency select for ETHER
* change slippage tolerance to be a slider
* make ui closer to the mocks
* commit slider changes
* back to tabs
* copy changes
* bump list version
* some styling for the list select
* bump uniswap default list version
* use contract calls to get ens names and addresses
* show list logo
* fix failing integration test
* .eth.link
* list introduction screen
* remove showSendWithSwap
* fix integration and unit tests
* resolve ENS names
* logos from ens
* fix the lint errors
* some refactoring to better support using a the library provider from the user for resolving ENS names
* load list info from the list url for the introduction page
* make it slightly harder to remove a list
* minor clean up, some help text and links
* remove icon from list update popup
* show added/removed tokens
* add GA everywhere, don't debounce contenthash lookups
* show tags
* fix tag key
* tag display, list rendering, needs optimization
* fix list fetching in firefox, style issue in safari
* sort the lists, clean up styling
* use client provider when possible
* show token warning for url loaded tokens
* improve the warning modal
* some refactoring to fix the list fetching on networks other than mainnet
* fix tests
* some minor improvements
* increase timeout to maybe fix integration tests which pass locally
* build for tests using the dev network url
* reset the lists if we deleted the other two copies
* improve how we handle updating the default list of lists
* fix integration test
* Update token list selection styles
* fix external links, reuse the on click outside code, show add errors
* show the list origin instead of the full url
* fix update list link
* show host instead of hostname
do not automatically dismiss major version upgrades for lists
* fix link to tokenlists.org
* add uma
* clean up styling in list rows
* bump token list version
* bump token list version again
* hover symbol to see currency name
* bump version
* add cmc lists, dharma list
Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2020-08-26 16:46:21 +03:00
|
|
|
<StrictMode>
|
2021-05-28 19:03:53 +03:00
|
|
|
<Provider store={store}>
|
2022-08-02 19:57:13 +03:00
|
|
|
<FeatureFlagsProvider>
|
2022-08-11 02:38:23 +03:00
|
|
|
<QueryClientProvider client={queryClient}>
|
|
|
|
<HashRouter>
|
|
|
|
<LanguageProvider>
|
|
|
|
<Web3Provider>
|
2022-08-17 03:01:12 +03:00
|
|
|
<RelayEnvironmentProvider environment={RelayEnvironment}>
|
2022-10-19 19:47:38 +03:00
|
|
|
<BlockNumberProvider>
|
|
|
|
<Updaters />
|
|
|
|
<ThemeProvider>
|
|
|
|
<ThemedGlobalStyle />
|
|
|
|
<App />
|
|
|
|
</ThemeProvider>
|
|
|
|
</BlockNumberProvider>
|
2022-08-17 03:01:12 +03:00
|
|
|
</RelayEnvironmentProvider>
|
2022-08-11 02:38:23 +03:00
|
|
|
</Web3Provider>
|
|
|
|
</LanguageProvider>
|
|
|
|
</HashRouter>
|
|
|
|
</QueryClientProvider>
|
2022-08-02 19:57:13 +03:00
|
|
|
</FeatureFlagsProvider>
|
2021-05-28 19:03:53 +03:00
|
|
|
</Provider>
|
2022-07-13 23:56:09 +03:00
|
|
|
</StrictMode>
|
2019-04-16 03:06:39 +03:00
|
|
|
)
|
2021-02-18 21:10:53 +03:00
|
|
|
|
2021-08-31 21:00:19 +03:00
|
|
|
if (process.env.REACT_APP_SERVICE_WORKER !== 'false') {
|
|
|
|
serviceWorkerRegistration.register()
|
|
|
|
}
|