Commit Graph

87 Commits

Author SHA1 Message Date
Moody Salem
875203f0ef
fix(responsiveness): small tweaks for mobile 2020-07-06 21:26:38 -04:00
Moody Salem
9ec16c2ba8
actually add the inter-ui dependency 2020-06-30 16:47:16 -04:00
Noah Zinsmeister
0fc0cba6de
bump walletconnect 2020-06-25 10:17:49 -04:00
Noah Zinsmeister
678cd1a06f
upgrade to walletconnect v1 (#903) 2020-06-23 16:18:04 -04:00
dependabot[bot]
631f29d66d
chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 (#873)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-08 10:04:57 -04:00
Noah Zinsmeister
e667615449
support proposed new FoT-capable methods (#866)
* support new FoT-capable methods

short-circuit modal footer rendering if no trade

improve clarity of tx modal flow

* update router address + ABI
2020-06-05 18:40:02 -04:00
Moody Salem
98d25dd2af
perf(cleanup): remove the material ui dependency for the input range 2020-05-30 21:22:59 -04:00
Moody Salem
73d3df05f2
perf(network connector): use an inline network connector until improved connector is pushed upstream 2020-05-30 02:03:02 -04:00
Moody Salem
9c1fe53e4b
perf(ethereum): reduce number of calls by batching all polling node calls (#840)
* initial refactoring

* rebase lint error

* start implementing reducer

* multicall reducer

* working multicall!

* clean up performance, re-fix annoying error

* use multicall everywhere

* use multicall for balances

* fix lint warning

* Use checksummed address

* Fix strict warning

* get it to a working state with the more generic form

* convert useETHBalances

* Remove the eth-scan contract completely

* Remove the eth-scan contract completely more

* Default export

* Put the encoding/decoding in the methods that can do it most efficiently

* Avoid duplicate fetches via debounce

* Reduce delay to something less noticeable

* Return null if pair reserves are undefined to indicate it does not exist
2020-05-28 21:17:45 -04:00
Moody Salem
6926f9a4ae
fix(flatMap): don't use the native flatMap function, bump release plugin version 2020-05-27 09:29:53 -04:00
Moody Salem
7b9b332c42
fix(popover): ios safari not showing the popover 2020-05-25 01:39:50 -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
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
Moody Salem
1380f865a9
Place tooltips better on smaller screens 2020-05-16 10:44:26 -04:00
Moody Salem
0733cdd63c
Fix trade routing to not throw 2020-05-13 19:57:12 -04:00
Moody Salem
9006acb4c5
Balances rewrite (#761)
* Create the wallet store

* Get the updater completed

* Code complete

* Fix token balance bug

* Fix another bug in the hooks

* Final bug fix, blockNumber can be undefined

* Formalize the fact that block number can be undefined

* Woops add package

* Add more info to errors

* Replace balances in the v1 methods with the new ones

* Only return a balance value if it's present

* Address comments

* Trigger updateVersion before anything else
2020-05-13 16:36:45 -04:00
Moody Salem
1e1a049990
Add more unit tests to utils 2020-05-13 14:24:03 -04:00
Moody Salem
c9db5fb276
Change slippage calculation in trade page as discussed (#756)
* Change slippage calculation in trade page as discussed

* Revert test change

* Fix the missing import
2020-05-13 13:59:54 -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
19a53cd999
Rewrite localstorage context (#749)
* Rewrite the local storage context into a redux store for user data

* Separate out the mega methods

* Fix infinite loop

* Missing dependency

* Missing dependency, rename version field
2020-05-12 14:46:58 -04:00
Moody Salem
6da8e2c84d
Introduce redux for one of the state stores (#742)
* Introduce redux for one of the state stores

* Remove unused state

* Clean up hooks

* Add types for react-redux and fix error from any type on useSelector

* Strongly type the web3 provider

* Make the popup content into a POJO

* Lint errors

* Clean up method call

* Fix lint error

* Fix lint error

* Lint
2020-05-11 18:23:01 -04:00
Noah Zinsmeister
d40d81ca6a
noah changes (#739)
* remove duplicated prettier from dependencies

* use swr for allowances

* slight improvements to error cascading

* fetch totalsupply with SWR

fetch pairs with SWR (except persistent pairs, will be refactored later)

* fix lint error

* stop using pair context, instead store per-user pairs in local storage

* add more pairs to the default list

remove unnecessary isWETH

fix lint error

* add more bases to trade consideration

* fix lint warnings

* get SWR data on same schedule

* don't pass value if it's 0

fix WETH equality checks

* clean up fixed/significant formatting

* fix slippage calculation bug in swap

add slippage to remove

* fix token logos

* show fewer sig figs

* lint error

* remove unused signer

* add calculateSlippageAmount safety check and tests

* fix useAllBalances type

stop spuriously sorting token amounts of different tokens

use slightly better comparisons for slippage calculations

* improve priceSlippage comparison logic

* useReserves -> usePair

* use checksum for DAI logo address
2020-05-11 16:39:05 -04:00
Moody Salem
843d5e790a
Done with linter errors! 2020-05-08 18:32:36 -04:00
Moody Salem
3b3f281319
Use eslint/prettier for typescript files 2020-05-08 14:50:27 -04:00
Moody Salem
86fa969d6b
Types for react-router-dom, stop lazy loading each route (#735)
* Types for react-router-dom, stop lazy loading each route

* Couple small fixes to README.md
2020-05-08 12:05:52 -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
Moody Salem
a1a9d9f041
Type safety for styled components (#733) 2020-05-08 11:24:47 -04:00
Noah Zinsmeister
cb00e0baa5
migrate full away from ethers v4 to v5 (#728)
move some pacakges from dependencies to dev dependencies

bump versions
2020-05-07 19:53:08 -04:00
Moody Salem
7fcecc22d9
TS migrations and commit hash in code link (#730)
* TypeScript in the utils directory, README fixes

* Remove unused methods

* Added unnecessary space

* Some env variable cleanup

* Bug in change

* Another file to ts

* App.tsx

* Header and Footer to tsx

* Few more TS migrations and add a commit hash title to the uni icon

* Few more TS migrations and put commit hash in code link

* Splitting up files

* Splitting up files (merged dark mode changes)
2020-05-07 18:52:26 -04:00
Moody Salem
b6b094acb3
remove unused functions, typescript (#725)
* TypeScript in the utils directory, README fixes

* Remove unused methods

* Added unnecessary space

* Some env variable cleanup

* Bug in change

* Another file to ts
2020-05-07 14:36:26 -04:00
Noah Zinsmeister
64dd09f2cc
update to latest deploy (#712) 2020-05-05 16:36:22 -04:00
Ian Lapham
6fd9808e7d
Style updates merge with storage updates (#710)
* Add advanced user toggle

* UX stuff

* Remove unused imported checks

* Design tweaks and selection card

* remove unused imports

* Cleanup

* fix merge

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2020-05-04 20:21:55 -04:00
Ian Lapham
3f1d7ab310
add basic structure for advanced mode (#703)
* add basic structure for advanced mode

* auto dismiss popup

* Remove test code

* remove shadow

* Update advanced section, ui tweaks, balances back inline

* fix memory leak

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2020-04-30 21:14:29 -04:00
Ian Lapham
006fe9b325
Updated context keys, remove logs (#680)
* updated keys in pair context

* fix bug on imported liquidity

* Add price bar and spacing tweaks

* Header tweaks

* Base for token import, query params, styling updates

* remove unused imports

* query params, create flow

* set ETH as default for create

* Style tweaks and price bar location

* add mobile popups, mobile styling on header

* updated mobile styles

* style updates mobile, fix build

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2020-04-22 17:22:13 -04:00
Ian Lapham
eaf8d5a39c
Add routes through ETH (#665)
* add fix for ETH balance fetching

* add tokens to other testnets

* update with Exchange -> Pair

* routes throuh ETH

* fix logs

* fix conflict
2020-03-26 12:42:06 -04:00
ianlapham
6211dff044 typed pages 2020-03-20 16:03:23 -04:00
ianlapham
2ca3bf8da3 add slider to remove 2020-03-05 22:57:41 -05:00
ianlapham
236c3030e1 stable state for swaps, add, and remove eth (no remove token token yet) 2020-03-04 13:48:43 -05:00
ianlapham
753e5f3423 stable version with updated balances, add liquidity using SDK, pair menu search 2020-02-26 12:00:59 -05:00
Noah Zinsmeister
a13efac66b
bump ethers version (#623) 2020-02-02 17:23:42 -05:00
Noah Zinsmeister
c84f7c9159
lockfile update 2020-01-29 19:01:28 -05:00
Ian Lapham
8290cf565f update market rate calculation and input parsing for 0 decimal tokens (#601)
* update market rate calculation and input parsing for 0 decimal tokens

* remove style bump and revert tokens
2020-01-21 17:54:17 -05:00
Noah Zinsmeister
61ae7119a9
address spam (#587) 2020-01-06 19:47:23 -05:00
Noah Zinsmeister
e92c8ed5e8 web3-react improvement (#581)
* fix SC errors

* improve unsupported chain id error

* bump yarn.lock
2019-12-31 15:30:43 -05:00
Noah Zinsmeister
a87ffbee7c
version bump (#575) 2019-12-23 16:28:10 -05:00
Noah Zinsmeister
22e859bea5
bump injected connector version (#538) 2019-12-06 11:40:30 -05:00
Noah Zinsmeister
fb4b4fd3e2
fix dapp browsers hanging 2019-12-05 16:58:30 -05:00
Noah Zinsmeister
790fe3f327
hot fix for dapp browsers 2019-12-05 16:29:53 -05:00
Ian Lapham
794bbd88b2 Update to loading state for injected desktop browsers (#532)
* update injected loading state

* update styles

* update injected connector

* center spinner
2019-12-05 14:58:22 -05:00
Ian Lapham
015c9f8598 Hosted wallets (#528)
* formnatic setup

* stable with new hosted

* stable version, fortmatic and portis

* fix safari bug

* cleanup

* add white version of arrow

* update options to tabbable buttons

* update injected version

* style tweaks

* style tweaks, remove portis connector
2019-12-04 17:31:56 -05:00