Commit Graph

242 Commits

Author SHA1 Message Date
Zach Pomerantz
e81e8a8f71
fix: inadvertent merges/reverts (#2915)
* Revert "Revert "Merge branch 'main' of https://github.com/Uniswap/interface" (#2912)"

This reverts commit 7d343dcfbdf75a2f91d28cefce84e4b1bace7b87.

* Revert "deleted files"

This reverts commit 097b8361d4c09afd3cb681c4622145c555ced884.
2021-12-02 10:35:39 -08:00
Justin Domingue
7d343dcfbd
Revert "Merge branch 'main' of https://github.com/Uniswap/interface" (#2912)
This reverts commit bf7a40be7a0a37b5051b9a877bbea563fba5782d, reversing
changes made to 097b8361d4c09afd3cb681c4622145c555ced884.
2021-12-02 13:12:22 -05:00
dependabot[bot]
82a079935e
chore(deps): bump url-parse from 1.5.1 to 1.5.3 (#2504)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-30 11:40:15 -05:00
dependabot[bot]
876c1539d4
chore(deps): bump ws from 5.2.2 to 5.2.3 (#2759)
Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/5.2.2...5.2.3)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-30 11:38:15 -05:00
Zach Pomerantz
d5c4ee0342
feat: display an ENS avatar (#2806)
* feat: ens avatar resolution

* chore: uninstall @davatar/react

* fix: add avatar alt

* feat: support data uris

* feat: support arweave uris

* feat: support erc721 avatars

* feat: support erc1155 avatars

* fix: jazzicon integration

* fix: clean usage of status icon

* fix: fix jazzicon svg offset

* refactor: share status icon component

* fix: pass memoized args to multicall
2021-11-22 10:55:25 -08:00
Zach Pomerantz
b2697f0077
fix: format date using Date.toLocaleString (#2459)
* fix: format date using Date.toLocaleString

Fixes #2458

* fix: date typings
2021-11-16 16:20:46 -08:00
Justin Domingue
408c907870
feat: add support for 0.01% tier (#2769)
* 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
2021-11-12 09:46:26 -05:00
Moody Salem
ccad45d24e
fix(optimism): Optimism regenesis support (#2703)
* 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
2021-11-11 15:40:12 -05:00
Jordan Frankfurt
659a564db8
no unused imports eslint rule (#2773) 2021-11-11 10:53:14 -05:00
Moody Salem
48cc6811c9
fix: bump to latest token list including ENS token 2021-11-08 23:46:50 -05:00
Brendan Weinstein
377331c44e
fix: Update walletlink-connector to 6.2.8 (#2655)
* 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
2021-11-03 10:56:54 -04:00
dependabot[bot]
2d2508f681
chore(deps-dev): bump @uniswap/token-lists (#2699) 2021-10-27 07:15:50 -04:00
Justin Domingue
abe6bf500c
feat: extend privacy and terms (#2623)
* initial iteration

* add logging

* added hook

* polish

* remove unused import

* add hash

* addressed pr feedback

* remove autorouter icon

* use firebase store

* style

* adjust recat ga

* log remove liquidity

* update copy

* addressed pr feedback

* addressed pr feedback

* prevent privacy content from dismissing modal

* make top-level key origin

* use hostname

* restore trm
2021-10-25 08:41:55 -04:00
Carlos Diaz-Padron
50386f65e7
upgrade @davatar/react to 1.8.1 (#2485) 2021-10-13 14:03:06 -07:00
Zach Pomerantz
dddd24f1f4
chore: stub out new component lib (#2495)
* chore: stub out new component lib (#2467)

* chore: stub a bundled component lib

* chore: add cosmos to preview component lib

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>

* fixup: tsconfig

* fix: homepage

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-10-04 11:01:05 -07:00
Zach Pomerantz
aa1db580ee
Revert "chore: stub out new component lib (#2467)" (#2472)
This reverts commit 496a963dcf60fc7c645a5b0d56faf38c413a328f.
2021-09-29 16:55:31 -07:00
Zach Pomerantz
496a963dcf
chore: stub out new component lib (#2467)
* chore: stub a bundled component lib

* chore: add cosmos to preview component lib

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-09-29 13:55:09 -07:00
Zach Pomerantz
b58e200eac
chore: dedup packages (#2462)
* chore: dedup @babel packages

* chore: dedup @types packages

* chore: dedup eslint packages

* chore: dedup electron-to-chromium package

* chore: dedup prettier package

* chore: update yarn.lock

* style: run prettier
2021-09-28 12:36:33 -07:00
Carlos Diaz-Padron
be8b6ccec7
upgrade @davatar/react to 1.6.2, minor fix for ERC token URIs (#2461) 2021-09-28 09:17:09 -07:00
Zach Pomerantz
31d286c8fa
chore: rm lodash (#2451)
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.
2021-09-27 13:07:09 -07:00
Zach Pomerantz
1fcbd2dcd9
perf: import @ethersproject directly to enforce modularization (#2424)
* perf: import @ethersproject directly for modularization

* chore: update @davatar/react@1.6.0

* fix: lockfile
2021-09-24 10:19:45 -07:00
Zach Pomerantz
d7bf4bbf0d
chore: dedup packages (#2414)
Deduplicates packages, but has no effect on bundle size. These packages are used for build steps or for typings.
2021-09-24 09:38:28 -07:00
Zach Pomerantz
2482a10ca8
perf: rm duplicated ua-parser (#2427) 2021-09-24 08:13:40 -07:00
dependabot[bot]
ffe11f9eda
chore(deps-dev): bump @uniswap/token-lists (#2425)
Bumps [@uniswap/token-lists](https://github.com/Uniswap/token-lists) from 1.0.0-beta.25 to 1.0.0-beta.26.
- [Release notes](https://github.com/Uniswap/token-lists/releases)
- [Commits](https://github.com/Uniswap/token-lists/compare/v1.0.0-beta.25...v1.0.0-beta.26)

---
updated-dependencies:
- dependency-name: "@uniswap/token-lists"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-22 17:32:47 -05:00
Zach Pomerantz
8bb1983aaa
chore: dedup @ethersproject (#2415)
Saves 20kb of gzipped payload.
2021-09-22 09:15:44 -07:00
Moody Salem
53da48b646
refactor: add an import sorting plugin (#2417)
* refactor: add an import sorting plugin

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-09-21 18:21:28 -05:00
Zach Pomerantz
9b1903df77
perf(i18n): bundle default locale with main chunk (#2405)
* 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
2021-09-21 12:20:53 -07:00
dependabot[bot]
ba9ff0dfa5
chore(deps): bump tmpl from 1.0.4 to 1.0.5 (#2407)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 15:06:02 -04:00
Moody Salem
6ae632158e
fix: bump walletconnect to fix android deep linking (#2384) 2021-09-17 15:56:08 -05:00
Zach Pomerantz
bea63cd4b4
feat: report web-vitals to ga (#2363) 2021-09-17 09:14:45 -07:00
Carlos Diaz-Padron
cc8c5712ec
feat: add @davatar/react for robust avatar support (#2321)
* add @davatar/react for robust avatar support

* remove @metamask/jazzicon, unused

* move @davatar/react to devDependencies

* pin exact version for @davatar/react
2021-09-16 16:04:11 -04:00
Justin Domingue
cd22955817
feat: routing api integration (#2116)
* 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>
2021-09-16 10:50:58 -04:00
Zach Pomerantz
c68d08ac26
fix: shim array-flat (#2346)
* chore: remove @types/lodash.flatmap

* fix: shim array-flat
2021-09-15 11:03:12 -07:00
Noah Zinsmeister
a52b7bf06b
feat: use SDK to format calldata passed to quoter (#2305)
* replace useSingleCallResult implementation

use useSingleContractMultipleData instead

* use sdk methods to format quoter calldata

* create cleaner useSingleContractWithCallData fn

* clean up useMultipleContractSingleData

* address comments
2021-09-09 16:40:37 -04:00
Zach Pomerantz
416a3f9433
chore: use native flatMap (#2231) 2021-09-03 12:29:37 -04:00
Zach Pomerantz
f5557a434c
chore: upgrade type system (#2276)
* chore: upgrade type system

Upgrade types, typescript, and formatters.

* fix: ListsState tests
2021-09-01 12:38:10 -07:00
circlehotarux
5dfe44dad4
fix: older browser suppport (#2228)
* fix: Object.fromEntries polyfill

* fix: update polyfills

* fix: update polyfills
2021-09-01 11:17:49 -07:00
dependabot[bot]
d922447ef2
chore(deps): bump tar from 6.1.4 to 6.1.11 (#2280)
Bumps [tar](https://github.com/npm/node-tar) from 6.1.4 to 6.1.11.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.4...v6.1.11)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-01 09:31:25 -04:00
Zach Pomerantz
9e8d08e22c
fix(governance): special case bravo parsing (#2247)
* 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
2021-08-31 10:47:06 -04:00
Moody Salem
b8a9191653
fix: turn service workers back on (#1944)
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>
2021-08-25 12:46:56 -07:00
Moody Salem
1304acd8c7
fix: walletconnect on L2 issues with Rainbow (#2242)
* fix: remove the walletconnect bridge url

* fix: use the latest ethereum provider which fixes the optimism rainbow issue
2021-08-24 12:01:53 -05:00
Zach Pomerantz
8112e48e9a
chore: rm redux-devtools-extension (#2230)
redux-devtools-extension integration is already provided through @reduxjs/toolkit.
2021-08-23 10:17:24 -05:00
Zach Pomerantz
f3c400c514
chore: remove unused cross-env (#2232) 2021-08-23 10:15:54 -05:00
Moody Salem
ec5da7ec8f
fix: update walletconnect for deep links and scalability (#2215) 2021-08-18 12:26:00 -05:00
Noah Zinsmeister
757741c3df
fix: use @walletconnect/ethereum-provider instead of @walletconnect/web3-provider (#2175)
* use @walletconnect/ethereum-provider

* bump to support client-side disconnect
2021-08-13 10:01:56 -05:00
Ian Lapham
b416603ff4
update unsupported list (#2143)
Co-authored-by: Ian Lapham <ianlapham@Ians-MacBook-Pro.local>
2021-08-05 20:52:17 -04:00
Justin Domingue
c4dc26e1b2
fix: rename weth9 to weth (#2133)
* update @uniswap/sdk-core and @uniswap/v3-sdk

* reorder
2021-08-05 14:43:02 -04:00
Justin Domingue
adfe7225a8
upgrade to walletconnect 1.5.2 (#2134) 2021-08-04 08:49:46 -04:00
dependabot[bot]
13e347ee02
chore(deps): bump tar from 6.1.0 to 6.1.4 (#2132)
Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.4.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.1.0...v6.1.4)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-04 08:40:22 -04:00
Moody Salem
64b9df8710
fix: upgrade ethers to allow constructing transaction data compatible with eip-1559 (#2121)
* fix: upgrade ethers to allow constructing transaction data compatible with eip-1559

* bump the experimental provider
2021-07-29 17:46:35 -05:00