* fix: display Uniswap token list in UI
* chore: remove default-token-list build dependency
* fix: use ENS name for Uniswap token list
* fix: change Uniswap token list url
- Replace the local implementation of multicall with the new redux-multicall lib
- Create wrappers for redux-multicall hooks to inject block number and chainId
* fix(lint): clean up the eslint config
* Fix code style issues with ESLint
* fix the linter errors that arose from using the proper config
* clean up the rebass text renames
* fix if statement, use the config
* use the same name prefix for both steps
* `TextPreset` -> `ThemedText`
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
There are two errors when deploying on Windows system:
1. Using single quotes in path argument doesn't seem to be accepted in typechain command
2. `?(v3-core|v3-periphery)` operator doesn't work
Here are fixes/workarounds.
* chore: add support for 0.01% tier
* only show 1bps on mainnet
* rename VERY_LOW to LOWEST
* upgrade to v3-sdk 3.7.0
* add snapshot testing for lowest tier
* fix integration test
* fix integration test
* use ALL_SUPPORTED_CHAIN_IDS over string all
* consider 0.01% tier in pool (#2770)
* merge main and only consider lowest tier for mainnet
* feat(optimism): optimistic kovan local regenesis changes
* use the regenesis version of the sdk
* remove the override no longer necessary
* diff rpc url
* back to kovan url
* lint error
* Optimism mainnet regenesis test (#2695)
* remove the optimism mainnet specific code and point to the mainnet regenesis rpc url
* point at the old mainnet multicall address
* bump the sdk version
* copy the list
* multicall address regenesis change
* revert the gas limit special casing for optimism
* bump the sdk version
* remove a couple other temporary edits
* unused test case
* specific version of v3-sdk
* Update walletlink-connector to 6.2.5 which has a walletlink update to support addEthereumChain+switchEthereumChain requests
* Update walletlink-connector to 6.2.7
* Update walletlink-connector to 6.2.8
Updates node-vibrant to use a webpack-compatible version.
lodash was implicitly installed through node-vibrant (and its lack of tree-shaking); with this fixed, lodash is no longer provided.
* fix(i18n): do not defer render on locale
Do not defer render on locale load. This delays the initial render of the page, effectively delaying to LCP.
Lingui allows the page to render with no text while a locale is loading. A fallback locale is only used when loading a locale fails - not while it is pending.
* perf(i18n): include default language in initial bundle
* add @davatar/react for robust avatar support
* remove @metamask/jazzicon, unused
* move @davatar/react to devDependencies
* pin exact version for @davatar/react
* initial routing api integration
* add routing api slice
* display route in dialog
* addressed pr feedback
* improved routing
* switch to `get`
* first pass at integration new MultiRouteTrade
* initial implementation of RoutingDiagram
* add RoutingDiagram tests
* improve tests in RoutingDiagram
* integrate with v3-sdk 3.3.1
* removed references to MultiRouteTrade
* revert swapcallback
* fix abi compilation error
* added useRoute hook to build a Route from edges and nodes
* added react-hooks-testing-library
* integrated latest changes
* renamed router hook to routerTrade
* improve integration
* fixed routing
* usability
* mock RoutingDiagram children to reduce size
* undo mocked children
* adjust ui
* better support long routes
* use routing api logo and adjust ux
* set default percent to 0
* added intermediary hook to combine local and routing api trades
* added intermediary hook to combine local and routing api trades
* make account optional
* improve ux
* improve router
* fixed duplicate pool bug and inputAmount undefined bug
* extract input/outputAmounts from routes
* add todo
* fixed uninitialized issue and added %
* fixed tests
* fix duplicate pool bug
* added routing api setting
* change router label based on router version
* improve useRoutes and fix duplicate pool bug
* debounce routing api/local routing
* removed single hop setting
* fix bug when moving between v2/v3
* consider isUnitialized non loading
* ui fixes
* reverted change to usedebounce
* use new route schema
* visual updates
* log quoteId for polish session
* fix: persist advanced swap details toggle state
* fix no route found
* poll every 10s
* derive currencies from pool rather than input
* polish query status handling in useRouterTrade
* removed RouterVersion
* update ui
* update ui
* update loading state
* animate auto router
* apply loading treatment to out
* disable routing api on l2 and support auto slippage
* use opacity on the whole element
* show loading card when syncing
* updated gradient
* polished ui
* create routerlabel component
* disable router on all bu mainnet
* polish
* feat: [draft] routing api polish (#2224)
* show loading card when syncing
* updated gradient
* polished ui
* create routerlabel component
* disable router on all bu mainnet
* polish
* polished loading state
* add dashes
* fixed tooltip styles
* fixed merge conflict
* few updates
* polish
* updated yarn.lock
* fixed styles
* updated routing diagram
* Fix code style issues with ESLint
* routing api enabled without localstorage upgrade
* fixed lint error
* Fix code style issues with ESLint
* refined mocks in routing diagram tests
* addressed pr feedback
* polish
* revert sending eth
* improved loading animation
* handle stale routing api
* Fix code style issues with ESLint
* updated yarn.lock
* support native eth
* Compute gas adjusted quote for V2 trade and compare to V3 gas adjusted quote
* Incorporate approval gas cost estimate
* feat: simplify routing api ux (#2258)
* support native eth
* simplified ui
* perf optimization
* implement realized lp fee
* improved route realized lp fee
* fix lp realized fee
* fix auto router gradient
* initial route overlay
* add auto router svg
* adjusted ux to mocks
* fix lp fee
* upddated routing diagram
* optimize tradeBetter hook
* adjust type and name
* add useBetterTrade
* useBetterTrade takes gasEstimateWei
* implement gasEstimateForApproval
* import state from react
* use gas estimate
* improve integration with gas estimate comparison
* remove dependency on account
* fix currency switch bug
* improve syncing state
* add loadingbar
* style tooltip container
* updated tooltip styles
* increase opacity range
* always keep dependent currency input interactable
* show placeholders in tooltips
* Revert v2 gas estimates and approval estimates
* Add debug logs
* refactor
* fix bug
* removed comment
* update engish key
* add try-catch
* addressed pr feedback
* remove loading bar for price impact
* addressed pr feedback and bug bash feedback
* fix: use url to force version
* addressed pr feedback and bug bash feedback
* stop fetching when losing focus
* only show auto router label when activated
* avoid showing syncing status
* move V3TradeSTate to own file
* make useRoutes a function rather than hook
* use logo from active list when possible
* renamed and refactored hook
* renamed and refactored hook
* update status
* polish
* remove unused import
* fixed merge error
* updated combined trade tests
* remove priceimpact while loading
* Design tweaks
* polish latest design
* removed some styles
* log gaevent on tooltip open and clean up origin
* Small tweaks
* addressed pr feedback
* wrap route length in a loading container
* renamed local to clientside
* fix percent and token logo
* addressed pr feedback
* avoid comparing trades when v3 not ready
* some refactor
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Will Pote <will@uniswap.org>
Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
* fix(governance): special case bravo parsing
* fix(governance): explicitly parse U+2018, U+2026
* chore: upgrade ethers to ^5.4.6
Updates parseLog to delay parsing nested properties, so that they will only fail when accessed.
* fix(vote): recover from invalid UTF-8 in proposal descriptions
* fix(vote): special case bravo proposal newlines
* chore: rm dead reference
reconfigure service workers to only cache used assets (excluding .po language files and non-.var.woff2 font files)
* fix: turn service workers back on
* chore: configure service worker caches
* chore: add newline
* Fix code style issues with ESLint
* chore: limit service-worker caching
Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Fixes#2198. Touching en-US.po before extracting messages prevents lingui from adding a creation date, maintaining deterministic builds and IPFS hashes.
* set up snapshot testing
* improvements
* add tests for TextInput as an example
* Fix code style issues with ESLint
* add comment to custom-test-env file
* only set up needed providers
* include style rules in snapshots
* disable redux storage warning
* added setupTests to avoid boilerplate
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
* feat: support connecting to a gnosis safe
* add the manifest.json attributes required by gnosis safe
* remove background fill
* copy
* only try injected provider if not active after trying safe
* initial routing api integration
* add routing api slice
* display route in dialog
* addressed pr feedback
* switch to `get`
* renamed useRouterTradeExactIn to useRouter
* moving few files to later iteration
* removed unnecessary `as`
* switch to polling
* add todo for blocknumber freshness
* remove account-slippage-deadline
* preliminary support
* fix multicall abi
add explorer support
* Fix code style issues with ESLint
* fix gas estimation
* fix todo tests
* fix gas estimation comments
* anonymize links to kovan etherscan and poll more frequently on optimistic kovan
* separate pool creation
* remove supported chain id
* remove the blocktag
* do not use the blocktag on optimism only
* give more gas to tokenURI for optimism
* update sdk
* temp fix to the block tag thing (do not update the block number from the fetch block number)
* remove unused import
* gasRequired -> multi-network
* bump quoter gas limit to 6m on optimism
* move the gas required parameter by chain id one level up
* missed a hook
* retry fetching receipts for optimism as many times as arbitrum
* fix duplicate enum, add optimism as well to retry options config
* fix: state not getting updated after a transaction confirmation
* bump sdk version
* update for mainnet optimism (#1998)
* fix for calculateGasMargin on optimism
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Moody Salem <moody.salem@gmail.com>
* add hooks to fecth ticks data and active liquidity
* cleanup
* add polling interval
* moved ms.macro types to dev deps
* generate graphql schema on build
* added @types/ms.macro
* use clone deep
* build dynamic subgraph url based on chain id
* reset api state (query cache) on chain id change
* removed dependency on rtk-query/graphql
* add error message
* wrap sock around function component to get re-renders
* removed sourcelocale since we are using custom ids
* load locale data dynamically
* undo dev change
* ran yarn i18n:extract
* store locale in redux
* added support for redux
* restored header
* refactor
* addressed pr feedback
* specify type
* added navigator locale fallback to generic dialect
* make locale array const and typed
* addressed pr feedback
* fixed various
* addressed pr feedback
* make supported locales constant uppercase
* add back toUpperCase removed during refactoring
* removed lingui/detect-locale
* run yarn
* replaced i18next with lingui
* integrate lingui in i18n and update dev setup
* updated components to @lingui
* fix compile error after rebase
* detect locale
* add all previous languages to linguirc
* address pr feedback
* remove it for now
* ignore generate *js files, various fixes
* added more translations
* fixed yarn build command
* wrapped more hardcoded english around <Trans>
* finished second round of translations
* added support for pseudo-en locale
* improvements
* moved copy.tsx to different branch
* moved extra files to different branch
* regenerated po
* clean up
* more fixes
* regenerate po
* remove messages.js
* clean up
* addressed pr feedback
* regenerated po
* do not construct tokens for wrapped token info
* some cleanup of the wrapped token info
* back to extends, bump sdk core version via v2/v3 sdk updates
* Revert "back to extends, bump sdk core version via v2/v3 sdk updates"
This reverts commit 92cc5073
* update the sdk version
* fix some more uses of instanceof
* finish the refactor
* mess with the currency list performance
* start replacing with the latest v3/v2 sdks
* raw -> quotient
* more cleanup
* finish the refactor
* clean up currency list refactor
* fix list rendering
* perf(token lists): improve app performance when there are large inactive token lists (#1510)
* improve inactive token lists performance
* cleanup before larger changes to combine inactive lists
* only do the search if the query does not match any active lists, limit the number of results
* more performance improvements
* search inactive lists more aggressively
* Add App-level error boundary, referring users to GitHub issue creation on page crashes. (#1452)
* Class component is used as boundary since catching errors is apparently not yet possible with hooks.
* EventListener in window was removed and replaced by error boundary's error catch, which now fires a GA exception. The fields it passes are slightly different because React uses slightly different error types.
* Pre-filling issues with dynamic data is possible with POST requests to GitHub's API, but the GH web client seems to only support pre-fill based on templates. Therefore users still need to copy error info themselves.
* Prefill GitHub issues with crash data.
* Added package 'react-device-detect' to include device data such as OS, browser etc. in crash report.
* Included error stack in issue body.
* Used <code> html tag for displaying stack to user.
* Slightly reduce vertical padding on code block.
* Add ua-parser-js for parsing user agent.
* Revert react-device-detect to ^1.6.2 (which is used for mobile detection etc. in components)
* Update index.ts
* feature(service worker): add offline support (#1319)
* Revert "feature(service worker): add offline support (#1319)" (#1320)
This reverts commit 34dfb41a1e0a647596c5d37d5e3f7baa6c4005a3.
* Revert "Revert "feature(service worker): add offline support (#1319)" (#1320)" (#1321)
This reverts commit db3328c8d9d7ea7b7cf7e75dc658714798d007a4.
* unregisters all installed service workers (#1322)
* fix: modals stealing focus across frames (#1326)
* improvement(lists): add BA SEC tokens to unsupported list (#1327)
* show hidden search results by default
* update break styles
* optimize filter, use debounce on input
* increase debounce time
* add ba association list
* handle dismiss (#1328)
* split up sdk use between core and v2
* Fix code style issues with ESLint
* remove service worker
Co-authored-by: Moody Salem <moodysalem@users.noreply.github.com>
Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: Hyperion <72735936+moontools-hyperion@users.noreply.github.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
* 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>
* move the gas estimation stuff into its own hook and report errors from the gas estimation
* fix linter errors
* show the swap callback error separately
* rename some variables
* use a manually specified key for gas estimates
* flip price... thought i did this already
* only show swap callback error if approval state is approved
* some clean up to the swap components
* stop proactively looking for gas estimates
* improve some retry stuff, show errors inline
* add another retry test
* latest ethers
* fix integration tests
* simplify modal and fix jitter on open in mobile
* refactor confirmation modal into pieces before creating the error content
* finish refactoring of transaction confirmation modal
* show error state in the transaction confirmation modal
* fix lint errors
* error not always relevant
* fix lint errors, remove action item
* move a lot of code into ConfirmSwapModal.tsx
* show accept changes flow, not styled
* Adjust styles for slippage error states
* Add styles for updated price prompt
* Add input/output highlighting
* lint errors
* fix link to wallets in modal
* use total supply instead of reserves for `noLiquidity` (fixes#701)
* bump the walletconnect version to the fixed alpha
Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>