* fix: rm infura urls from lib
* fix: use passed providers for client SOR
* fix: clean up supported chain ids
* nit: rename params with specificity
* fix: use public rpc urls for l2
* fix: special-case rpc urls
* fix: avoid json named imports
This is required by webpack 5, and is done to keep the widgets library compatible.
See https://webpack.js.org/migrate/5/#using-named-exports-from-json-modules
Note that this must be done upstream as well, in @uniswap/v3-sdk and @uniswap/router-sdk.
* chore: bump v3-sdk to avoid json named imports
* create use best trade hook for widgets
* update comment in hook file
* refactor loading state conditional
* update logic in use best trade
* clean code in best trade hook
* start SOR by creating custom widget hook
* update best trade hook to use SOR in widget
* update organization for client side SOR logic
* fix auto router chain id import
* remove dependency on react GA for widget
* update dependencies for SOr
* remove new useBestTrade.ts
* update loading logic for fetching hook
* update dependencies with import from ethersproject
* update import version
* add try catch on SOR usage
* code cleanup, nit fixes
* format usd prices, add loading states
* remove tildes, collapse details by default
* update swap deadline to use seconds
* update syntax for loading states
* update swap hooks to add swap txn confirmations
* fix: remove uneeded comments
* update with latest
* update utils to separate swap callback hooks
* create generic swap callabck to be used by both app and widget
* update app swap callback to use logic from lib
* update big number import
* add swap txn to state on submit
* remove redundant fields in txn interfaces
* consolidate trade type logic
* update swap hooks to add swap txn confirmations
* fix: remove uneeded comments
* update with latest
* update utils to separate swap callback hooks
* create generic swap callabck to be used by both app and widget
* update app swap callback to use logic from lib
* update big number import
* feat: use default input/output on chain switch
* feat(widgets): ErrorGenerator -> PropValidator
* default prop validation
* useDefaults hook
* pr feedback
* fix cosmos
* drop token map changes
* add default inputs to cosmos fixture
* set up different validation layers for widget and swap
* split widget/swap prop types
* cleanup
* pr feedback
* clear defaults when they're no longer valid on the current chain
* remove state checks on validators
* stop using address in cosmos fixture
* pr feedback
* useMemo on useSwapDefaults args
* tell the user what they gave to error'd props
Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
* feat: track approval txs
* refactor: update transactions
* chore: add ms to deps
* test: rm stale test
* fix: comment usage of trade for optimized trade