Commit Graph

273 Commits

Author SHA1 Message Date
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