Commit Graph

1906 Commits

Author SHA1 Message Date
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
2482a10ca8
perf: rm duplicated ua-parser (#2427) 2021-09-24 08:13:40 -07:00
Zach Pomerantz
eb09894b73
fix(web3): render children while awaiting connection (#2400) 2021-09-24 08:12:08 -07:00
Crowdin Bot
bb3c7ddbe9 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-24 13:08:52 +00:00
Crowdin Bot
0aba2701fc chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-24 12:05:31 +00:00
Crowdin Bot
a9ba79cdbe chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-24 11:06:50 +00:00
Jordan Frankfurt
384f674e48
fix(L2): add common bases to L2s (#2428)
* add common bases to L2s

* pr feedback
2021-09-23 15:29:18 -04:00
Zach Pomerantz
8de6bb6d51
perf(swap): initialize swap inputs from url (#2402)
* fix(swap): use undefined as initial currencyId state

Null should be used for a selection state, not an unknown state. undefined may signify that a currency was passed in the URL but not yet parsed.

* perf(swap): initialize swap with url

Initializes SwapState with URL parameters so that currency input may be rendered on the first frame.

* test(swap): update hooks tests

* test: fix casing

* fix: check nullish to allow eg 0
2021-09-23 09:41:35 -07:00
Zach Pomerantz
322c45bef4
perf: import lodash only as modules (#2426) 2021-09-23 07:35:23 -07:00
Crowdin Bot
d993741713 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-22 19:04:51 +00:00
Crowdin Bot
a05aae6c37 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-22 18:05:15 +00:00
Ian Lapham
0099ef6d59
update SDN list (#2423) 2021-09-22 13:37:30 -04:00
Justin Domingue
8b3da3dbaa
fix: infinite loop when brushing (#2422)
* refine comparison method

* adjust comment
2021-09-22 12:42:53 -04:00
Crowdin Bot
afbe846cba chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-22 02:15:59 +00:00
Crowdin Bot
901e0558b5 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-22 01:26:53 +00: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
Crowdin Bot
45709a5d36 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-21 22:05:23 +00:00
Moody Salem
fb07919888
refactor: transaction info is translated in the appropriate places (#2380)
* 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
2021-09-21 16:45:24 -05:00
Justin Domingue
91de599f12
fix: de-duplicate intermediate pairs (#2396)
* make useAllCurrencyCombinations return uniques

* consolidate useBestV3Trade* functions

* consolidate useBestV2Trade

* typo

* reverted changes to trade hooks

* reverted changes to trade hooks

Co-authored-by: Noah Zinsmeister <noahwz@gmail.com>
2021-09-21 15:42:30 -04:00
Justin Domingue
284a435171
chore: initial support for Swahili (Tanzanian) (#2397)
* initial support for Swahili (Tanzania)

* remove sw-KE
2021-09-21 15:41:58 -04: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
Crowdin Bot
77679026ef chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-21 19:04:48 +00:00
Jordan Frankfurt
97ba8fb5b0
feat(L2-beta-launch): network selector (#2129)
* fix an issue with optimism/arbitrum alert distinction, add a prompt to switch to Optimism on mainnet

* only prompt to switch networks if the user has a wallet connected

* add readmore link styles

* add network to the user's wallet if it hasn't been added already

* network selector

* hide arbitrum until it launches

* add arbitrum for testing

* update copy and some margins

* fix alert opacity issue

* remove the launch alert :(

* adjust icon position and add curvier corners

* lighten some colors

* keep the selector around even if the user's wallet doesn't support the eip when they're on L2, just hide all other networks

* copy updates and some other small tweaks

* better mobile experience

* shrink on mobile

* fix some links and css

* differentiate between selector and row logos

* fix some copy

* remove network alert from add liquidity pages, update copy and buttons on swap page, remove close option if no eth, persist close state otherwise

* design polish

* update read more links

* update downtime warning to be less intense

* oe logo
'

* design polish sesh

* fix a couple bugs
2021-09-21 14:57:29 -04:00
Justin Domingue
cc9650b74b
refactor: simplify trade hooks (#2371)
* merge tradeExactIn|Out

* cleanup

* reset polling interval

* polish

* improved types and fixed client side

* rename combined to bestv3
2021-09-21 13:51:50 -04:00
Zach Pomerantz
e242faca86
perf: render components on first frame (#2404)
* fix(nav): render Vote link while awaiting connection

Minimizes layout shift in the normal case.

* perf: inline logo svg

* perf: display connect button for web3 initial state
2021-09-20 16:03:57 -07:00
Crowdin Bot
1a73f513dc chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-20 15:38:09 +00:00
Crowdin Bot
c43912df94 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-20 10:05:15 +00:00
Crowdin Bot
b07bc40230 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-20 08:05:20 +00:00
Crowdin Bot
dabb511ff5 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-18 18:05:22 +00:00
Justin Domingue
648e4e02c4
ignore v3 state when only v2 only (#2383) 2021-09-17 16:29:08 -04:00
Crowdin Bot
9bc00ccaf6 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-17 18:05:12 +00:00
Crowdin Bot
2e90561978 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-17 17:08:27 +00: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
112b00521c
fix: flip token logos in routing diagram (#2375)
* flip token logos in route

* update snapshot
2021-09-16 14:50:51 -04:00
Justin Domingue
1314477a88
add static route svg (#2373) 2021-09-16 14:16:19 -04:00
Crowdin Bot
c6b6e7f0d6 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-16 17:07:45 +00:00
Crowdin Bot
c8009ca909 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-16 16:05:14 +00:00
Crowdin Bot
2cabd7dc51 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-16 15:04:55 +00: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
Crowdin Bot
fb33a06861 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-16 03:04:54 +00:00
Jordan Frankfurt
bcf64bcb11
feat(chain-connectivity): warn when the user is not receiving blocks (#2123)
* logic for tracking time since last block

* add polling times to chain info

* pr feedback

* add gui for chain connectivity warning

* add arb support

* update title of warning to indicate internet connectivity issues may be the problem

* pr review

* clean up useBlockWarningTimer

* softer language on mainnet

* only show warning if user has the window visible
2021-09-15 22:20:28 -04:00
Zach Pomerantz
c2093ce040
feat: lazily load token list validator (#2342)
Removes 125kb from main chunk. Moves ~90ms off of the critical pageload path.
2021-09-15 13:23:17 -07:00
Zach Pomerantz
308f7d59a0
fix: avoid replaceAll (#2361) 2021-09-15 13:20:14 -07: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
Crowdin Bot
f826554bd4 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-15 17:06:46 +00:00
Crowdin Bot
dc2d1b06d2 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-15 16:05:05 +00:00
Patrick
8ea5cb450a
style: Fix letter case consistency (#2353)
* Fix letter case consistency

Fixed lower case to upper case to be consistent with:

src/pages/AddLiquidityV2/index.tsx
src/pages/RemoveLiquidity/index.tsx
src/pages/Swap/index.tsx
src/state/burn/hooks.ts
src/state/burn/v3/hooks.ts
src/state/mint/hooks.ts
src/state/mint/v3/hooks.ts
src/state/stake/hooks.ts
src/state/swap/hooks.ts

* style: Fix case to be consistent
2021-09-15 11:03:56 -04:00
Patrick
58249e3ce2
Fix letter case consistency (#2352)
Fixed upper case to lower case to be consistent with src/components/SearchModal/ImportList.tsx
2021-09-15 10:42:57 -04:00
Crowdin Bot
2ee79f74e9 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-15 11:04:52 +00:00
Crowdin Bot
24f85d422c chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-15 09:05:18 +00:00
Crowdin Bot
d98954067e chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-14 20:17:38 +00:00
Zach Pomerantz
58f1193a21
fix: add deps to try safe effect (#2349) 2021-09-14 11:20:52 -07:00
Zach Pomerantz
88cc20a61a
feat(i18n): initialize locale before React (#2343)
* feat: initialize locale before React

* chore: explain react-router-dom hash/search usage
2021-09-14 10:17:56 -07:00
Crowdin Bot
c563717aae chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-14 14:06:02 +00:00
Zach Pomerantz
15a339a0d7
lint: connect SafeApp on mount (#2341) 2021-09-13 15:29:27 -07:00
Zach Pomerantz
3c371af32a
fix: only try SafeApp connection in an iframe (#2340)
* 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
2021-09-13 15:17:54 -07:00
Crowdin Bot
5797a6229b chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-13 18:05:31 +00:00
Crowdin Bot
32212332bb chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-13 17:07:56 +00:00
Justin Domingue
f7ac87fa85
fix: increase max block age for l2s (#2333)
* fix: increase max block age and refresh fee tier more often

* similar for tick data
2021-09-13 12:22:44 -04:00
Crowdin Bot
540ec24e21 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-13 16:05:01 +00:00
Crowdin Bot
cd4f19836c chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-13 14:05:06 +00:00
Crowdin Bot
a20b2ff7fa chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-10 07:05:03 +00: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
Moody Salem
0ab1e5f144
fix: cherry pick the logs hook fix from the liquidity incentives branch (#2315) 2021-09-08 14:06:41 -05:00
Justin Domingue
115c72db9e
chore: start tracking approvals in ReactGA (#2311)
* chore: start tracking approvals in ReactGA

* move reactga to swap-only code
2021-09-08 10:22:44 -04:00
Ian Lapham
2bb695d84c
reduce popup dismiss time on l2; (#2262) 2021-09-07 12:42:30 -04:00
Noah Zinsmeister
627a5d3a98
Squashed commit of the following:
commit 5f1d1af62bcd47286aafacc18788f4e7e22dd7c0
Author: Aseem Sood <asood123@yahoo.com>
Date:   Fri Sep 3 12:12:39 2021 -0400

    update readme

    tweak

commit 80a5b95c0e0ae8934b5591c982077eaa813db747
Author: Noah Zinsmeister <noahwz@gmail.com>
Date:   Fri Sep 3 11:52:56 2021 -0400

    consolidate and standardize unsupported tokens
2021-09-05 13:26:47 -04:00
Crowdin Bot
353c4751b8 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-03 17:08:55 +00:00
Zach Pomerantz
416a3f9433
chore: use native flatMap (#2231) 2021-09-03 12:29:37 -04:00
Noah Zinsmeister
30cffb7442
feat: governor bravo support (#2271)
* first pass

* Fix code style issues with ESLint

* address comments

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-09-03 12:29:25 -04:00
Zach Pomerantz
f59c5f6877
chore: paint currency selector on initialization (#2245)
Avoids a flash of "Select a token" as the App initializes.
2021-09-02 10:57:01 -07:00
Zach Pomerantz
4bdf3c191a
fix: always paint StyledPollingNumber (#2254)
Adds a en-space to StyledPollingNumber so it is always painted. Fixes a layout shift when rendering the first block number.
StyledPollingNumber is taller than its container, so waiting to paint it causes a layout shift when rendering.
2021-09-02 10:42:07 -07:00
Zach Pomerantz
7b829135df
fix: make non-interactive header elements unselectable (#2288) 2021-09-01 15:30:17 -07:00
Zach Pomerantz
5831328364
style: enforce object-shorthand (#2286) 2021-09-01 13:32:20 -07:00
Jordan Frankfurt
6b99740f91
use network-specific help center link (#2285) 2021-09-01 16:01:24 -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
Justin Domingue
cd50d576d4
update optimism subgraph url (#2282) 2021-09-01 11:58:10 -04:00
Jordan Frankfurt
81b1346937
update explorer links for arbitrum (#2279) 2021-08-31 18:19:26 -04:00
Zach Pomerantz
f51335df9d
fix: disable serviceworker in integration tests (#2274) 2021-08-31 11:00:19 -07:00
Zach Pomerantz
13a289f6f1
Revert "test: support stubbing subgraph data in cypress (#2259)" (#2269)
This reverts commit 00403a481034ad4a23fc454a818b5687237c246d.
2021-08-31 11:10:07 -04:00
Jordan Frankfurt
0afeb5acaf
add arbitrum token list (#2268) 2021-08-31 11:05:12 -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
Ian Lapham
299286a0d9
update token list (#2270) 2021-08-31 10:37:58 -04:00
Justin Domingue
00403a4810
test: support stubbing subgraph data in cypress (#2259)
* upgrade to 7.0

* first iteration of stubbing subgraph in integration tests

* added fixtures

* add tests for fee tier distribution and liquidity chart

* remove unused test utils

* update yarn.lock

* fixed merge artifacts
2021-08-30 15:56:38 -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
c2c7d87ca3
chore: update multicodec usage (#2233) 2021-08-23 10:15:43 -05:00
Noah Zinsmeister
1613cc473b
fix: proposal formatting 2021-08-20 16:57:45 -04:00
Noah Zinsmeister
e1f37b0ec6
fix(governance): hot fix for parseLog crash 2021-08-20 00:04:06 -04:00
Zach Pomerantz
805af2fdb4
chore(accessibility): increase contrast for connections (#2223) 2021-08-19 16:53:06 -04:00
Zach Pomerantz
b833d07b4f
chore: change language icon to globe (#2222)
* chore: change language icon to globe
2021-08-19 16:44:28 -04:00
Crowdin Bot
ff10346b06 chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-17 11:04:45 +00:00
Crowdin Bot
f15522a47c chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-17 00:09:22 +00:00
Crowdin Bot
67b66235ba chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-16 23:05:26 +00:00
Zach Pomerantz
7153908935
chore: fix SEO and accessibility nits for Lighthouse (#2212)
* refactor: index.html

* chore: preconnect to GA

* chore(SEO): add meta content

* chore(SEO): add alt to ethereum logo

* chore(accessibility): add aria-labels to menus

* chore(accessibility): mark AppBody as main

* chore(accessibility): update nav link ids

* chore(accessibility): set html.lang to match i18n locale

* chore(refactor): mv html.lang to useEffect
2021-08-16 18:30:52 -04:00
Crowdin Bot
4541e37388 chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-16 13:18:27 +00:00
Crowdin Bot
3bbcdcb8ae chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-13 22:05:18 +00: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
Moody Salem
f463df97bf
fix: do not construct routes with the same pool twice (#2196) 2021-08-11 10:15:53 -05:00
Ian Lapham
99a282b7b4
update blocked address list (#2182)
Co-authored-by: Ian Lapham <ianlapham@Ians-MacBook-Pro.local>
2021-08-10 10:30:54 -04:00
Moody Salem
5a3165358f
fix: #isTradeBetter should check that output currencies are equal (#2177)
* fix: isTradeBetter should check that input/output are equal

* fix the fix
2021-08-10 09:25:43 -05:00
Moody Salem
26e334c78f
fix: proposal descriptions should be pulled from the right governor (#2176) 2021-08-10 08:53:22 -05:00
Justin Domingue
bd8192c81e
update chinese simplified and traditional display names (#2180) 2021-08-10 09:05:17 -04:00
Justin Domingue
ff6bd38992
add ReactGA event for full range (#2181) 2021-08-10 09:05:05 -04:00
Justin Domingue
a48b7ce702
fix: avoid running BestV3Trade when tokens are the same (#2172)
* avoid running BestV3Trade when tokens are the same

* flipped condition
2021-08-09 10:38:23 -04:00
Crowdin Bot
fc08d1fc6a chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-06 20:05:37 +00: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
Crowdin Bot
b527bfbeea chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-03 12:05:13 +00:00
Crowdin Bot
a25df00ef6 chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-03 08:05:04 +00:00
Crowdin Bot
2446a6e88b chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-03 07:04:40 +00:00
Crowdin Bot
3b3bf14e8a chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-02 19:04:33 +00:00
Crowdin Bot
017e79f7ae chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-02 17:09:09 +00:00
Crowdin Bot
804fe8f5ee chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-02 15:05:55 +00:00
Jordan Frankfurt
bf01b0d342
fix: optimism link and some copy changes (#2126)
* fix: optimism link

* fix: (un)planned downtime copy changes
2021-08-02 10:50:46 -04:00
Crowdin Bot
f46f73f35f chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-02 06:05:04 +00:00
Crowdin Bot
cad3575247 chore(i18n): synchronize translations from crowdin [skip ci] 2021-08-02 03:10:20 +00:00
Crowdin Bot
17aa9fcdb0 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-31 12:05:49 +00:00
Crowdin Bot
087745d7c6 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-31 08:05:54 +00:00
Lint Action
20e6ca6fd5 Fix code style issues with ESLint 2021-07-30 22:06:48 +00:00
Justin Domingue
d51b7e779b
update full range documentation link 2021-07-30 15:05:43 -07:00
Matthew Quinn
cfd0412d78
fix: center import pool text V2 (#2122)
* fix: center import pool text V2

* fix: updated based on feedback

Co-authored-by: Matthew Quinn <matthew.quinn@libertymutual.com>
2021-07-30 14:39:46 -04:00
Matthew Quinn
50afef03cb
fix: update mobile header to fix overflow (#2125)
Co-authored-by: Matthew Quinn <matthew.quinn@libertymutual.com>
2021-07-30 14:38:40 -04:00
Crowdin Bot
43b6e7abf4 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-30 05:04:40 +00:00
Crowdin Bot
d75271484a chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-29 21:04:53 +00:00
Justin Domingue
952cc98df3
fix: add support for full range positions in add liquidity (#2090)
* remove arbitrary range buttons and move full range button

* better align full range to deposit

* support dragging range when in full range

* hack to support full range brushing

* restore zoom levels

* adjusted for mocks

* fix styling

* simplify type

* restore rate toggle change

* fix lower bound by looking at isSorted

* better align bottoms

* add reset button for full range positions

* only flip when not at limit

* fix +/- buttons in range selector

* add help link
2021-07-29 13:47:03 -07:00
Crowdin Bot
9b7637e012 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-29 19:04:45 +00:00
Jordan Frankfurt
a7f599127b
add link (#2113) 2021-07-29 14:16:47 -04:00
Jordan Frankfurt
676890d89c
fix(L2): update downtime warning copy (#2114) 2021-07-29 14:16:09 -04:00
Lint Action
beb1bf3bdc Fix code style issues with ESLint 2021-07-29 17:26:43 +00:00
Justin Domingue
631c202c49
document useQueryCacheInvalidator
explains why `chainId` is pulled directly from the store.
2021-07-29 10:25:29 -07:00
Crowdin Bot
dcaed9094e chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-28 11:04:43 +00:00
Jeffrey Lin
8996ba6e38
fix: toggle liquidity position when toggling rates (#2117)
If field A and field B are already populated, chances are the user wants
them to remain the same and only wants to invert the price range
selector.

The conversion isn't exact, but should be preferable to the previous
behavior.
2021-07-27 16:57:52 -07:00
Crowdin Bot
c8570e5427 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-27 20:04:39 +00:00
Ian Lapham
2806f6513a
feat: use modal for txn confirmation on l2 (#2055)
* use modal for txn confirmation on l2

* update with error state

* remove 1 translation

* dedicated L2 component

* update styling on to be less jumpy

* add success animation to modal

* revert regular submitted content

* remove useless hook in popups

* remove import

Co-authored-by: Ian Lapham <ian_lapham@alumni.brown.edu>
2021-07-27 15:55:47 -04:00
Noah Zinsmeister
422c703e71
Revert "feat(uma): uma call option routing (#1385)"
This reverts commit 89d484d882e73ba6fe51a2cf66a893210cb0ce79.
2021-07-26 14:19:29 -04:00
Noah Zinsmeister
506493e8ab
Revert "feat(routing): support mirror protocol routing as additional bases (#1375)"
This reverts commit 3198129af2eff07048eab2a9c041522495927e04.
2021-07-26 13:51:53 -04:00
Justin Domingue
8dfd143208
test: set up component snapshot testing (#2102)
* 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>
2021-07-26 10:41:08 -07:00
Moody Salem
718003b6f2
fix: prevent error if user selects ETH and WETH in add liquidity (#2112)
* fix: prevent error if user selects ETH and WETH in add liquidity

fixes https://github.com/Uniswap/uniswap-interface/issues/1763

* linting error

* revert changes to Tokens.ts
2021-07-26 11:08:15 -05:00
Moody Salem
80b3aa9e61
fix: remove html ids and unnecessary keys from the menu 2021-07-26 07:34:11 -05:00
Ian Lapham
4078390a48
update unsupported and broken lists (#2100) 2021-07-23 18:05:14 -04:00
Justin Domingue
e07599ef0f
fix: better support decimal overflow (#2075)
* better support decimal overflow

* improve tests

* explicitly define num digits in toSignificant

* add tests for 0 decimals

* undo change to tryParseAmount and instead compute price without relying on parse

* remove console log and add test

* removed comment

* addressed pr feedback

* improve parsing logic

* addressed pr feedback
2021-07-23 11:11:30 -07:00
Ian Lapham
311bdc19b3
add UniH to unsupported list (#2097) 2021-07-23 13:46:05 -04:00
Moody Salem
a6342d40f1
feat: support connecting to a gnosis safe (#2096)
* 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
2021-07-23 12:04:18 -05:00
Moody Salem
3686506f2a
perf: remove extra spread operators from the combine maps function 2021-07-23 09:27:23 -05:00
Moody Salem
634d010d92
perf: list to token map function was doing too many reduces (#2095) 2021-07-23 09:16:56 -05:00
Justin Domingue
4d3ed5d6ba
feat: routing api integration (#2080)
* 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
2021-07-21 15:08:35 -07:00
Jordan Frankfurt
4d19122bd2
set 5 min deadline on swaps and hide UI on L2 (#2081) 2021-07-20 12:41:49 -04:00
Moody Salem
13d7d2c992
fix(swap): double max gas for quoting a v3 swap for large trades 2021-07-19 19:00:52 -05:00
Justin Domingue
1f62cdf7a2
fix: invert selected range on RateToggle instead of clearing inputs (#2078) 2021-07-19 11:22:46 -07:00
Crowdin Bot
701e8fe116 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-19 13:09:18 +00:00
Crowdin Bot
3207e6026e chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-19 10:05:27 +00:00
Justin Domingue
b0d93dbc0e
increase zoom out range (#2076) 2021-07-16 19:14:39 -07:00
Justin Domingue
975a5e3434
remove unused dependencies (#2074) 2021-07-16 15:03:19 -07:00
Ian Lapham
07f52f02ff
feat: only block on app url, mobile UI tweaks (#2073)
* start iframe ui updates

* replace hook with constant

* add origin check for blocked lists

* remove origin check for local unsupported list

* remove redundant retun

* remove iframe check

* undo local change
2021-07-16 15:28:19 -04:00
Crowdin Bot
5f112611c8 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-16 18:22:45 +00:00
Justin Domingue
1d82a4c71e
fix: set language using url param in language dropdown (#2063)
* set language using url param in language dropdown

* refactor common code into a hook

* add hook

* address pr feedback
2021-07-16 10:56:33 -07:00
Justin Domingue
6004c4be3e
fix: change panning cursor to col-resize (#2071)
* change panning cursor to col-resize

* revert to grabby, and support grabbing
2021-07-16 10:49:27 -07:00
Justin Domingue
a00432c1c3
fix: remove chart clamping and show indicator when handle is off screen (#2064)
* initial off screen indicator

* adjust offscreen indicator

* add off screen handle indicator

* hide reset until we get a better behavior

* add svg.tsx
2021-07-15 16:31:06 -07:00
Crowdin Bot
a184afa41e chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-15 22:05:15 +00:00
Crowdin Bot
49fd256e79 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-15 17:09:03 +00:00
Crowdin Bot
c006edf696 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-15 16:05:00 +00:00
Moody Salem
b16dd2a930
chore: add one more unit test for ALL_SUPPORTED_CHAIN_IDS 2021-07-15 10:04:43 -05:00
Moody Salem
08a8f669e8
fix: all supported chain ids should not include the string keys of the enum 2021-07-15 09:59:26 -05:00
Justin Domingue
95d91c8528
fix: add language selector in top-level menu (#2057)
* initial language selector

* set > icon opacity for consistency

* always reset menu to main on close

* always reset menu on menu open
2021-07-15 07:46:05 -07:00
Justin Domingue
03902fe5c1
remove duplicate set price range title when there is liquidity (#2058) 2021-07-14 17:43:45 -07:00
Ian Lapham
631052e6a5
fix: update balance check in derived swap state (#2054)
* update balance check in derived swap state

* replace balance check with correct version of trade
2021-07-14 19:23:46 -04:00
Moody Salem
c63bb84f09
fix(block number): link to the correct page in etherscan for optimism block number links 2021-07-14 11:56:37 -05:00
Moody Salem
f0d10ba0df
fix: add DAI and WBTC and USDT to routing for Optimism
fixes https://github.com/Uniswap/uniswap-interface/issues/2016
2021-07-14 11:50:04 -05:00
Moody Salem
88600d3a78
refactor: clean up some constants 2021-07-14 11:20:37 -05:00
Crowdin Bot
a1060d5f75 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-14 12:05:09 +00:00
Crowdin Bot
83762b3c6a chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-14 07:04:47 +00:00
Crowdin Bot
7784f647e1 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-14 02:12:32 +00:00
Moody Salem
65ba56c5f0
fix(arbitrum): use infura endpoints 2021-07-13 20:44:37 -05:00
Crowdin Bot
963514cd51 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-14 01:25:14 +00:00
Crowdin Bot
6d0c8037a8 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-13 22:04:48 +00:00
Justin Domingue
d5ef7f9b24
fix: revert remove x-axis clamping behavior in liquidity chart (#2045)
* Revert "fix: remove x-axis clamping behavior in liquidity chart (#2042)"

This reverts commit f86db00464448fe2c0e387aa01855f1710cd4fbd.

* removed extra curly braces around errorMessage
2021-07-13 14:33:13 -07:00
Justin Domingue
f86db00464
fix: remove x-axis clamping behavior in liquidity chart (#2042)
* remove x-axis clamping behavior

* remove extra curly braces around errorMessage
2021-07-13 14:17:52 -07:00
Justin Domingue
8884020fab
chore: support stubbing subgraph in integration tests (#2039)
* upgrade to 7.0

* first iteration of stubbing subgraph in integration tests
2021-07-13 12:54:49 -07:00
Ian Lapham
db145658db
update links (#2040) 2021-07-13 15:44:10 -04:00
Ian Lapham
55bbaffe15
fix: support for isolated pool creation (#2029)
* revert to remove ui polish changes

* left align blurb and fix bp issue

* fix translation wrapper

* remove preview screen for create, hide submitted txn UI for create, copy updates

* small fixes

* copy updates for create blurb

* add set price range title

* add translation

* fix some translations

Co-authored-by: Justin Domingue <judo@uniswap.org>
2021-07-13 15:18:09 -04:00
Callil Capuozzo
e1c3ad8f54
fix(L2): Design tweaks for L2 (Optimism) (#2038)
Style tweaks to header layout, network dropdown and pool pages

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
2021-07-13 15:08:23 -04:00
Ian Lapham
730af2eed4
fix: dismiss txn confirmation modal if on L2 (#2022)
* dismiss txn confirmation modal if on l2

* line up far right margin;

* remove submitted view on txns if on L2

* remove uneeded chainid

* wrap dismissal in useEffect

* update variable names
2021-07-13 14:37:35 -04:00
Jordan Frankfurt
c625d15feb
fix(L2): add downtime warning to add liquidity and adjust styles of network notification (#2034)
* add liquidity warning and network notification

* remove unneeded width

* use externalLink in LinkOutToBridge component

Co-authored-by: Moody Salem <moody.salem@gmail.com>
2021-07-13 12:30:24 -05:00
Justin Domingue
f9de85251c
fix overflow on mobile (#2037) 2021-07-13 10:11:50 -07:00
Moody Salem
a186833b7a
fix(L2): enable optimism token list when switched to optimism (#2036)
* add title text and opacity variability to token lists

* add optimism token list

* show tokens from active lists

* sort up token lists
with tokens on the current chain

* fix up some type issues

prune out chainId changes

* clean up leftover any

* refactor token count mechanism

* handle plurals in title text string

* new combineMaps implementation

* remove custom plural

* address a couple nits

* show the number of tokens on current chain

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: Justin Domingue <judo@uniswap.org>
2021-07-13 11:51:59 -05:00
Luke Donato
aa06db7684
add optional chaining for stakingInfo (#1950) 2021-07-13 11:06:29 -05:00
Moody Salem
f5b601ee99
fix(L2): use 10 bips slippage for swaps by default on L2 (#2035)
* use 10bip slippage on L2

* update deps

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
2021-07-13 10:41:46 -05:00
Justin Domingue
bf30013b6c
fix: add liquidity ux polish (#2024)
* zoom out on intiial

* adjust initial zoom ranges

* remove unneeded reactga event

* adjust full range warning copy

* update zoom

* adjust zoom ranges and label around current price
2021-07-13 08:23:24 -07:00
Justin Domingue
2bc2a2c76e
compare with undefined rather than falsy (#2027) 2021-07-12 16:13:45 -07:00
Justin Domingue
28bf95123e
load pool data for each tier to determine state (#2026) 2021-07-12 15:56:55 -07:00
Justin Domingue
b1d88317b9
fix: properly set upper/lower base/quote on manual inversion (#2023) 2021-07-12 14:58:44 -07:00
Moody Salem
f332315de9
fix(routing): updates routing constants for layer 2 networks to use ETH (#2018) 2021-07-12 15:30:28 -05:00
Ian Lapham
2fbb86ac44
fix: update CMC priority within lists (#2019) 2021-07-12 16:07:08 -04:00
Justin Domingue
8d567e4d4a
fix: add liquidity flow polish (#2017)
* addressed feedback

* set initial, min and max zoom levels

* better handle 0

* avoid formatting range selector

* polish `not created` state

* remove unused import
2021-07-12 10:19:12 -07:00
Moody Salem
77fbccd3f1
fix: remove dollar sign from translation of eth amount
fixes https://github.com/Uniswap/uniswap-interface/issues/1986
2021-07-12 11:09:45 -05:00
Moody Salem
41330ab080
fix: price tokens on optimism mainnet using DAI 2021-07-12 11:03:10 -05:00
Jordan Frankfurt
4ba9d98e67
fix(L2): polish (#1988)
* 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
2021-07-12 11:44:05 -04:00
Justin Domingue
52790ac92e
support optimism and arbitrum subgraphs (#2001) 2021-07-12 08:26:11 -07:00
Crowdin Bot
380ca11dfd chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-10 23:05:01 +00:00
Crowdin Bot
e4261cc01b chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-10 22:05:10 +00:00
Crowdin Bot
99148dfd3f chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-09 18:05:05 +00:00
Crowdin Bot
b6c0c1e607 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-09 16:05:04 +00:00
Crowdin Bot
0739613abe chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-09 12:05:06 +00:00
Crowdin Bot
3401dfdebe chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-09 06:05:09 +00:00
Justin Domingue
ab9c27edad
fix: make liquidity chart and input step counter responsive (#2005)
* make chart responsive

* make input step counter text responsive

* clean up chart
2021-07-08 15:52:31 -07:00
Moody Salem
f2dfc57002
fix: retry calls that return header not found errors (#2004) 2021-07-08 17:12:55 -05:00
Justin Domingue
318252b6a9
fix: min/max price inverted in positions page (#2002)
* fix param ordering in inverter hook

* use object param
2021-07-08 17:06:24 -04:00
Noah Zinsmeister
440c50dd3a
update multicall address 2021-07-08 15:49:06 -04:00
Crowdin Bot
eacf4e6049 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-08 19:04:32 +00:00
Justin Domingue
ffbd2d107a
feat(pool): add liquidity distribution range slider and update add liquidity layout (#1829)
* 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
2021-07-08 11:30:43 -07:00
Justin Domingue
2db29f205b
fix: simplify liqudity depth hooks and improve chart primitives (#1999)
* updated hooks and chart primitives

* add lodash.inrange to package.json
2021-07-08 11:12:36 -07:00
Crowdin Bot
3ae9e2af2a chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-08 17:12:35 +00:00
Noah Zinsmeister
5ff2cff841
feat: Add Optimism (#1923)
* 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>
2021-07-08 12:46:21 -04:00
Crowdin Bot
0c0968864b chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-08 15:04:48 +00:00
Crowdin Bot
9230473c36 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-08 14:05:18 +00:00
ChrisFox.eth
b791afac59
Updating two public-facing URLs to docs (#1992) 2021-07-08 08:22:31 -05:00
Crowdin Bot
2899c8af45 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-08 06:04:59 +00:00
Crowdin Bot
6690bc513d chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-08 00:06:45 +00:00
Justin Domingue
aea3c1f6e6
feat(pools): add liquidity chart range input primitives (#1990)
* first iteration of liquidity chart primitives

* add tickprocessed type

* clean up
2021-07-07 16:39:44 -07:00
Justin Domingue
e0c625671b
improve liquidity depth hooks and data fetching (#1989) 2021-07-07 14:37:29 -07:00
Crowdin Bot
aa3c867222 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-07 16:06:58 +00:00
Justin Domingue
2182e676d4
fix: enforce styled-components/macro usage and upgrade react-scripts (#1981)
* upgrade react-scripts and enforce macro rule

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-07-07 08:45:47 -07:00
Justin Domingue
f0fc11a3b5
stabilize fee distribution in hook (#1979) 2021-07-07 08:27:18 -07:00
Crowdin Bot
53d93afd78 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-07 15:05:04 +00:00
Jordan Frankfurt
b612b15e1e
fix(L2): routing fixes (#1980)
* Revert "fix last commit"

This reverts commit 9f5764aab31b7653f4046be00eae707460513d4f.

* Revert "fix l2 routing bug"

This reverts commit f6dea47907016a8ec820cf1b9b4a95e9f8e15be5.

* drops routing changes for L2

* pool v2 switch networks message
2021-07-07 10:59:31 -04:00
Noah Zinsmeister
9f5764aab3
fix last commit 2021-07-07 09:44:28 -04:00
Noah Zinsmeister
f6dea47907
fix l2 routing bug 2021-07-07 09:38:29 -04:00
Crowdin Bot
8e9981e186 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-07 08:05:21 +00:00
Crowdin Bot
1509c430fd chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-07 07:04:46 +00:00
Crowdin Bot
93073321db chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-07 06:05:06 +00:00
Crowdin Bot
618760ff1b chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-07 03:04:52 +00:00
Jordan Frankfurt
2d20fc939d
feat(L2): network alert cards (optimism and arbitrum) (#1957)
* design review for arbitrum UI

* add optimism L2 UI

* better gradients, remove v2 links/routes, some minor padding and margin fixes
2021-07-06 22:38:47 -04:00
Crowdin Bot
8c1e9b394b chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-06 22:04:39 +00:00
Moody Salem
cfe590d810
refactor(devx): show a warning when a call fails due to insufficient gas allowed 2021-07-06 16:28:01 -05:00
Noah Zinsmeister
2ee9b16c49
remove a lot of dead code (#1970) 2021-07-06 17:08:40 -04:00
Moody Salem
c52cd2c38e
fix(position image): increase the gas required constraint for the token URI 2021-07-06 16:08:20 -05:00
Noah Zinsmeister
43cefbdc6a
no more borderRadius errors! (#1968) 2021-07-06 17:05:19 -04:00
Moody Salem
ae86fefe8b
fix: do not reverse the proposals list in place 2021-07-06 10:17:08 -05:00
Crowdin Bot
8901605c32 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-05 12:05:15 +00:00
Justin Domingue
568829d3b5
fix: invalidate subgraph cache with provideTags (#1962)
* invalidate queries using tags

* enhance generated api with provide tags

* clean up
2021-07-03 12:56:38 -07:00
Justin Domingue
b0f4b4c735
remove loading indicator from fee tier selection (#1954) 2021-07-02 11:00:48 -07:00
Moody Salem
a73d3af4b2
fix: use an arbitrum multicall that returns a better block number 2021-07-02 12:56:12 -05:00
Moody Salem
2c7b431e60
fix: use a multicall that allows limiting gas of the individual calls (#1953)
* fix: use a multicall that allows limiting gas of the individual calls

* use the latest multicall addresses
2021-07-02 12:25:37 -05:00
Ian Lapham
0805b2d9b8
update defaults (#1955) 2021-07-02 13:24:04 -04:00
Moody Salem
6c8fc5a7f6
fix: reduce call retries by specifying a block tag in multicall 2021-07-02 09:25:11 -05:00
Crowdin Bot
702258574d chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-02 06:09:45 +00:00
Crowdin Bot
17bc229a36 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-01 23:07:38 +00:00
Justin Domingue
458a7d90a0 various edits 2021-07-01 15:13:36 -07:00
Crowdin Bot
72877fb0b6 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-01 20:09:52 +00:00
Moody Salem
27f756107e
refactor: logs hook (#1941)
* 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
2021-07-01 14:44:02 -05:00
Justin Domingue
abfd87c517
feat(pools): fetch pool tick data from uniswap v3 subgraph (#1932)
* 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
2021-07-01 11:08:53 -07:00
Crowdin Bot
b3d772bdb5 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-01 18:04:48 +00:00
Justin Domingue
d9c82ebf49
feat: add fee tier distribution badge (#1862)
* integrate with The Graph and auto-select fee tier

* restored

* addressed some design feedback

* add pulsing animation on feeAmount change

* simplify fee tier title

* adjust button radios

* addressed some design feedback

* log ReactGA events

* ignore data while fetching

* update to use new generated queries

* remove deleted file

* add usefeetierdistribution hook

* invalidate cache and standardize the outlined card

* added react ga

* fix show options logic

* address design feedback

* show % select in minified view

* updated merge error
2021-07-01 10:56:27 -07:00
Justin Domingue
5298a5ce29
feat: handle chain id in subgraph api (#1938)
* 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
2021-07-01 09:50:03 -07:00
Moody Salem
4d3073d2d9
fix(position page): link to the token page of the explorer instead of the address page from the position page 2021-07-01 10:55:28 -05:00
Crowdin Bot
361e0ca8d7 chore(i18n): synchronize translations from crowdin [skip ci] 2021-07-01 10:04:56 +00:00
Justin Domingue
9cfbec4b8b
generated graphql schema and en-US.po on start (#1930) 2021-06-29 12:03:47 -07:00
Crowdin Bot
b5ac5d882f chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-29 09:04:42 +00:00
Crowdin Bot
130606cab4 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-29 08:04:53 +00:00
Moody Salem
633f65676e
fix(theme): fix the missing background radial gradient
fixes https://github.com/Uniswap/uniswap-interface/issues/1925
2021-06-28 19:35:41 -05:00
Moody Salem
9bccb7ae3a
fix(multicall): better use the block number returned from calls, and cancel all calls when a new block comes in 2021-06-28 19:26:47 -05:00
Justin Domingue
1667b56a04
feat(thegraph): auto-generate graphql types (#1926)
* auto-generate graphql types

* remove introspection

* generated .ts and add to prettierignore

* updated graph url
2021-06-28 16:43:24 -07:00
Justin Domingue
6e995d6c09
feat(pools): integrate with The Graph using RTK Query (#1924)
* integrate with the graph

* Update src/state/data/slice.ts

Co-authored-by: Noah Zinsmeister <noahwz@gmail.com>

Co-authored-by: Noah Zinsmeister <noahwz@gmail.com>
2021-06-28 15:12:58 -07:00
Moody Salem
f096112716
fix: improve how we use blocks per fetch in the memoization of the listeners (#1920)
fixes https://github.com/Uniswap/uniswap-interface/issues/1877
2021-06-28 16:39:19 -05:00
Jordan Frankfurt
50c7d36164
replace trustwallet assets repo w/ our fork (#1922) 2021-06-28 16:35:31 -04:00
Crowdin Bot
8f59f501cc chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-28 16:04:43 +00:00
Jordan Frankfurt
197947835b
remove unneeded log (#1917) 2021-06-27 22:23:46 -04:00
Crowdin Bot
94081b29a3 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-27 05:04:39 +00:00
Moody Salem
69183ed8c2
fix: translate claim modal inputs 2021-06-26 23:58:25 -05:00
Crowdin Bot
05e741b6c9 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-27 00:08:49 +00:00
Jordan Frankfurt
dfe550c43b
add arbitrum-specific L2 designs (#1912) 2021-06-26 19:54:30 -04:00
Crowdin Bot
65dfb40e44 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-25 15:04:42 +00:00
Moody Salem
25f5ed9983
fix: scrollbars showing up in modal with mouse connected, use auto instead of scroll 2021-06-25 10:00:25 -05:00
Yuta Sugimura
9b1ef415c6
refactor: remove unneeded react import (#1801)
* Add rules

* Remove React import

* remove React import
2021-06-25 09:52:49 -05:00
Crowdin Bot
70f481430a chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-25 07:04:27 +00:00
Justin Domingue
942211eb00
fix: typos in modal css (#1911)
* allow modal scrolling on dekstop

* removed quote and fixed typo
2021-06-24 13:33:11 -07:00
Justin Domingue
6589c41800
allow modal scrolling on dekstop (#1910) 2021-06-24 10:04:07 -07:00
Moody Salem
14bac770b6
fix(arbitrum): explorer links and better anonymization of GA events 2021-06-24 11:38:08 -05:00
Crowdin Bot
c9dbe2f0ac chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-24 10:04:51 +00:00
Crowdin Bot
775cf57c30 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-24 09:04:32 +00:00
Moody Salem
f4935e9264
fix(arbitrum): miscellaneous arbitrum network changes
- adds the arbitrum rinkeby testnet deployment
- compute usdc prices on arbitrum one
2021-06-23 20:58:03 -05:00
Crowdin Bot
6b3914b7b9 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-23 08:05:03 +00:00
Crowdin Bot
41efb6f617 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-23 06:05:18 +00:00
Crowdin Bot
52df5f14cf chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-22 23:04:56 +00:00
Noah Zinsmeister
b48a7c529f
fix: proposal sorting 2021-06-22 18:47:12 -04:00
Moody Salem
2eca50be93
chore: remove defunct arbitrum kovan testnet 2021-06-22 17:23:40 -05:00
Moody Salem
be2ce18bfa
fix: change polling interval per network (#1898) 2021-06-22 17:21:01 -05:00
Crowdin Bot
02aac08489 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-22 21:05:04 +00:00
Crowdin Bot
8f29980b94 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-22 20:05:13 +00:00
Scott Moses Sunarto
bb542ef0fb
feat: Add proposal creation interface (#1799)
* Make address input panel more generalized

* Add TextInput component

* Allow adjusting AppBody maxwidth

* Add create proposal layout page

* Fix style consistency

* create proposal ui goes brrr

* various fixes

* minor tweaks and bug fixes

* merge conflict clean up + bug fix

* i18n

* always show create proposal button

* adjust proposal title top margin and show ButtonError styling

* use button disable instead of button error when form is not filled

* revert mistaken css change

* default params for address input panel

* Refactor & fixes

- Add missing i18n
- Refactor how some styled-components is done
- ButtonError is now disabled when proposal is true in create proposal interface
- Edit copywriting
- Minor styling adjustments

* Fixed create proposal padding on medium screen

* refactor

* refactor pt. 2

* single column styling

* change AddressInputPanel font color

* Design adjustments

* change route for create proposal

* Add autonomous proposal CTA

* cta text edit

* Add link to docs for custom action

* small cleanup

* work with latest governor

Co-authored-by: Noah Zinsmeister <noahwz@gmail.com>
2021-06-22 15:51:32 -04:00
Crowdin Bot
c2fe17615f chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-22 13:12:10 +00:00
Crowdin Bot
a4cab75d09 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-22 08:04:47 +00:00
Crowdin Bot
882457cfef chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-21 16:05:32 +00:00
Justin Domingue
9a1bb5dbfb
Add missing semicolon in English source 2021-06-21 08:10:00 -07:00
Crowdin Bot
767cc85b3e chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-21 07:07:47 +00:00
Crowdin Bot
47d726e544 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-21 06:04:54 +00:00
Crowdin Bot
32118520cd chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-20 19:05:02 +00:00
Crowdin Bot
ada8a3af92 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-19 07:06:22 +00:00
Crowdin Bot
63694b32c0 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-19 06:05:14 +00:00
Crowdin Bot
c9ab94d799 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-19 04:05:38 +00:00
Crowdin Bot
a990c4af70 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-18 21:04:57 +00:00
Crowdin Bot
b5cc33c1f5 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-18 20:05:12 +00:00
Justin Domingue
31da6cdb9d
fix: new toggle theme (#1782)
* new toggle theme

* moved trans to default

* update radius

* fianlize styles
2021-06-18 12:44:14 -07:00
Crowdin Bot
4079d8a517 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-18 16:05:52 +00:00
Crowdin Bot
e93fbfd31b chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-18 15:05:19 +00:00
Crowdin Bot
7817846368 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-17 23:04:59 +00:00
Crowdin Bot
fc6a69a9af chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-17 09:04:49 +00:00
Crowdin Bot
93a774092f chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-17 08:05:12 +00:00
Crowdin Bot
55563e9bb2 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-17 07:07:40 +00:00
Crowdin Bot
f44aae2f53 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-17 06:04:53 +00:00
Crowdin Bot
7d674c33e7 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-17 04:05:17 +00:00
Noah Zinsmeister
79e6337629
fix governorIndex 2021-06-16 17:31:24 -04:00
Noah Zinsmeister
3c8e8604b8
Merge remote-tracking branch 'refs/remotes/origin/main' 2021-06-16 17:22:46 -04:00
Noah Zinsmeister
b763659788
restrict governance UI to mainnet only
fix governor name bug

revert useContract change

add governorIndex to vote page

only fetch latest useLatestProposalCount

fix useDataFromEventLogs

hardcode proposalIndexes for old governors
2021-06-16 17:22:37 -04:00
Crowdin Bot
1ac2581419 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 20:04:59 +00:00
Crowdin Bot
9f556680ed chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 19:06:17 +00:00
Justin Domingue
3f242f1b44
fix: memoize extendedEther to unnecessary rerenders (#1869) 2021-06-16 11:07:16 -07:00
Crowdin Bot
126688c753 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 17:16:00 +00:00
Ian Lapham
374cc361a6
small bg fixes (#1868) 2021-06-16 13:14:31 -04:00
Crowdin Bot
0198d0baa1 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 16:05:39 +00:00
Crowdin Bot
da2d7ba648 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 15:05:16 +00:00
Yuta Sugimura
37cf492dd5
fix: Add SwitchLocaleLink to a page where it does not exist (#1867) 2021-06-16 07:24:25 -07:00
Crowdin Bot
9e93f809a0 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 14:05:04 +00:00
Crowdin Bot
d9bd392e6d chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 12:05:13 +00:00
Crowdin Bot
c48adc519f chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 11:05:10 +00:00
Crowdin Bot
9f8983a92e chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 10:05:07 +00:00
Crowdin Bot
c9d3d81768 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 09:05:06 +00:00
Crowdin Bot
c6f73c35ee chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 08:05:22 +00:00
Crowdin Bot
7a2777b814 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-16 03:05:54 +00:00
Jordan Frankfurt
014595cdfb
feat: add multi-contract governance support (#1860)
* Revert "feat: quick fix for new governor"
This reverts commit 5dd1249dddc3e097c26a68bd5b4157ffa341dd60.

* support multiple governance contracts
2021-06-15 22:36:27 -04:00
Crowdin Bot
c4d12c86a8 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 23:04:42 +00:00
Crowdin Bot
8d2feeb89e chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 19:05:52 +00:00
Crowdin Bot
576b399768 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 18:06:23 +00:00
Crowdin Bot
eb8ce85872 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 15:04:56 +00:00
Justin Domingue
1644e4f9c6
fix(a11y): color contrast changes (#1803)
* fix: a11y changes

* more a11y fixes

* updated theme colors

* addressed rev4 comments

* address rev5 comments

* addressed rev6
2021-06-15 07:55:38 -07:00
Yuta Sugimura
574fab54d1
fix: props for ResponsiveButtonPrimary (#1839)
* fix: props for ResponsiveButtonPrimary

* fix ResponsiveButtonPrimary style
2021-06-15 07:55:11 -07:00
Crowdin Bot
8e581c19ff chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 09:05:09 +00:00
Crowdin Bot
8c2fa89e9e chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 08:05:05 +00:00
Crowdin Bot
0ae7452eca chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 07:07:02 +00:00
Crowdin Bot
4589beb789 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 06:04:49 +00:00
Crowdin Bot
55aee86971 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 04:04:55 +00:00
Crowdin Bot
a457af91b6 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 03:07:51 +00:00
Crowdin Bot
e61b5da3c5 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-15 00:08:26 +00:00
Crowdin Bot
b4f44744c1 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-14 23:05:29 +00:00
Crowdin Bot
27f4e2e750 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-14 22:04:51 +00:00
Crowdin Bot
01159c53d5 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-14 21:04:56 +00:00
Crowdin Bot
8d8d63b873 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-14 20:05:10 +00:00
Crowdin Bot
da9db4b5f1 chore(i18n): synchronize translations from crowdin [skip ci] 2021-06-14 18:04:48 +00:00