Commit Graph

273 Commits

Author SHA1 Message Date
Vignesh Mohankumar
417e940c0a
test: fix swap test flake (#4135)
* remove all the funky logic

* clear stuff

* uncomment some tests

* remove expert mode tests

* skip these tests again, smh
2022-07-19 16:42:45 -04:00
Vignesh Mohankumar
f596293b6c
build: don't fail cypress on unhandled exception (#4122) 2022-07-18 09:46:31 -04:00
Sam Chen
4013743473
chore: upgrades react-router-dom, fixes dev-mode linking (#4115)
* fix: stale route

* fix: add e2e test

* fix: update e2e test
2022-07-17 11:15:04 -04:00
Vignesh Mohankumar
6a1506ade6
build: Revert "build: pause deploy" (#4107)
* Revert "build: pause deploy (#4102)"

This reverts commit 3a1ea3df85a60fd32f47b67ce933a6edd239384f.

* prettier
2022-07-14 12:19:23 -04:00
Vignesh Mohankumar
3a1ea3df85
build: pause deploy (#4102) 2022-07-13 21:24:58 -04:00
Zach Pomerantz
d5eed8b15f
build: wait 1m between release tests (#4077) 2022-07-11 13:24:01 -04:00
Zach Pomerantz
2447afc43e
build: wait on passing cypress (#4076)
* build: wait on passing cypress

* build: video upload
2022-07-11 18:55:03 +02:00
Zach Pomerantz
b9e8139699
fix: alter headers on cached response (#4032)
* fix: alter headers on cached response

* test: deflake
2022-07-05 08:31:06 -07:00
Vignesh Mohankumar
0e148bb1b3
style: use data-testid in cypress test (#4001)
* use data-testid

* findByTestId

test -> it

add types

temp

rm exclude

get -> find

* Revert "findByTestId"

This reverts commit 1e1c483ef90596b41f649443be1b191414ab3876.

* rm some test ids

* fix
2022-06-29 16:57:21 -04:00
Kaylee George
53d6eb0922
fix: show no price impact eth to weth (#3923)
* fix: show no price impact eth to weth

Fixed the price estimate values to reflect the correct price estimates depending on whether it is a wrapped trade

* fix: show no price impact eth to weth

Fixed to display the correct price estimates depending on whether it is a wrapped trade (eth -> weth should show no price impact)

* Added ETH->wETH testing

Added a Cypress test to check wrapped value swap has no price impact

* make Cypress test cleaner
2022-06-16 15:09:57 -04:00
Vignesh Mohankumar
db0d3cf3fa
feat: upgrade to web3-react v8 (#3759)
* initial

* comment more stuff out for now

* more changes

* more temp

* remove walletconnect bug logic

* switch to provider not connector

* remove fortmatic

* remove some usage of network connector

* fix initialize connector

* more changes

* remove switch to network

* connect eagerly

* active -> isActive

* add initial option cards

* upgrade web3-react

* delete tryActivation

* delete pending view, reset option code

* fix hooks

* library -> provider

* rm getLibrary

* eagerly connect

* comment all this code for now

* add back app

* dont connect eagerly here

* deactivate

* switchToNetwork

* switch to useWeb3React

* rm Web3ReactManager

* add back og wallet modal code

* switch back to old option logic

* add account logic back

* add back more network switch logic

* Revert "switch to useWeb3React"

This reverts commit 08ac6319d40207c31c72bf3b16b9f22223fc1ddc.

* add back skip disconnect logic

* check for network connector

* use promise.then again

* remove unnecessary pending error logic

* reset useAddTokenToMetamask

* upgrade packages

* use watchAsset

* add gnosis

* rm fortmatic

* close on disconnection

* add Wallet enum

* remove fortmatic imports

* add wallet state

* set/clear override wallet

* resolve empty

* remove some wallet modal view logic

* useWeb3ReactListener

* move to use effect

* add setwalletoverride in deactivate for now

* start to fix the wallet modal bug

* back button should open options

* connect eagerly to all

* Revert "add setwalletoverride in deactivate for now"

This reverts commit fbc990a9245c68460b1f29e368174b5327aa586c.

* useSelectedIsActive

* switch the enum to not be a bug

* actually dispatch the wallet override

* remove connection useEffect for now

* Revert "remove connection useEffect for now"

This reverts commit 0b92eee6894586e08079c1e4092e098b579cb768.

* add back the activation useeffect

* handle resetting eagerly connecting

* dont disconnect from coinbase wallet

* disconnect except for coinbase wallet, bc their reload breaks things

* handle eager activation edge case

* backfill wallet override

* rename wrapper components

* update test

* network if override undefined

* npx deduplicate

* comment for why coinbase wallet special cased

* connectorPrevious -> previousConnector

* Array.find instead of forEach

* useState instead of useReducer

* add comments and simplify

* Web3Wrapper component

* add type guard

* check for watchAsset

* revert Option.tsx changes

* set -> updateWalletOverride

* generalize connector type usage

* rm comment

* eagerlyConnect comment

* null -> undefined

* add comment for wallet override

* add back pendingError logic

* merge conflicts

* remove provider dep

* add back connect a wallet

* move active prop out of base props

* add back account details test

* add type of isActiveMap

* add back eslint

* add TODO

* Web3Provider

* return null from Updater

* update comment

* integration tests initial

* try updating test

* check for gnosis safe

* fix gnosis safe check

* pr comments

* pr comments

* don't eagerly connect to any wallets other than gnosis or walletOverride

* remove unused branch

* pendingError from hook

* eslint-disable-line

* try connecting to wallets if not backfilled

* move eager connection logic

* remove connect eagerly set logic

* disconnect on change

* simplify ConnectorState

* better solution for changing wallet priority

* merge fixes

* fix tests

* try fixing test again

* add comment

* add fortmatic back

* set walletOverride for fortmatic

* hide other chains

* handle eager connection

* connect everything eagerly if not backfilled

* fix chain switching

* async

* rm error console

* fortmatic update

* log errors

* don't eagerly connect to fortmatic

* onSelectChain + switchChain

* typo

* don't disconnect from coinbase wallet for now

* upgrade web3-react

* close on disconnection/connection again

* simplify account change check

* comment fix

* comment

* fortmatic icon

* comment for fortmatic in network selector

* consolidate useEffect hooks in walletmodal for connection/disconnection

* switchToChain

* comment

* isEagerlyConnecting instead of eagerlyConnectingWallets

* update web3-react

* close modal fortmatic

* remove error log

* chainIdNotAllowed

* handle useToken

* update SupportedChainId

* move if statements around

* move to wallet reducer

* close as error

* export fix

* add back history change

* add back popular

* fortmatic key

* persist wallet

* remove eagerly connect

* call connect eagerly

* handle modal errors

* handle fortmatic close properly

* connector error changes

* go back to options

* change redux wallets

* simplify reducer

* fix eagerly connect / disconnect

* remove account change hook

* simplify connect eagerly

* remove unused var

* revert chain

* walletOverride reducer

* update web3-react

* fix compile errors for now

* show disconnect button

* clear pending connector

* clear error state

* add back skip toggle check

* MAINNET provider for ENS

* add coinbase wallet sdk

* fix test

* add back style but fix syntax highlighting

* dont create separate json rpc provider

* don't use selected hooks

* dont export

* dispatch first

* useConnectors

* comment

* simplify activeMap

* useIsActiveMap

* prettier

* prop change

* move comment

* useCallback

* coinbase wallet link fix

* rm ModalWallet type

* reportError

* isChainAllowed

* NETWORK_SELECTOR_CHAINS

* mainnet provider

* remove unused wallet views

* add back default case

* selected wallet

* comment change

* !chainAllowed

* rm ensResolver

* rm forEach

* re-define reportError

* move effects arounds

* change error message for switching chain

* simplify Web3Provider

* delete use isActive map

* fix test?

* rm disconnect test for now

* error message updates

* const -> function

* move fn

* undo changes for showing connect wallet state

* clear error before activating

* remove special case for fortmatic error

* backfillable/selectable wallets

* log wallet

* Revert "rm disconnect test for now"

This reverts commit 225bc7dc5622ae918d8a8b70e4425c648d1a1fac.

* check if account exists

* unused dep

* remove reload piece of test

* update connect a wallet default state

* headerRow
2022-06-16 14:39:23 -04:00
Zach Pomerantz
c16e49e774
feat: service worker with etag cache (#3897)
* fix: always-fresh service worker cache

* chore: clarify service-worker

* fix: cache in CacheStorage

* feat: set __isDocumentCached

* add back in manifest precaching

* add unit tests (incomplete)

* test: simplify test env

* test: add service-worker cypress test

* test: service-worker document handler

* fix: CachedDocument ctor

* fix: Readable for ReadableStream in jest

* build: clean up module loading

* fix: rename commands->ethereum

* build: simplify package.json deps

* build: clean up cypress usage

* build: clean up yarn.lock

* build: record cypress runs

* build: disable chromeWebSecurity in cypress tests

* build: rm babel

* build: disable sw in ci cypress

* build: nits

* build: update workbox version

* chore: fix merge

* test: cache

* test: cypress-ify the before hook

* test: clear sw before each test

* fix: cy then

* test: cypress shenanigans

* style: lint

* chore: rm todo

* test: fail fast for service worker with dev builds

* docs: update contributing to tests

* fix: clean up tests after merge

- Add fast fail in case of dev server, which lacks ServiceWorker

* fix: inject ethereum

* test: service worker

* test: increase sw timeout

* test: sw state

* test: run cypress in chrome

* feat: add on-demand caching to improve sw startup time

* test: test dynamically

* fix: simplify cached doc

* fix: optional sw

* fix: expose response on cached doc

* fix: stub out sw req

* fix: intercept

Co-authored-by: Christine Legge <christine.legge@uniswap.org>
2022-06-14 15:40:52 -04:00
Zach Pomerantz
48f8c6a141
test: update cypress (#3908)
* test: update cypress

* chore: comment on infura origin

* test: split build and serve

* chore: rm setupNodeEvents
2022-06-13 17:43:58 -04:00
Zach Pomerantz
22136b2708
build: clean up module loading (#3898)
* build: clean up module loading

* fix: rename commands->ethereum

* build: simplify package.json deps

* build: clean up cypress usage

* build: clean up yarn.lock

* build: record cypress runs

* build: disable chromeWebSecurity in cypress tests

* build: rm babel

* build: disable sw in ci cypress

* build: use dev env for e2e

* build: reenable web security
2022-06-09 14:39:38 -04:00
Moody Salem
c3f12398cd
fix: reverts the defaulting behavior of 1 eth to usdc (#3465) 2022-03-08 11:31:52 -05:00
Moody Salem
fc34912b53
feat(swap): default 1 native to usdc on the swap page (#3347)
* feat(swap): default 1 eth to usdc on the swap page

* fix unit tests

* fix tests

* fix the issue better

* use the token list logo

* fix integration tests for swap and add one for eth/usdc

* address comments
2022-02-28 13:30:37 -05:00
Zach Pomerantz
711b2ca85c
chore: import @ethersprojects directly (#3104)
* Revert "chore: import from ethers"

This reverts commit 6d9c0855d261679c316307ea3f668869c90e63a2.

* Revert "fix: use provider JsonRpcProvider"

This reverts commit dcbbab5e4d6458a11c38582388a7cb5b12691188.

* chore: depend on @ethersprojects directly
2022-01-12 10:06:22 -08:00
Zach Pomerantz
27412e49d5
chore: import from ethers (#3094)
* chore: rm lodash

* chore: improve styled-components lint

* chore: import from ethers

* fix: use provider JsonRpcProvider
2022-01-11 11:32:20 -08:00
Zach Pomerantz
e81e8a8f71
fix: inadvertent merges/reverts (#2915)
* Revert "Revert "Merge branch 'main' of https://github.com/Uniswap/interface" (#2912)"

This reverts commit 7d343dcfbdf75a2f91d28cefce84e4b1bace7b87.

* Revert "deleted files"

This reverts commit 097b8361d4c09afd3cb681c4622145c555ced884.
2021-12-02 10:35:39 -08:00
Justin Domingue
7d343dcfbd
Revert "Merge branch 'main' of https://github.com/Uniswap/interface" (#2912)
This reverts commit bf7a40be7a0a37b5051b9a877bbea563fba5782d, reversing
changes made to 097b8361d4c09afd3cb681c4622145c555ced884.
2021-12-02 13:12:22 -05:00
Moody Salem
745be977ef
fix(lint): clean up the eslint config (#2886)
* fix(lint): clean up the eslint config

* Fix code style issues with ESLint

* fix the linter errors that arose from using the proper config

* clean up the rebass text renames

* fix if statement, use the config

* use the same name prefix for both steps

* `TextPreset` -> `ThemedText`

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-11-30 15:20:59 -05:00
Justin Domingue
408c907870
feat: add support for 0.01% tier (#2769)
* chore: add support for 0.01% tier

* only show 1bps on mainnet

* rename VERY_LOW to LOWEST

* upgrade to v3-sdk 3.7.0

* add snapshot testing for lowest tier

* fix integration test

* fix integration test

* use ALL_SUPPORTED_CHAIN_IDS over string all

* consider 0.01% tier in pool (#2770)

* merge main and only consider lowest tier for mainnet
2021-11-12 09:46:26 -05:00
Moody Salem
53da48b646
refactor: add an import sorting plugin (#2417)
* refactor: add an import sorting plugin

* Fix code style issues with ESLint

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-09-21 18:21:28 -05:00
Zach Pomerantz
13a289f6f1
Revert "test: support stubbing subgraph data in cypress (#2259)" (#2269)
This reverts commit 00403a481034ad4a23fc454a818b5687237c246d.
2021-08-31 11:10:07 -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
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
Moody Salem
e93ddbedfa
chore(ci): take a screenshot in the cypress test for an example 2021-06-28 18:55:42 -05:00
Jordan Frankfurt
1b27d8dab0
test integration key change (#1864) 2021-06-15 21:04:54 -04:00
Callil Capuozzo
5358b4dc15
New swap layout (#53)
* re-work header

* swap tweaks

* re-work swap in progress

- inline slippage
- hidey details
- better invert UI
- better flip rate ui

* Swap improvements

- new layout order

* New swap layout

* merge main

* get all the tests running

* skip the swap test as well

Co-authored-by: Moody Salem <moody.salem@gmail.com>
2021-04-26 20:59:56 -05:00
Moody Salem
df4c18c8d4
remove v1 swaps and migrate (#46)
* remove v1 swaps and migrate

* simplify

* more delete

* revert route changes

* fix v2 add

* fix integration tests

* try to fix https://github.com/Uniswap/v3-interface/issues/41
2021-04-22 17:10:18 -05:00
Moody Salem
e13369154d
Merge branch 'main' into v3-main
# Conflicts:
#	.github/workflows/tests.yaml
2021-04-21 12:37:20 -05:00
Moody Salem
77b640c41b
chore(tests): improve the CI (#1370)
* improve the CI

* change triggers

* add pull request target back
2021-04-21 12:35:49 -05:00
Moody Salem
6be54afd12
fix the integration test errors from upgrading ethers 2021-04-21 11:19:34 -05:00
Noah Zinsmeister
d1fad3c4ea
update to latest deploy
refactor useV3Positions to work with remove

axe old redirects
2021-04-20 15:31:31 -04:00
Ian Lapham
0c0305a53d
Add page MVP UI + v3 pool hooks and state (#35)
* WIP start usePool and useDerivedMint hooks

* naming updates

* Use real tick and pool math

* rate updates

* WIP start usePool and useDerivedMint hooks

* naming updates

* Use real tick and pool math

* rate updates

* fix warnings

* fix incorrect import

* clean up state, fix preview

* same token check

* amoutn parse update

* update hard coded chain id

* fix price creation in util

* update 1 amount in price calculation

* update comments

* update tick spacing input

* fix label on counter

* update rate label on range select

* update labels

* fixing pool hook

* clean pool hook

* preserve working rate switching

* reset values on rate switch

* clean up derived hook - setup for testnet

* format slippage amounts and support ETH

* fix import error

* fix package.json dependencies

* silence warnings

* silence more warnings

* bump multicodec and multihashes

* update migrator constants

* update txn to use sdk calldata

* fix txn formatting, update summary

* Squashed commit of the following:

commit b81ff7ca9e57bb8c3823be4c54827e5955fb3d15
Author: ianlapham <ianlapham@gmail.com>
Date:   Mon Apr 12 23:46:09 2021 -0400

    fix txn formatting, update summary

commit b9f91b0746c546602d336c8fd6f614ec9b4f3f19
Author: ianlapham <ianlapham@gmail.com>
Date:   Mon Apr 12 19:29:12 2021 -0400

    update txn to use sdk calldata

commit 20acf704c67cfd4f597494c8cb9c672c6270ae02
Merge: 4431914 2462901
Author: ianlapham <ianlapham@gmail.com>
Date:   Sun Apr 11 20:33:39 2021 -0400

    Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting

commit 44319146372e1c373b025741ae896fa2476e5765
Author: ianlapham <ianlapham@gmail.com>
Date:   Sun Apr 11 20:32:35 2021 -0400

    update migrator constants

commit 35e0618de06ba316d3a3f327075625760414ab83
Merge: 8927882 c3f65e3
Author: ianlapham <ianlapham@gmail.com>
Date:   Sun Apr 11 20:13:36 2021 -0400

    Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting

commit 24629019e80c368c337a2679a51d4acb1097171c
Author: Noah Zinsmeister <noahwz@gmail.com>
Date:   Fri Apr 9 15:56:25 2021 -0400

    bump multicodec and multihashes

commit 9b5dd1876a64acbf6694d208b608bb0b429e317f
Author: Noah Zinsmeister <noahwz@gmail.com>
Date:   Fri Apr 9 14:59:09 2021 -0400

    silence more warnings

commit 140ddc1b54c7fbdd7ead2fa64bcc302f201d69f5
Author: Noah Zinsmeister <noahwz@gmail.com>
Date:   Fri Apr 9 14:57:58 2021 -0400

    silence warnings

commit 5a2726ebdd4ffaacfb3d8ec7903a944042c1bd9d
Author: Noah Zinsmeister <noahwz@gmail.com>
Date:   Fri Apr 9 14:35:01 2021 -0400

    fix package.json dependencies

commit 7c4d0a40931338de9a6197652b82fdab773483e3
Author: Noah Zinsmeister <noahwz@gmail.com>
Date:   Fri Apr 9 14:21:46 2021 -0400

    fix import error

commit e49ef19cbef7fbdf1737787a439e7cb78ba295b4
Merge: 8927882 c3f65e3
Author: Noah Zinsmeister <noahwz@gmail.com>
Date:   Fri Apr 9 14:08:34 2021 -0400

    Merge branch 'main' into minting

commit 89278825bd798a87d6010a74f8fc1d2b34a8ece1
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 8 15:18:40 2021 -0400

    format slippage amounts and support ETH

commit 9a90b19e9a759cbc0c3e903a983660730c8833ad
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Apr 7 19:43:43 2021 -0400

    clean up derived hook - setup for testnet

commit dc034bc78a147f95f47b077d28a7d6e3165cedd7
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Apr 7 00:48:24 2021 -0400

    reset values on rate switch

commit bb5ccb2c853f7b2c27ec8d2f34f42a1b06f845b9
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Apr 7 00:38:39 2021 -0400

    preserve working rate switching

commit 5312d0ae7015150da48ba304de8c7a02b7d8925c
Author: ianlapham <ianlapham@gmail.com>
Date:   Mon Apr 5 13:52:46 2021 -0400

    clean pool hook

commit 5222de14834e76c37755225be17214a6e798d872
Merge: b2ba466 24521f0
Author: ianlapham <ianlapham@gmail.com>
Date:   Mon Apr 5 12:20:34 2021 -0400

    Merge branch 'main' of https://github.com/Uniswap/v3-interface into minting

commit b2ba46684a7b0bd8a8362f5990f4a208bfeff2dd
Author: ianlapham <ianlapham@gmail.com>
Date:   Mon Apr 5 12:19:20 2021 -0400

    fixing pool hook

commit b10742af99a725e04c1b756aa20f99e995f8cfeb
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 16:53:52 2021 -0400

    update labels

commit 05abd395949245596c95090a9d5d77c7c272dbd3
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 15:34:17 2021 -0400

    update rate label on range select

commit f098d01b6f4dc1dcb99e0fa314dde93647a19bb6
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 15:26:30 2021 -0400

    fix label on counter

commit 16ffe61e8ee2b677adf5d468efa9d7aa8d7e092e
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 15:06:50 2021 -0400

    update tick spacing input

commit 0fa2c8a15821dd32ec978750991a962ecb8f7344
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 14:53:18 2021 -0400

    update comments

commit 1fccf57a1ef081ef6ba9790dc20e0ed604ac2b09
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 14:52:37 2021 -0400

    update 1 amount in price calculation

commit b0e5d22bf8c57b3eacd75f077f68aaca4a9f975a
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 14:46:41 2021 -0400

    fix price creation in util

commit 1ce246e85372e4f120f983ca18a1eb3d16e8647e
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 13:55:14 2021 -0400

    update hard coded chain id

commit 2360b2d0a3233b604956e89de4bd7b09c0506875
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 13:09:21 2021 -0400

    amoutn parse update

commit 6a99a7b71fe446fe77cb2741adce4c067862ca4a
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 13:05:41 2021 -0400

    same token check

commit 83a1fd5a9ff02c6a49532cb54a57770b52fc052e
Author: ianlapham <ianlapham@gmail.com>
Date:   Thu Apr 1 12:31:21 2021 -0400

    clean up state, fix preview

commit 8592383b8386d7adbbaeaa2c6f9c36bb121d1c65
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Mar 31 22:47:56 2021 -0400

    fix incorrect import

commit ce526fd545e52142f847dbf3caec1ca37bb0650b
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Mar 31 22:36:10 2021 -0400

    fix warnings

commit 572770fd3e000ce31cd3a6c5c5c91eac92cc8c5c
Merge: a9e5b6c 2677491
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Mar 31 22:16:30 2021 -0400

    Merge branch 'minting' of https://github.com/Uniswap/v3-interface into minting

commit a9e5b6c5e5983e279a640886783f97c33b713125
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Mar 31 22:12:43 2021 -0400

    rate updates

commit b88cab6c06176eefe5cf71f7cc3e3664d9f514ab
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Mar 31 16:15:08 2021 -0400

    Use real tick and pool math

commit ed933cfd17141174c03b0bcac5f41cf75ff9b258
Author: ianlapham <ianlapham@gmail.com>
Date:   Sun Mar 28 22:42:05 2021 -0400

    naming updates

commit 50c0a0ece5c6c66a603508529c5e7a28f45db632
Author: ianlapham <ianlapham@gmail.com>
Date:   Sun Mar 28 22:36:08 2021 -0400

    WIP start usePool and useDerivedMint hooks

commit 2677491e2128e1318a0dd4307e63069e0f8e1dfe
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Mar 31 22:12:43 2021 -0400

    rate updates

commit c2f59d6c61068a2bf4d34d102d5d28c9863ce982
Author: ianlapham <ianlapham@gmail.com>
Date:   Wed Mar 31 16:15:08 2021 -0400

    Use real tick and pool math

commit 7d53e5c7e979be19fc5c63eb52307f302328c4eb
Author: ianlapham <ianlapham@gmail.com>
Date:   Sun Mar 28 22:42:05 2021 -0400

    naming updates

commit 9022650d391682f97e71d336021c2db2e5ea5455
Author: ianlapham <ianlapham@gmail.com>
Date:   Sun Mar 28 22:36:08 2021 -0400

    WIP start usePool and useDerivedMint hooks

* remove 1337 references

* clean up multicall

* clean up redirects/router

* cleanup

* improve useAllV3Ticks

* fix multicall

* typo

* Fix code style issues with ESLint

* preserve sticky

* reset to non fixed scroll

* fix inputs at 1

* update tests

* fix routes

* sticky sidebar

Co-authored-by: Noah Zinsmeister <noahwz@gmail.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2021-04-14 10:12:35 -04:00
Noah Zinsmeister
c3f65e3abd
migration v2 (#38)
* wip

* add some v2 paths

* start to refactor migrate page

update deploy addresses

* fix tests

* stub out v3 remove

* silence some lint warnings
2021-04-09 14:01:56 -04:00
Jordan Frankfurt
ab1538b196
feature(position-list): add summary page for positions with mock data (#28)
* feature(position-list): add summary page for positions with mock data

* add loading states

* mobile layout
2021-03-03 17:21:14 -05:00
Lint Action
9d9b57dd4c Fix code style issues with ESLint 2021-02-16 08:46:17 +00:00
Jordan Frankfurt
6965707d45 Revert "upgrade prettier"
This reverts commit 5fabe438e52d4844307f86577d1d13a2e571e5f5.
2021-02-16 03:26:53 -05:00
Lint Action
b630d59437 Fix code style issues with ESLint 2021-02-15 17:01:46 +00:00
Ian Lapham
28d8f0b0bb
Improvement(token import): update import flow and style tweaks (#1273)
* update import flow and style tweaks

* update tests

* Update tsconfig.json
2021-01-20 23:22:32 -07:00
Ian Lapham
267204d98e
Improvement(lists): Switch to multiple active lists (#1237)
* basic support for multiple active lists

* start search across inactive lists

* store card before list update

* basic import flow for inactive tokens

* update supported lists

* update import flow for address pasting

* basic mvp

* hide filter if no results

* update min heights

* update manage view, index tokens on page load

* start routing fix for multi hops

* switch to input amount comparison on exactOut

* start list import view

* updated list UI, token search updates, list import flow, surpress popups and warnings

* add unsupported tokens

* show warning if logged out

* update to opyn list

* show token details on warning;

* make percent logic more clear

* remove uneeded comaprisons

* move logic to functions for testing

* test updates

* update list reducer tests

* remove unused locals

* code cleanup

* add unsupported local list

* add multi hop disable switch

* add GA

* fix bug to return multihop no single

* update swap details

* copy updates

* Visual refinements

* Further tweaks

* copy updates, actual list order

* Move settings button

* Update all trade views with settings cog

* Add better tips, remove darkmode toggle from dropdown

* Clean up routing UI

* UI tweaks

* minor tweaks

* copy updates

* add local default list, use existing function for trade comparison, disable v1 helper, show inactive/active at once

* updated inactive view

* remove slippage fix

* update output amount return

* center button, update search to character threshold

* reset add state on back navigation

* style tweak on add button

* fix bug on search results

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2021-01-14 11:20:50 -05:00
Moody Salem
03913d9c0b
UNI 2020-09-24 11:29:31 -05:00
Moody Salem
610b7f4464
make integration tests pass more reliably, some reducer refactoring 2020-08-27 10:21:51 -05:00
Moody Salem
cb36c9103e
fix integration tests, update default list 2020-08-26 11:43:10 -05:00
Moody Salem
7cf25ac7c8
feat(lists): allow selecting and adding token lists (#1023)
* more list stuff

Use the selected list instead of the default list, but also use the default list

start list selection code

* move token warning to a modal, fix the install issue

* add/remove/enter key

* handle enter on currency select for ETHER

* change slippage tolerance to be a slider

* make ui closer to the mocks

* commit slider changes

* back to tabs

* copy changes

* bump list version

* some styling for the list select

* bump uniswap default list version

* use contract calls to get ens names and addresses

* show list logo

* fix failing integration test

* .eth.link

* list introduction screen

* remove showSendWithSwap

* fix integration and unit tests

* resolve ENS names

* logos from ens

* fix the lint errors

* some refactoring to better support using a the library provider from the user for resolving ENS names

* load list info from the list url for the introduction page

* make it slightly harder to remove a list

* minor clean up, some help text and links

* remove icon from list update popup

* show added/removed tokens

* add GA everywhere, don't debounce contenthash lookups

* show tags

* fix tag key

* tag display, list rendering, needs optimization

* fix list fetching in firefox, style issue in safari

* sort the lists, clean up styling

* use client provider when possible

* show token warning for url loaded tokens

* improve the warning modal

* some refactoring to fix the list fetching on networks other than mainnet

* fix tests

* some minor improvements

* increase timeout to maybe fix integration tests which pass locally

* build for tests using the dev network url

* reset the lists if we deleted the other two copies

* improve how we handle updating the default list of lists

* fix integration test

* Update token list selection styles

* fix external links, reuse the on click outside code, show add errors

* show the list origin instead of the full url

* fix update list link

* show host instead of hostname
do not automatically dismiss major version upgrades for lists

* fix link to tokenlists.org

* add uma

* clean up styling in list rows

* bump token list version

* bump token list version again

* hover symbol to see currency name

* bump version

* add cmc lists, dharma list

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2020-08-26 08:46:21 -05:00
Moody Salem
09b54570e1
fix integration test for recipient 2020-08-24 13:52:41 -05:00
Ian Lapham
2150450760
improvement(token warnings): show better warnings for imported tokens (#1005)
* add updated ui warnings for imported tokens

* remove useless styling

* update to surpress on default tokens

* add integration tests for warning cards on token import

* remove callbacks as props in token warning card
2020-07-30 15:21:37 -04:00
Moody Salem
b08bb7eaff
add an integration test 2020-07-27 13:29:25 -05:00
Moody Salem
3272f8e9db
chore(infura): rotate keys (complete) 2020-07-21 11:07:10 -05:00
Moody Salem
19b1e9e399
feat(weth): support WETH across the site and use sdk 3.0 (#947)
* first pass of sdk 3.0

* second pass using weth

* kill unused pool popup

* get it compiling again

* first pass of sdk 3.0

* switch to currencies

* get it compiling after the big move merge

* restore margin

* clean up add liquidity more

* fix a bunch of bugs

* todo trade on v1

* show eth in currency list

* allow selecting eth in the swap page

* fix unit tests for swap page

* test lint errors

* fix failing integration tests

* fix another couple of failing unit tests

* handle selecting currency b when no currency a

* improve the import pool page

* clean up add liquidity for invalid pairs

* bold

* first pass at swap arguments for v1, some unit tests

* fix some bugs in add liquidity, burn hook

* fix last of ts errors in remove liquidity

* support wrapping/unwrapping weth

* kill a bunch of code including the dummy pairs

* required pair prop in the position card

* tests for the v1 swap arguments

* do not say estimated on the wrap ui

* show ETH instead of WETH in the pool summaries

* small size socks

* fix lint error

* in burn, use currencies from the URL

* fix some integration tests

* both contain weth

* receive eth/weth link

* fix empty row

* show wrapped only if one currency is weth

* currency selects in the remove liquidity page
2020-07-20 06:48:42 -05:00
Moody Salem
344b4340ae
improvement(pool): simplify pool flow, remove pool search modal (#941)
* deleting some code first

* strict, some refactoring

* denser common bases

* more add liquidity refactoring

* add liquidity paths working

* show common bases in the token selects

* fix the ability to select duplicate tokens

* useless rename

* try to handle alllll the duplicate token edge cases

* think i got them all lol

* remove common bases header

* Revert "remove common bases header"

This reverts commit 6ac4565d

* fix and add integration tests

* make gap between rows smaller

* get integration tests actually running again

* try another format of the command, upgrade serve

* frozen lockfile on install

* try the cypress github action

* install cypress in ci

* remove redundant ignore-scripts command

* use a specific github commit for the pinata action

* fix a bug in the multicall reducer, improve token list rendering performance

* improve the enter key on the token search modal

* stop using history.push

* fix linting errors

* position card cleanup before updating to match mock
2020-07-10 15:25:15 -04:00
Moody Salem
21c1484c0e
feat(send page): remove send page, implement recipient feature in swap page (#934)
* quick poc for removing swap page

* accidental import

* error for recipient field

* query parameter working

* undo id change

* tweaks to match mocks better

* tweaks to match mocks better

* some extra integration tests

* clean up nav tabs a bit

* clean up nav tabs a bit

* space swap/pool better

* stop selecting button text when double clicking

* remove unused transfer modal header

* add info to swap confirm modal

* shorten address

* improve summary message, remove unused send callback, fix react ga event

* fix lint errors

* arrow color
2020-07-08 23:06:29 -04:00
Moody Salem
3277d70e93
fix all tests 2020-06-30 14:02:09 -04:00
Moody Salem
f88af029ae
chore(tests): fix integration tests 2020-06-30 13:51:20 -04:00
Moody Salem
2c4f4092d8
improvement(advanced): always show advanced (#890)
* always show advanced

* fix test

* always show the price, less jitter

* show tokens in price field

* fix the dropdown sticking around when switching between swap/send

* lint

* fix ios scrolling the modal body into the viewport bug

* don't use react-spring for simple slide animation

* safer price impact constants
2020-06-15 10:13:12 -04:00
Moody Salem
1d06b47e8d
workaround so tests are less flaky 2020-06-08 10:51:14 -04:00
Ian Lapham
0004db3d4a
Style updates, Approve UI updates (#841)
improvements(approvals): match approve flow to add/remove, update UI styles
2020-06-05 13:20:47 -04:00
Noah Zinsmeister
28c916ff45
Remove liquidity callback (#837)
* give add liquidity the reducer treatment

rename setDefaultsFromURL to setDefaultsFromURLSearch

* fix tests and crash

* rework DOM structure to make flow more natural

* allow slippage + deadline setting in add liquidity

* migrate burn

* disable token selection in mint

clear input between pairs

* reset fields between pairs

* tweak helper text

* address review comments
2020-05-27 13:13:31 -04:00
Noah Zinsmeister
b2f0236ee8
Add liquidity callback (#830)
* give add liquidity the reducer treatment

rename setDefaultsFromURL to setDefaultsFromURLSearch

* fix tests and crash

* rework DOM structure to make flow more natural

* allow slippage + deadline setting in add liquidity

* disable token selection in mint

clear input between pairs
2020-05-27 11:42:25 -04:00
Moody Salem
c9721c42bf
perf(reduce call volume): save a bunch of calls to infura when the tab is not focused, change infura IDs for v2 2020-05-26 13:36:09 -04:00
Moody Salem
a0d4710a11
perf(Search modal): performance improvements (#829)
* Search modal performance improvements

* Move more code out of the search modal

* Add the question helper to the search

* Fix a couple lint errors

* Fix the tests, duplicate import text

* Hide the token info on small screens, flex the list

* Fix token sorting, have a link that focuses and shows a tooltip for the search input

* Remove reach tooltip css

* Fix pair balances in the search modal

* Get the arrow working

* Only clear the input when they re-open

* Better way to exclude props

* More small performance tweaks
2020-05-23 12:06:16 -04:00
Moody Salem
ccab6f01cf
More tests for add/remove liquidity and fix the automatic loading of tokens in those pages 2020-05-20 23:11:49 -05:00
Moody Salem
384c3cada4
Add integration test, change ipfs deploy into daily release workflow 2020-05-20 22:31:05 -05:00
Moody Salem
095beae0c2
Refactor ExchangePage into Swap and Send pages (#774)
* Part 1, separate swap and send, move duplicate code into separate files

* Move some more constants out of the swap/send

* Support defaults from URL parameters

* Implement query string parsing via a redux action

* Finish merging the changes

* Fix the slippage warnings

* Clean up some other files

* More refactoring

* Move the price bar out of the component

* Move advanced details and some computations into utilities

* Make same improvements to send

* Approval hook

* Swap page functional with swap callback hook

* Swap/send page functional with swap callback hook

* Fix lint

* Move styleds.ts

* Fix integration test

* Fix error state in swap and move some things around

* Move send callback out of send page

* Make send behave more like current behavior

* Differentiate swap w/o send on send page from swap w/o send on swap page

* Remove userAdvanced which was always false

* Remove the price bar which is not used in the new UI

* Delete the file

* Fix null in the send dialog and move another component out of send

* Move the swap modal header out to another file

* Include change after merge

* Add recipient to swap message

* Keep input token selected if user has no balance and clicks send with swap

* Move the modal footer out of send component

* Remove the hard coded estimated time

* Fix the label/action for swap/sends

* Share the swap modal footer between swap and send

* Fix integration test

* remove margin from popper to suppress warnings

fix missing ENS name recipient link

default deadline to 15 minutes

* ensure useApproveCallback returns accurate data

* clean up callbacks

* extra space

* Re-apply ignored changes from v2 branch ExchangePage file

Co-authored-by: Noah Zinsmeister <noahwz@gmail.com>
2020-05-16 16:55:22 -05:00
Noah Zinsmeister
7bffea0692
update swr hooks when block number changes (#771)
* key per-block SWR data with block number

* fix + tweak copy and decrease sig figs for lp fee

* don't use blocknumber as a key

instead mutate when it changes

* fix totalsupply + user liquidity sync issues

* fix v1 trade checker logic

* rough fix allowing removal of user added tokens

probably needs a more comprehensive overhaul...

* refactor SWR block updates to custom hook

* typo

* fix import error

* fix footer css to work cross-broswer

* disallow \ to be typing into amount inputs

add test case for this

add value assertions to all input integration tests

* fix import error

* remove console.log

* clean up address input a bit

trim whitespace from pasted addresses

* fix input maxing

remove spurious max output logic
2020-05-14 17:12:59 -04:00
Moody Salem
b1ffab1890
Refactors (#772)
* Bunch of refactoring

* Add an integration test that gets as far as swapping

* Drop the nonce code that isn't doing anything right now

* Undo one of the accidental changes to the reducer
2020-05-14 15:56:40 -04:00
Moody Salem
822f9e5fe2
Connect integration tests (#757)
* Connect a testing wallet

* Replace with a funded address

* Fix the balance checking and adding logging
2020-05-13 08:29:54 -04:00
Moody Salem
c365a5ec33
Add some integration tests (#743) 2020-05-11 09:03:44 -04:00
Moody Salem
152e84bc25
Fix more linting errors 2020-05-08 15:46:42 -04:00
Moody Salem
3b3f281319
Use eslint/prettier for typescript files 2020-05-08 14:50:27 -04:00
Moody Salem
2adb0a3dfb
Ts almost everywhere (#736)
* First 2

* More typescript

* More and more

* Almost there

* More

* More typescript

* Fix remove liquidity button

* Make the error chain more readable

* Slippage tabs
2020-05-08 13:48:05 -04:00
Moody Salem
28b24036c6
Cypress (#734)
* Add some basic integration tests and CI in GitHub

* Add push trigger

* Add badge for tests to readme

* Unit tests

* Just use the development infura URL in the tests

* Remove unused webpack config

* Make integration test run on the same port as yarn start

* make test a little bit better

* rename describe
2020-05-08 11:38:33 -04:00