* refactor: transaction info is translated in the appropriate places
fixes https://github.com/Uniswap/interface/issues/1756
* getting closer
* more work
* finished, finally
* bit more refactoring
* move summary into its own file
* little more cleanup in the transaction summary file
* fix bad copy
* fix the migrate notification
* missing translation
* fix the language for vote and address other pr comments
* fix typo
* - remove old transactions with this update
- change to present tense
- show ens name where appropriate
* add a test that shows we don't clear old ones
* 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: only try SafeApp connection in an iframe
Improves non-iframe pageload by 300ms. Fixes#2338.
The Gnosis check for a SafeApp races a postMessage and a 300ms timeout [1]. The SafeApp embeds the interface in an iframe, so this avoids the check when not in iframes.
[1]: f224869dd5/packages/safe-apps-web3-react/src/connector.ts (L52)
* refactor: IS_IN_IFRAME const
* 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
* polish
move getINfoLinkByChainId to chain constants
pr review - translations
optimism token list, typo, text color for L1 switch
use <Trans /> instead of t
undo unintentional tokenlist order change
use {'Optimism'} instead of {name}
switch deadline implementation
remove unused TYPE import
switch to generalized CHAIN_INFO instead of L2_INFO so we don't have to check in components
add target chain id param to optimism bridge
fix a minor breakpoint issue
reduce sigfigs for header balance
update network card dropdown text for optimism
remove list code
refactor SupportedChainId
* SupportedL1ChainId | SupportedL2ChainId -> SupportedChainId
* first iteration of useTicks and useActiveLiquidity
* feat(pools): add liquidity depth chart (#1835)
* cleanup
* use area chart instead of bar chart
* check for undefined rather than falsy
* feat: range buttons based on fee amount (#1870)
* range buttons based on fee amount
* hardcode percentages as ticks
* increase blocksperfect
* feat: optimize add liquidity charts (#1880)
* ignore syncing state
* remove surrounding ticks
* avoid processing price1 as it is unused
* cleanup
* feat: add zoom buttons to liquidity depth chart (#1882)
* ignore syncing state
* remove surrounding ticks
* avoid processing price1 as it is unused
* cleanup
* first pass at +/- zoom buttons
* remove console.log, cleanup
* use real price for price line
* updated brush handles to latest spec
* added % labels to handles
* round tick to nearest usable tick
* first pass at brushable area chart with d3
* first pass at brushable area chart with d3
* rework
* address PR comments
* add brush handles
* address PR comments
* further improvements
* feat(pools): improve full range support + capital efficiency warning (#1903)
* handle min and max prices in add liquidity
* cleaned up
* use flag to denote full range
* reset inputs on fee select
* fixed merge conflict
* handle full range in positions preview
* fixed invalid range when tokens are reversed
* use formatTickData
* updated layout
* cleaned up layout
* fixed address
* avoid re-rendering deposit amounts
* added zoom behavior and more styling
* renamed chart
* renamed main chart file;
* add brush tooltips
* remove chart title
* added accents to brush handles
* more work
* moved to file
* modularize chart components
* fix maximum depth
* added brush labels
* cleanup
* cleanup
* set up zoom
* added new components
* improved brush and zoom integration
* cleaned up clip path
* fixed clip paths
* integrated with the graph changes
* adjust fee selector
* fix data error
* add bar chart
* polish
* merged
* clean up error
* cleaned up after merge
* visual improvements
* moved +/- buttons to the right/left
* removed margin bottom
* removed unsused
* fix brush labels % change
* use d3.axisBottom
* updated labels
* improve brush range
* fix one brush change only
* adjust zoom and clippath
* use bars
* use area
* adjust axis bottom to mocks;
* improved bars
* show bar colors
* better handle full range
* adjust colors for light mode
* updated to mocks
* adjusted handles for visibility
* switch to area
* add react ga events
* adjusted to mocks
* memo brush domain to avoid re-renders
* fix inputstepcounter color
* adjust handles
* rely on the graph sorting tickidx
* use curvestepafter
* updated polish
* merged main
* add clamping and other fixes
* highlight selected area using a mask
* use price instead of % for labels
* delete unused
* refine ux
* relayout
* improve hooks
* adjust layout for mobile
* fixed card color
* adjust padding
* preent tick overflow
* flip handles sooner
* delete bars.tsx
* 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>
* feat(logs): add an infrastructure for fetching logs in a declarative way
* use the logs hook in the vote page, first pass
* fix comment
* bit of cleanup
* unused imports
* improve loading indicator on vote page
* some testnet behavior improvements
* fix loader state
* loading state nit
* show correct indexes
* remove the unnecessary retry code
* first pass at the slice
* no throws
* loading indicator should go away if not connected
* use the logs slice for the logs hook state
* style changes per cal's request
* 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
fix governor name bug
revert useContract change
add governorIndex to vote page
only fetch latest useLatestProposalCount
fix useDataFromEventLogs
hardcode proposalIndexes for old governors
* 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
* chore: simplify app dispatch and selector types with ts inference
* update SearchModal to use new types inference
* chore: simplify useSelector and useDispatch types using inference
* add a link to switch the locale conditionally
* make it smaller
* add the locale labels
* language labels from the internet
* fix the heart in the claim popup
* undo the conditional change
* remove todo
* updated Chinese locale name to office-365 language ids
* added missing <Trans>
Co-authored-by: Justin Domingue <judo@uniswap.org>
* use argent wallet contract in swap callback
* maybe working swap callback
* chore(v3): trigger a breaking release
BREAKING CHANGE: trigger a major release for the uniswap interface to indicate it now supports swapping and liquidity provision against uniswap protocol v3
* fix the value
* improve the error coverage
* retry more frequently, couple more error nits
* the is argent call was being sketchy
* get it working for add liquidity
* `0x0` for v2 swaps too
* small nits in position page
* fix import
* fix compiler error
* 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
* automatic slippage tolerance start
* get it compiling
* out of range/in range behavior of slippage tolerance in add
* small useDerivedSwapInfo refactor
* improve useSwapSlippageTolerance
* fix unit test
* thread placeholder slippage through
* small improvement to slippage input behavior
* fix the display bug
* fix tx settings modal ux
* don't pass props unnecessarily
* switch back to static swap slippage for now
bump migrate slippage to .75%
* fix font size
* add flag for auto slippage migration
validate version updates even more
Co-authored-by: Noah Zinsmeister <noahwz@gmail.com>
* add a usePermit hook
* semi working
* Fix code style issues with ESLint
* don't override gas, some cleanup in the permit function
* fix permit validity
* some more permit fixes
* nits
* another nit
* use the erc20 permit hook everywhere
* unused exports
* handle missing version
* replace everywhere
* add DAI and todos
* woopsie bug
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
* very rough positions/pools data fetching and position list rendering
* fix formatting
* fix loading
* position page routing, bug on add page
Co-authored-by: ianlapham <ianlapham@gmail.com>
* 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>
* show hidden search results by default
* update break styles
* optimize filter, use debounce on input
* increase debounce time
* add ba association list
* basic support for multiple active lists
* start search across inactive lists
* store card before list update
* basic import flow for inactive tokens
* update supported lists
* update import flow for address pasting
* basic mvp
* hide filter if no results
* update min heights
* update manage view, index tokens on page load
* start routing fix for multi hops
* switch to input amount comparison on exactOut
* start list import view
* updated list UI, token search updates, list import flow, surpress popups and warnings
* add unsupported tokens
* show warning if logged out
* update to opyn list
* show token details on warning;
* make percent logic more clear
* remove uneeded comaprisons
* move logic to functions for testing
* test updates
* update list reducer tests
* remove unused locals
* code cleanup
* add unsupported local list
* add multi hop disable switch
* add GA
* fix bug to return multihop no single
* update swap details
* copy updates
* Visual refinements
* Further tweaks
* copy updates, actual list order
* Move settings button
* Update all trade views with settings cog
* Add better tips, remove darkmode toggle from dropdown
* Clean up routing UI
* UI tweaks
* minor tweaks
* copy updates
* add local default list, use existing function for trade comparison, disable v1 helper, show inactive/active at once
* updated inactive view
* remove slippage fix
* update output amount return
* center button, update search to character threshold
* reset add state on back navigation
* style tweak on add button
* fix bug on search results
Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
* start routing fix for multi hops
* switch to input amount comparison on exactOut
* make percent logic more clear
* remove uneeded comaprisons
* move logic to functions for testing
* add multi hop disable switch
* add GA
* fix bug to return multihop no single
* update swap details
* code clean
* routing only
* 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>
* load tokens from url `useTokenList`
* improve performance of the loading
* move the loading to redux and save loaded lists
* lint error
* move the list fetching code to a separate component
* change how token lists are fetched to use the updater and add unit tests
* fix a crash with currencyEquals
* bump sdk version
* token lists should automatically update for minor/patch changes
* nit
* show popups for list updates
* support pointing at localhost
* spuport ipfs/ipns logos
* use the updater to bump list versions
* save the old/new list in the popup for viewing diffs
* improve the list popup
* fix linter error, make sure visibility checking is working
* show list update notifications
* address a couple metamask warnings, linter error
* fix the custom added/default tokens
* refactor some popup stuff to reuse the fader
* linter error
* Revert: refactor some popup stuff to reuse the fader (a7b0f752)
* style improvements, linter
* add to the readme, drop the token-request template
* back to the beta that works with wallet connect
* get the dependencies to a state that works with wallet connect and passes integration tests
* first pass of sdk 3.0
* second pass using weth
* kill unused pool popup
* get it compiling again
* first pass of sdk 3.0
* switch to currencies
* get it compiling after the big move merge
* restore margin
* clean up add liquidity more
* fix a bunch of bugs
* todo trade on v1
* show eth in currency list
* allow selecting eth in the swap page
* fix unit tests for swap page
* test lint errors
* fix failing integration tests
* fix another couple of failing unit tests
* handle selecting currency b when no currency a
* improve the import pool page
* clean up add liquidity for invalid pairs
* bold
* first pass at swap arguments for v1, some unit tests
* fix some bugs in add liquidity, burn hook
* fix last of ts errors in remove liquidity
* support wrapping/unwrapping weth
* kill a bunch of code including the dummy pairs
* required pair prop in the position card
* tests for the v1 swap arguments
* do not say estimated on the wrap ui
* show ETH instead of WETH in the pool summaries
* small size socks
* fix lint error
* in burn, use currencies from the URL
* fix some integration tests
* both contain weth
* receive eth/weth link
* fix empty row
* show wrapped only if one currency is weth
* currency selects in the remove liquidity page
* quick poc for removing swap page
* accidental import
* error for recipient field
* query parameter working
* undo id change
* tweaks to match mocks better
* tweaks to match mocks better
* some extra integration tests
* clean up nav tabs a bit
* clean up nav tabs a bit
* space swap/pool better
* stop selecting button text when double clicking
* remove unused transfer modal header
* add info to swap confirm modal
* shorten address
* improve summary message, remove unused send callback, fix react ga event
* fix lint errors
* arrow color