Commit Graph

1694 Commits

Author SHA1 Message Date
Crowdin Bot
d89d5598a0 chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-09 09:06:21 +00:00
Crowdin Bot
6f66f5ee77 chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-08 21:07:14 +00:00
Justin Domingue
4b8d942da6
fix: add usdc price in TradePrice (#2441)
* add usdc price in trade price

* adjust color

* adjust usdc price

* Fix code style issues with ESLint

* round to 4

* use same format as fiat value

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-10-08 16:49:54 -04:00
Crowdin Bot
ef2cb75f6f chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-08 10:06:46 +00:00
Crowdin Bot
5e0e9be955 chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-08 09:05:59 +00:00
Crowdin Bot
72a914b0d1 chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-08 08:06:18 +00:00
Crowdin Bot
c4ce5caf0c chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-08 07:06:21 +00:00
Crowdin Bot
b87a45b0ba chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-08 06:08:20 +00:00
Crowdin Bot
80eb394877 chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-07 19:06:26 +00:00
Crowdin Bot
b47808fcd9 chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-07 10:06:20 +00:00
Justin Domingue
e56fdf3eff
move GA initialization to own file (#2508) 2021-10-06 18:09:29 -04:00
Justin Domingue
bca70dd46a
fix: routing utils.tests (#2509)
* fix routing utils.test

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-10-06 12:34:55 -04:00
Justin Domingue
78581d5420
improve routing types (#2507) 2021-10-06 11:05:08 -04:00
Justin Domingue
896f2fc3c0
move computeRoute to utils (#2506) 2021-10-06 10:51:32 -04:00
Crowdin Bot
66e9092d11 chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-06 10:06:39 +00:00
Crowdin Bot
df397a8a15 chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-06 09:06:39 +00:00
Ian Lapham
a7b945a812
update gas quote for arbitrum and USDC address (#2503) 2021-10-05 20:43:34 -04:00
Crowdin Bot
b71708faee chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-05 14:26:14 +00:00
Crowdin Bot
7715294bea chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-05 13:11:37 +00:00
Crowdin Bot
7a57fbe6d9 chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-05 04:06:29 +00: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
Crowdin Bot
13d9f6c29d chore(i18n): synchronize translations from crowdin [skip ci] 2021-10-04 16:06:39 +00:00
Zach Pomerantz
16d8f958b1
refactor: use global fill (#2494) 2021-10-04 08:37:50 -07:00
Patrick
868242a6b2
Clarify Button (#2447)
Changed "Remove send" to "Remove recipient" for clarification purposes.
2021-10-04 11:08:46 -04: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
Ian Lapham
5cb37dc098
hot fix for v2 token select bug (#2471) 2021-09-29 11:57:35 -04: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
Ian Lapham
d3700882b2
quick fix for broken token select on add (#2454) 2021-09-27 16:22:15 -04: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
77c7dab024
chore: use esm for luxon (#2452) 2021-09-27 13:06:50 -07:00
Ian Lapham
ffab1c56c7
add new addresses (#2450) 2021-09-27 13:02:14 -04:00
Justin Domingue
cd4a2313ac
restore use v3 (#2449) 2021-09-27 12:04:59 -04:00
Jordan Frankfurt
81b8afdd3d
fix: set custom dimension on chainId change (#2440)
* set custom dimension on chainId change

* make it more clear that 1 is mainnet

* 0 fallback chainId
2021-09-27 12:02:56 -04:00
Crowdin Bot
6085284ed6 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-26 16:06:43 +00:00
Crowdin Bot
9b56c8db74 chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-26 11:06:48 +00:00
Zach Pomerantz
ea17c7c111
chore: restrict imports from dist (#2443)
* fix: consistent @uniswap/v3-sdk imports

* fix: consistent @redux/toolkit imports

* fix: consistent @web-react imports

* fix: consistent @uniswap/token-lists imports

* chore: restrict dist/ imports
2021-09-25 12:35:00 -07:00
Crowdin Bot
52630aa77e chore(i18n): synchronize translations from crowdin [skip ci] 2021-09-25 10:07:07 +00: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
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