Commit Graph

445 Commits

Author SHA1 Message Date
Noah Zinsmeister
06d6c711dd
closes #94 2021-05-04 14:17:28 -04:00
Moody Salem
24d8b4abc9
latest deploy 2021-05-04 12:23:07 -05:00
Noah Zinsmeister
eaec4a33fc
bump v3 sdk 2021-05-04 10:31:23 -04:00
Noah Zinsmeister
65c51ea4aa
update to latest sdk 2021-04-28 20:17:22 -04:00
Noah Zinsmeister
1cb1ffe2f6
update to latest formatting logic
nits
2021-04-28 17:58:59 -04:00
Noah Zinsmeister
d342ccdb78
use sdk for more calldata 2021-04-27 22:24:29 -04:00
Moody Salem
3a34c2ec25
eth swaps kinda working 2021-04-27 19:20:05 -05:00
Moody Salem
83b0ef94f9
show the worst amounts/prices instead of current price 2021-04-27 13:07:07 -05:00
Moody Salem
7c17cfc642
bump and use the unchecked trade creation method 2021-04-26 12:29:20 -05:00
Moody Salem
a25a72d0d9
use path encoding from v3-sdk 2021-04-26 10:14:21 -05:00
Moody Salem
ac7cf35bb7
missed a spot 2021-04-24 17:43:57 -05:00
Moody Salem
539a6e05e5
don't fetch pool tick data 2021-04-23 11:58:07 -05:00
Ian Lapham
18408c9c75
Increase Liquidity, component cleanup, preview components (#50)
* basic +/- buttons

* start increase liquidity

* fix v3 remove
2021-04-22 22:58:03 -04:00
Moody Salem
62d3aa4b76
update sdk and addresses 2021-04-22 15:54:34 -05:00
Moody Salem
a64d526206
bump v3-sdk version again (fixing core/periphery dependencies) 2021-04-21 14:19:43 -05:00
Moody Salem
69234eb708
bump v3-sdk version 2021-04-21 14:14:18 -05:00
Moody Salem
c55061873c
update the v2-sdk version 2021-04-21 13:06:35 -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
Moody Salem
2d4b60b9dd
Merge branch 'main' into v3-main
# Conflicts:
#	.env
#	README.md
#	package.json
#	src/components/TokenWarningModal/index.tsx
#	src/connectors/index.ts
#	src/constants/index.ts
#	src/hooks/Trades.ts
#	src/index.tsx
#	src/state/claim/hooks.ts
#	src/state/user/hooks.tsx
#	yarn.lock
2021-04-19 11:37:33 -05:00
dependabot[bot]
e4dd4f9283
chore(deps): bump ini from 1.3.5 to 1.3.8 (#1277)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 10:55:13 -05:00
Moody Salem
7798443919
improvement(walletconnect): upgrade the walletconnect connector to 6.1.9 2021-04-19 09:52:41 -05:00
Noah Zinsmeister
9fc096d091
Finish migration (#42)
* start migration (wip)

abstract some add liquidity components

bump deploy version

* add slippage params
2021-04-16 17:35:50 -04:00
Jordan Frankfurt
9f5584c37d
Start Position management, bug fix on add amounts (#40)
* very rough positions/pools data fetching and position list rendering

* fix formatting

* fix loading

* position page routing, bug on add page

Co-authored-by: ianlapham <ianlapham@gmail.com>
2021-04-16 15:33:26 -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
a037595e6e
chunk multicall by gas cost
add useAllV3Ticks
2021-04-02 20:00:28 -04:00
Jordan Frankfurt
c0ce6a55c4
add typechain gen scripts (#36)
add typechain generation for core/periphery contracts
2021-03-30 03:51:37 -04:00
Ian Lapham
878fc9cf4d
Refactor with core (#33)
* Update index.ts

* feature(service worker): add offline support (#1319)

* Revert "feature(service worker): add offline support (#1319)" (#1320)

This reverts commit 34dfb41a1e0a647596c5d37d5e3f7baa6c4005a3.

* Revert "Revert "feature(service worker): add offline support (#1319)" (#1320)" (#1321)

This reverts commit db3328c8d9d7ea7b7cf7e75dc658714798d007a4.

* unregisters all installed service workers (#1322)

* fix: modals stealing focus across frames (#1326)

* improvement(lists): add BA SEC tokens to unsupported list  (#1327)

* show hidden search results by default

* update break styles

* optimize filter, use debounce on input

* increase debounce time

* add ba association list

* handle dismiss (#1328)

* split up sdk use between core and v2

* Fix code style issues with ESLint

* remove service worker

Co-authored-by: Moody Salem <moodysalem@users.noreply.github.com>
Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: Hyperion <72735936+moontools-hyperion@users.noreply.github.com>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
2021-03-23 21:45:58 -04:00
Jordan Frankfurt
32e679c62e
prototype position data hook (#32)
Co-authored-by: Jordan Frankfurt <layup-entropy@protonmail.com>
2021-03-23 20:18:52 -04:00
Jordan Frankfurt
71db11b6ac
Revert "Revert "feature(service worker): add offline support (#1319)" (#1320)" (#1321)
This reverts commit db3328c8d9d7ea7b7cf7e75dc658714798d007a4.
2021-02-18 13:10:53 -05:00
Jordan Frankfurt
db3328c8d9
Revert "feature(service worker): add offline support (#1319)" (#1320)
This reverts commit 34dfb41a1e0a647596c5d37d5e3f7baa6c4005a3.
2021-02-18 13:03:32 -05:00
Jordan Frankfurt
34dfb41a1e
feature(service worker): add offline support (#1319) 2021-02-17 14:43:49 -05:00
Jordan Frankfurt
0ec6cad6d1
Revert "fix(storybook): remove it for now" (#9)
fix rebass types to work with storybook
2021-02-16 17:33:55 -05:00
Jordan Frankfurt
eb850cff0b
remove husky/pretty-quick (#8)
Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@github.com>
2021-02-16 13:45:36 -05:00
Jordan Frankfurt
4e17107ac5 upgrade prettier 2021-02-16 03:34:45 -05:00
ianlapham
333c907e63 remove stories 2021-02-15 17:19:21 -05:00
Ian Lapham
ba647d9d6c
Merge pull request #4 from Uniswap/upgrade-react
bump react
2021-02-15 11:59:59 -05:00
Jordan Frankfurt
bf9dad2550 bump react 2021-02-14 05:41:46 -05:00
Jordan Frankfurt
5fabe438e5 upgrade prettier 2021-02-14 03:07:58 -05:00
Jordan Frankfurt
98e77cb01b fix(storybook): remove it for now 2021-02-13 03:28:56 -05:00
ianlapham
b05c4c111c add start of chart component 2021-02-12 16:15:02 -05:00
Jordan Frankfurt
619c7c2d95 feature(storybook): first pass at storybook integration 2021-02-12 15:32:25 -05:00
Jordan Frankfurt
5c3c1c67f5
run npx browserslist@latest --update-db (#1303) 2021-02-09 11:49:51 -05:00
Ian Lapham
2291e3ec20
improvement(lists): enable Gemini by default (#1276)
* update import flow and style tweaks

* update tests

* Update tsconfig.json

* add gemini

* enable gemini
2021-01-21 17:34:15 -07:00
Moody Salem
ab8ce37ceb
fix(token lists): update to latest token-lists 2020-12-10 16:18:18 -06:00
Moody Salem
48eab0d0ac
bump token lists 2020-11-11 09:40:53 -06:00
Moody Salem
4f922a2824
fix(token lists): bump token list spec version (allowing lists up to 10k tokens) 2020-09-29 11:50:32 -05:00
Moody Salem
03913d9c0b
UNI 2020-09-24 11:29:31 -05:00
Moody Salem
f33bba2176
chore(token lists): Bump token lists spec version 2020-09-01 11:37:53 -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
377c71f2e5
bump to latest token lists version 2020-08-26 08:48:59 -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
0f91af1df2
improvement(swap): Better swap errors for FoT (#1015)
* move the gas estimation stuff into its own hook and report errors from the gas estimation

* fix linter errors

* show the swap callback error separately

* rename some variables

* use a manually specified key for gas estimates

* flip price... thought i did this already

* only show swap callback error if approval state is approved

* some clean up to the swap components

* stop proactively looking for gas estimates

* improve some retry stuff, show errors inline

* add another retry test

* latest ethers

* fix integration tests

* simplify modal and fix jitter on open in mobile

* refactor confirmation modal into pieces before creating the error content

* finish refactoring of transaction confirmation modal

* show error state in the transaction confirmation modal

* fix lint errors

* error not always relevant

* fix lint errors, remove action item

* move a lot of code into ConfirmSwapModal.tsx

* show accept changes flow, not styled

* Adjust styles for slippage error states

* Add styles for updated price prompt

* Add input/output highlighting

* lint errors

* fix link to wallets in modal

* use total supply instead of reserves for `noLiquidity` (fixes #701)

* bump the walletconnect version to the fixed alpha

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2020-08-06 18:18:43 -05:00
Moody Salem
3050e967f7
fix(token lists): automatic updates to token lists 2020-07-30 18:32:14 -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
365b429c0b
feat(token lists): implement the uniswap default list as a token list (#983)
* load tokens from url `useTokenList`

* improve performance of the loading

* move the loading to redux and save loaded lists

* lint error

* move the list fetching code to a separate component

* change how token lists are fetched to use the updater and add unit tests

* fix a crash with currencyEquals

* bump sdk version

* token lists should automatically update for minor/patch changes

* nit

* show popups for list updates

* support pointing at localhost

* spuport ipfs/ipns logos

* use the updater to bump list versions

* save the old/new list in the popup for viewing diffs

* improve the list popup

* fix linter error, make sure visibility checking is working

* show list update notifications

* address a couple metamask warnings, linter error

* fix the custom added/default tokens

* refactor some popup stuff to reuse the fader

* linter error

* Revert: refactor some popup stuff to reuse the fader (a7b0f752)

* style improvements, linter

* add to the readme, drop the token-request template

* back to the beta that works with wallet connect

* get the dependencies to a state that works with wallet connect and passes integration tests
2020-07-25 10:41:03 -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
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
Ian Lapham
795caac4fd Wallet Support with web3-react v6 (#514)
* basic support for desktop and mobile, with or without web3

* stable before mobile view update

* mobile modal views

* remove unused modules

* create global context for wallet modal, update to click button to connect

* first pass

* drag with react pose

* try without pose

* replace context with new syntax, basic setup

* stable version on all browser types

* remove dev flags

* fix swap broken

* update to clickable connect button if logged out

* stable, good entry

* fix bugs, exit animations

* prep for merge

* stable version with updated application context

* update animations with correct gesture package

* refactor wallet logic to multi-root

* small fixes

* Style Updates

* remove unused imports

* refactor wallet page
2019-11-25 17:56:31 -05:00
Noah Zinsmeister
ecd7175315
improve network connectivity (#441) 2019-09-06 19:15:22 -04:00
Callil Capuozzo
da22c6d69a Style token modal and toggle switch (#413) 2019-08-13 14:42:32 -04:00
Ian Lapham
677537ca31 Updates to Token Modal (#399) 2019-08-12 20:37:32 -04:00
Noah Zinsmeister
be2012cdf5
fix deprecated switch component (#409) 2019-08-12 19:19:03 -04:00
Callil Capuozzo
c28884f44b Add theme toggle and footer (#400) 2019-08-07 14:58:29 -04:00
Noah Zinsmeister
2431e26599
add tokens, do some summer cleaning (#368)
* fix suppressClassNameWarning

* remove .md

* update dependencies

* add MLN

closes #367

* add DIP

closes #359
2019-07-23 13:50:31 -04:00
Noah Zinsmeister
09c77bef4c
update dependencies 2019-07-11 10:29:56 -04:00
Noah Zinsmeister
b7f49672de
merge beta to production (#317)
* update SNX exchange and token address (#301)

* update SNX exchange and token address

* checksum exchange address

* Account improvements (#302)

* begin account migration

* prep for styling

* improve multi-network support

allow deprecated window.web3 providers

* kill old modal

* remove tests

* clean up css

* Style account modal

* kill scss

* bug fixes

* use suspense for code-splitting and i18n

move abis

add ENS support to Web3Status

* Account modal mobile styles

* style tweaks

* finalize migration

* fix account styling

* fix ethereum svg

* fixes

* Split wallet modal into components

* refactor wallet modal and add connect button styles

* removing tap highlights

fix spacing on some mobile browsers

* Styling fixes for account and warning

* clean up injected connector logic

* remove console

* add wrong network copy

* restore border radius

change wallet logo

* various improvements (#313)

* add unchecked signer

* remove focus underline from tabs

* update tokens

* remove console log

* remove snx for now

* make slippage warnings more robust

* memo-ize contexts

* improve slippage styling

* fix warnings + bugs

* clear stale network error

* Feather icons (#314)

* Remove fontawesome

* Update new SNX exchange and new token address (#316)

* Update new SNX exchange and new token address

* remove whitespace

* checksum exchange address
2019-05-30 16:42:25 -04:00
Noah Zinsmeister
e27cd92cd2
Slippage warning (#292)
* add rudimentary slippage warning

fix address checksum bug

debounce address input

alway show tx details if valid trade

* fix estimated copy
2019-05-16 13:21:14 -04:00
Noah Zinsmeister
2f0e2fb234
Beta cleanup (#285)
* improve context logic

* fix font-variant

* add dependencies for later

* fix icon
2019-05-14 10:19:09 -04:00
Noah Zinsmeister
78cdf11b37
Liquidity migration (#279)
* finalize initial migration

* remove redux

* fix token to token rate bug

* finalize initial migration

* fix test
2019-05-07 22:25:55 -04:00
Noah Zinsmeister
44d77ce948
Swap Migration (#277)
* migrate core logic

* finalize swap migration

* upgrade react-scripts and fix errors/warnings

* finalize swap, modularize currency input

* remove console.logs

* copy swap logic for send

* remove unnecessary variable

* tighten caching logic

* snappier ens integration
2019-05-03 16:37:59 -04:00
Noah Zinsmeister
4e413915f8
web3-react migration (#269)
* put suspense below redux

* don't mount qr

* properly format .json's

* remove useless Web3Connect component

* remove react-responsive header logic

* finalize initial web3-react migration

* add rudimentary network support

* address ci/cd issues

* fix syntax

* add infura support

rewrite create-exchange

closes #173

* remove CI flag, lazy loaded disabled for now

* roll back /pool

* fix currency input errors

fix valid state of buttons

* fix nav

* obscure env variables

* fix mobile header bug
2019-04-25 12:12:47 -04:00
Noah Zinsmeister
f855706f0d
update i18n; kinda fix tests; remove stale dependencies (#266) 2019-04-15 20:06:39 -04:00
Noah Zinsmeister
fff0718404
add travis support; clean up public/ 2019-04-15 14:05:54 -04:00
Noah Zinsmeister
71376cf7db
set up eslint and prettier; run prettier 2019-04-15 12:56:40 -04:00
Noah Zinsmeister
093c4c0c21
update dependencies 2019-04-15 12:06:54 -04:00
Noah Zinsmeister
1dadec3179
prep for netlify integration 2019-04-15 11:14:03 -04:00
maggie-5miles
520b9a58d6 i18n support 2019-01-11 19:24:20 -05:00
Chi Kei Chan
f87aa671a3
Normalize token decimals before calculating exchange rate (#129) 2018-11-12 11:29:26 +08:00
Chi Kei Chan
7db118e841 Add GA 2018-10-28 04:05:08 -07:00
Chi Kei Chan
6b5621fe29 Remove Drizzle; Header MediaQuery 2018-10-27 16:43:16 -07:00
Chi Kei Chan
c3123a49e1 Get token balance 2018-10-10 03:16:57 -07:00
Chi Kei Chan
bab0217d6c Add Drizzle to manage web3 and smart contracts call 2018-10-10 03:16:57 -07:00
Chi Kei Chan
06bb5a954c Add transition to route changes 2018-10-10 03:16:57 -07:00
Chi Kei Chan
c524f613f0 Add dialog for when web3 is not found 2018-10-10 03:16:57 -07:00
Chi Kei Chan
c51eae9fd3 Connect to Web3 and get current wallet address 2018-10-10 03:16:57 -07:00
Chi Kei Chan
1d86c0d656 Add Token Select Modal 2018-10-10 03:16:57 -07:00
Chi Kei Chan
e0cc2b59d1 Add Header 2018-10-10 03:16:57 -07:00
Chi Kei Chan
6b894511c4 Add React Router to home page 2018-10-10 03:16:57 -07:00
Chi Kei Chan
f97155d6b3 Add Sass and create pages directory 2018-10-10 03:16:57 -07:00
Chi Kei Chan
5ef5135bff Update .gitignore 2018-10-06 13:14:27 -07:00
Callil Capuozzo
c6457bbfb8 Add cookies to store app state
also store transaction history to review. Next step - listing
transaction status.
2018-01-22 15:08:19 -05:00
Callil Capuozzo
f570c4686a Add UX features
Detect all metamask states
UX for approve transactions
UX for getting more ETH from faucet
UX for submitted transactions
Toggle about
2018-01-22 14:05:22 -05:00
Hayden Adams
6101352e25 add github pages dependency and CNAME 2018-01-20 21:28:50 -05:00
Callil Capuozzo
a9b8740734 Initial design & interactions
Began porting some function and state names to more generic descriptors
like inputToken & outputToken thats align more closely with the
proposed UX model in this design. Needs discussion.
2018-01-18 14:11:51 -05:00