Commit Graph

164 Commits

Author SHA1 Message Date
Moody Salem
88600d3a78
refactor: clean up some constants 2021-07-14 11:20:37 -05:00
Ian Lapham
db145658db
update links (#2040) 2021-07-13 15:44:10 -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
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
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
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
Noah Zinsmeister
440c50dd3a
update multicall address 2021-07-08 15:49:06 -04: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
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
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
Noah Zinsmeister
2ee9b16c49
remove a lot of dead code (#1970) 2021-07-06 17:08:40 -04: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
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
Jordan Frankfurt
dfe550c43b
add arbitrum-specific L2 designs (#1912) 2021-06-26 19:54:30 -04: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
Moody Salem
2eca50be93
chore: remove defunct arbitrum kovan testnet 2021-06-22 17:23:40 -05: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
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
Noah Zinsmeister
5dd1249ddd
feat: quick fix for new governor 2021-06-13 15:15:00 -04:00
ChristophSiegenthaler
7b78dfa2c4
Fix typo (#1815)
Co-authored-by: ChristophSiegenthaler <csi@gmx.ch>
2021-06-07 11:07:16 -07:00
Moody Salem
02d80e07dc
refactor(L2): Arbitrum Kovan testnet and Arbitrum One support (#1716)
* experimental! point at a kovan arbitrum deployment

* remove the unwrapped token from mint hook

* fix explorer links

* Etherscan -> Explorer

* move chains to constant file

* use NETWORK_URLS instead

* temporary fix to the syncing issue

* fix tests

* fix unknown chain id crash

* use a multicall that returns arbitrum block numbers

* lower polling interval for layer 2

* use a better multicall

* remove unused import

* fixed multicall2

* make some v2 code chain specific

* fix build

* line number changes

* update keys

* fix the locale parsing of full locale string

* extract

* fix lint

* add arbitrum one

* add arbitrum one to supported chains

* add missing arbitrum one label

* refactor: remove storybook

* point to the arbitrum explorer address

* fix arbitrum mainnet links

* fix how weth shows up in the interface

* make the usdc price feature more cross chain compatible

* missing translation

* clean up some governance code so it doesn't crash on unsupported networks

* improve how we check for transaction receipts for sequencer networks

* improve it a bit more
2021-06-02 15:14:34 -05:00
Moody Salem
a7a1607faa
fix: add a link to switch the locale conditionally (#1776)
* add a link to switch the locale conditionally

* make it smaller

* add the locale labels

* language labels from the internet

* fix the heart in the claim popup

* undo the conditional change

* remove todo

* updated Chinese locale name to office-365 language ids

* added missing <Trans>

Co-authored-by: Justin Domingue <judo@uniswap.org>
2021-06-01 09:54:43 -05:00
Hart Lambur
5125cbb1a3
fix(uma): UMA/UNI June expiry call option routing (#1777)
This would allow for direct routing from UMA tokens to June expiry UMA and UNI covered call option tokens (specifically [UMA 25 Call [30 June 2021]](https://etherscan.io/address/0xb46f57e7ce3a284d74b70447ef9352b5e5df8963) and  [UNI 50 Call [30 June 2021]](https://etherscan.io/address/0xe0360a9e2cdd7d03b9408c7d3001e017bac2ecd5)), in the same manner as the May expiry call tokens allowed.
2021-06-01 07:28:21 -05:00
Moody Salem
b485b14395
chore(i18n): add id-ID 2021-05-31 09:55:01 -05:00
Moody Salem
0dafd3e7ba
chore: update to the top 30 locales 2021-05-28 23:25:32 -05:00
Moody Salem
d719942931
chore: en -> en-US 2021-05-28 23:15:07 -05:00
Moody Salem
ab34645073
chore: pare down the locales directory to let the crowdin sync do the work 2021-05-28 23:06:54 -05:00
Justin Domingue
70174140bc
chore: refactored locale management hook (#1737)
* chore: refactored locale management hook

* use useMemo instead of useState
2021-05-28 17:36:37 -07:00
Justin Domingue
04878e095c
feat(i18n): save and load locale from redux store (#1723)
* wrap sock around function component to get re-renders

* removed sourcelocale since we are using custom ids

* load locale data dynamically

* undo dev change

* ran yarn i18n:extract

* store locale in redux

* added support for redux

* restored header

* refactor

* addressed pr feedback

* specify type

* added navigator locale fallback to generic dialect

* make locale array const and typed

* addressed pr feedback

* fixed various

* addressed pr feedback

* make supported locales constant uppercase

* add back toUpperCase removed during refactoring

* removed lingui/detect-locale

* run yarn
2021-05-28 09:03:53 -07:00
Moody Salem
bc243e1c07
refactor: some clean up of the common bases code, add WETH 2021-05-21 10:01:58 -05:00
Moody Salem
99ad4ae44c
feat: ETH2x-FLI to ETH2X pair routing (#1644) 2021-05-20 23:53:28 -05:00
Moody Salem
5e30a4b4ad
refactor: bump to latest sdk (#1657) 2021-05-20 11:21:40 -05:00
Moody Salem
b14da2844d
chore: remove all tick lens stuff that is not used 2021-05-19 17:35:59 -05:00
Justin Domingue
1ac36c7b6b
fix: display pool shares < 10% (#1639)
* fix: display pool shares < 10%

* set bips to 1/10_000
2021-05-18 17:07:06 -05:00
Moody Salem
8d3babd015
refactor: more separation by chain of addresses 2021-05-18 14:33:03 -05:00
Moody Salem
3efe5268ae
refactor: break down some constants files and move some stuff around 2021-05-18 10:31:22 -05:00
Jorropo
3198129af2
feat(routing): support mirror protocol routing as additional bases (#1375)
* feat(routing): support mirror protocol routing as additional bases

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-05-11 13:28:50 -04:00
John Shutt
89d484d882
feat(uma): uma call option routing (#1385)
* feat(uma): uma call option routing

Signed-off-by: John Shutt <john.d.shutt@gmail.com>

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Moody Salem <moodysalem@users.noreply.github.com>
2021-05-11 13:25:51 -04:00
Moody Salem
7ee761a59e
feat: automatic slippage tolerance (#1463)
* automatic slippage tolerance start

* get it compiling

* out of range/in range behavior of slippage tolerance in add

* small useDerivedSwapInfo refactor

* improve useSwapSlippageTolerance

* fix unit test

* thread placeholder slippage through

* small improvement to slippage input behavior

* fix the display bug

* fix tx settings modal ux

* don't pass props unnecessarily

* switch back to static swap slippage for now

bump migrate slippage to .75%

* fix font size

* add flag for auto slippage migration

validate version updates even more

Co-authored-by: Noah Zinsmeister <noahwz@gmail.com>
2021-05-11 13:00:42 -04:00
Moody Salem
bdb6327c13
set initial allowed slippage to 10 bips instead of 50 bips 2021-05-05 13:03:39 -04:00
Moody Salem
509b307b67
show some price impact in the interface 2021-05-04 17:51:01 -05:00
Moody Salem
1607f8919a
code in the mainnet addresses 2021-05-04 14:44:55 -05:00
Moody Salem
873cf9760e
fix addresses 2021-05-04 14:39:02 -05:00
Moody Salem
2efe8250ae
rename gorli to goerli 2021-05-04 12:31:51 -05:00
Moody Salem
24d8b4abc9
latest deploy 2021-05-04 12:23:07 -05:00