* feat(polygon): polygon mainnet and testnet support
WIP! DO NOT USE
* fix unit test
* fix explorer links
* compute usdc prices
* - fix the header currency label
- fix unit tests
* polygon gradient colors
* chore: adding weth to common bases (#3025)
* adding weth to common bases
* adding usdc and dai
* adding usdt and wbtc
* fix a bunch of polish issues
- 3085 detection
- some wrapping stuff
- the network selector dropdown
* fix wrap/unwrap notification text on polygon
* background color per the figma
* subgraph url
* fix the re-render blinking on the network selector
* failed network switch
* clean up duplicate code in the network switching functions
* fix text color in the privacy notice on light mode
* add some routing constants for polygon
* do not show the separator in the trade route if auto router is not supported
* - network switching without a wallet connected
- remove v2 stuff from pool page when n/a
- remove WMATIC from common bases on polygon
* background colors of network alert
* oops fix background on network alert
* clean up optimism labels
* fix alignment of text on downtime warning
* finish the network alert styles
Co-authored-by: Sara Reynolds <30504811+snreynolds@users.noreply.github.com>
* client-side smart order router support
* support auto router on L2s
* add swap router version in approval/swap callback GA events to save $ on approval txs
* add persistent UI view of gas estimate on L1s
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Ian Lapham <ian@uniswap.org>
Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
* 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>
* experimental! point at a kovan arbitrum deployment
* remove the unwrapped token from mint hook
* fix explorer links
* Etherscan -> Explorer
* move chains to constant file
* use NETWORK_URLS instead
* temporary fix to the syncing issue
* fix tests
* fix unknown chain id crash
* use a multicall that returns arbitrum block numbers
* lower polling interval for layer 2
* use a better multicall
* remove unused import
* fixed multicall2
* make some v2 code chain specific
* fix build
* line number changes
* update keys
* fix the locale parsing of full locale string
* extract
* fix lint
* add arbitrum one
* add arbitrum one to supported chains
* add missing arbitrum one label
* refactor: remove storybook
* point to the arbitrum explorer address
* fix arbitrum mainnet links
* fix how weth shows up in the interface
* make the usdc price feature more cross chain compatible
* missing translation
* clean up some governance code so it doesn't crash on unsupported networks
* improve how we check for transaction receipts for sequencer networks
* improve it a bit more
* stablizie fiat value by fixing max hop and increasing USDC out to 100k
* move maxHops and singleHopOnly to parameter of useV2TradeExactOut
* remove single hop param
* 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