Compare commits

...

1043 Commits

Author SHA1 Message Date
aballerr
4529e3cc88 fix: failing cypress test (#5715)
* fix failing cypress test for 404 page
2022-12-16 16:49:23 -05:00
Mike Grabowski
4d47470f33 feat: not found page (#5708)
* chore: save

* save

* chore: finish

* chore: Fix link

* chore: remove div

* chore: tweaaks

* chore: tweaks
2022-12-16 11:21:29 -05:00
eddie
aedc020646 fix: use render function for SearchBar placeholder translation (#5710)
* fix: use render function for SearchBar placeholder translation

* fix: use render function for SearchBar placeholder translation

* fix: correct clsx usage
2022-12-16 11:07:42 -05:00
Zach Pomerantz
fd8085722e fix: mark permit not syncing if not permitted (#5706)
* fix: mark permit not syncing if not permitted

* fix: clarify naming

* fix: show approval when loading
2022-12-15 13:09:39 -08:00
Mike Grabowski
a60a85db54 fix: layout padding/margin & overflow (#5707)
* chore: fix

* chore: tweaks
2022-12-15 15:34:39 -05:00
eddie
ad2472eac6 fix: correct color for selected token in CurrencySearchModal (#5705)
Co-authored-by: Eddie Dugan <eddie.dugan@UniswapdieDugan.localdomain>
2022-12-15 15:14:16 -05:00
eddie
f4d4acacae fix: constrain width on token details back button (#5703)
Co-authored-by: Eddie Dugan <eddie.dugan@UniswapdieDugan.localdomain>
2022-12-15 14:46:04 -05:00
lynn
a5d7af192c fix: Web 1610 token details another funky state chart re prices (#5685)
* initial commit

* fixes

* move msg loc depending on display price avail

* fred copywriting + jordan comments changes

* fix build errors

Co-authored-by: cartcrom <cartergcromer@gmail.com>
2022-12-15 14:23:03 -05:00
Zach Pomerantz
21a2863ae3 build: default flags but maintain togglability (#5702)
fix: default flags but maintain togglability
2022-12-15 10:56:06 -08:00
Zach Pomerantz
1f871d4e73 build: upgrade widget to 2.22.11 (#5701) 2022-12-15 10:49:31 -08:00
Vignesh Mohankumar
3690936aff chore: remove landing page flag (#5673) 2022-12-15 13:48:50 -05:00
Vignesh Mohankumar
e95e2321b4 fix: used sticky position for landing page content (#5699)
* fix: update padding to 80px on mobile landing

* try 100

* try 120

* 140

* try sticky
2022-12-15 13:29:55 -05:00
Zach Pomerantz
8b1bf09ff1 fix: await syncing allowance to update permit state (#5689)
* fix: await syncing allowance to update permit state

* fix: clarify isSyncing on Permit2

* fix: further clarify isApprovalSyncing
2022-12-15 09:48:18 -08:00
aballerr
6383e9e4bf fix: reverting some changes to wallet dropdown (#5694)
reverting some changes to wallet dropdown cypress tests
2022-12-15 12:15:44 -05:00
Vignesh Mohankumar
515ce9253d fix: add more padding-bottom on mobile landing page (#5696) 2022-12-15 11:06:17 -05:00
Vignesh Mohankumar
23ed384802 fix: Revert "fix: allow landing page scroll" (#5697)
Revert "fix: allow landing page scroll (#5692)"

This reverts commit 642c489240.
2022-12-15 11:05:53 -05:00
Mike Grabowski
9ae31aa26e build: update name for revert github action (#5693)
chore: update name for revert github action
2022-12-15 07:50:46 -08:00
Vignesh Mohankumar
642c489240 fix: allow landing page scroll (#5692) 2022-12-15 10:32:13 -05:00
aballerr
778ea8ee42 test: adding in some basic token tests (#5686)
* adding in some basic token tests
2022-12-15 10:16:15 -05:00
Vignesh Mohankumar
36900fe6c6 test: skip wallet dropdown tests (#5691) 2022-12-15 09:55:55 -05:00
Vignesh Mohankumar
40eb28f1e1 build: change cypress timeout to 24s (#5690) 2022-12-15 09:29:47 -05:00
Mike Grabowski
7c3ee78715 chore: replace deprecated colors with correct theme values [part 1] (#5563)
* chore: replace colors

* add missing line

* chore: fix lint after replacing colors

Co-authored-by: Vignesh Mohankumar <vignesh@vigneshmohankumar.com>
2022-12-14 16:46:56 -05:00
Vignesh Mohankumar
ccac51ec1f chore: turn landing page flag on (#5684)
Revert "chore: turn landing page flag off (#5679)"

This reverts commit 0176c74430.
2022-12-14 16:19:47 -05:00
Jack Short
77747f9f6f style: updating bag (#5539)
* style: updating bag

* desktop bag

* initial setup

* bag animations

* mobile stylings

* removing vanilla extract components

* background position

* design comments

* screen sizing

* closing filters and bag on appropriate screen sizes

* move screen size to main hooks

* prettier

* bag margins

* footer outline

* correct scrolling indicator width

* collection stats truncation

* merged with main

* collection stats on screen
2022-12-14 13:27:41 -05:00
Vignesh Mohankumar
0622ff30f6 fix: remove learn more link on landing page (#5683)
* fix: remove learn more link on landing page

* lowercase
2022-12-14 12:09:14 -05:00
aballerr
982c99b07f chore: Nft cypress tests 2 (#5658)
* adding in final set of nft cypress tests
2022-12-14 10:09:55 -05:00
aballerr
484a7d49f6 fix: allow empty states on days in listing (#5675)
allow empty states on days
2022-12-14 09:23:36 -05:00
lynn
082591d5dd fix: jumpy nav on safari mweb (#5668)
* test

* swap page nav bar on mobile looks weird without this change

* fixes
2022-12-14 08:56:36 -05:00
Zach Pomerantz
aa03f97890 build: add a revert workflow (#5680) 2022-12-13 17:29:02 -05:00
Zach Pomerantz
fd12a0d6e7 fix: display impact before severity (#5678) 2022-12-13 16:43:06 -05:00
Vignesh Mohankumar
0176c74430 chore: turn landing page flag off (#5679) 2022-12-13 16:39:35 -05:00
Vignesh Mohankumar
35613cc979 feat: amplitude analytics for landing and about (#5606)
* add events - no names yet

* lint fix

* events

* link

* more into card

* fix

* switch
2022-12-13 15:54:21 -05:00
Jack Short
b0d71f10e9 chore: adding useScreenSize hook (#5669)
* feat: adding useScreenSize hook

* updating isTablet

* adding comments
2022-12-13 14:22:24 -05:00
Vignesh Mohankumar
1cfb3d8034 feat: release new landing page (#5596)
* feat: release new landing page

* fix wallet dropdown integration tests

* remove problematic/not useful tests

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
2022-12-13 13:40:56 -05:00
Zach Pomerantz
a650807c96 fix: correctly center navbar els (#5676) 2022-12-13 13:17:48 -05:00
Vignesh Mohankumar
6efd7ca779 build: re-start scheduled builds (#5674)
Revert "build: pause scheduled releases (#5615)"

This reverts commit 185c1f6772.
2022-12-13 12:32:43 -05:00
aballerr
d658720505 chore: initial set of cypress tests for nft (#5590)
* initial set of cypress tests for nft
2022-12-13 11:43:02 -05:00
Zach Pomerantz
bba40846e1 build: upgrade widget to 2.22.10 (#5666) 2022-12-12 15:54:40 -05:00
pp-hh-ii-ll
8fa6c87015 fix: responsive styles for steps (#5651)
* feat: styled footer links

* grid

* center

* Update bottom links and full bleed image

* Mobile spacing and font size adjustments

Decrease spacing in mobile and swap the sizing of fonts between mobile and desktop sizes

* Add responsive behavior to steps

Changes font size and margins in mobile view

Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2022-12-12 15:35:06 -05:00
pp-hh-ii-ll
933d02b275 fix: responsive styling for info buttons (#5652)
Responsive styling for info buttons

Reduces margins and font size in mobile view
Adds some margin to the side of the external-link arrow

Co-authored-by: Vignesh Mohankumar <vignesh@vigneshmohankumar.com>
2022-12-12 14:59:23 -05:00
Zach Pomerantz
7738a6b9e0 fix: vertically center-align navbar items (#5664) 2022-12-12 14:50:21 -05:00
Vignesh Mohankumar
2db4b1da3d fix: remove period on landing page title (#5663) 2022-12-12 14:22:25 -05:00
Zach Pomerantz
06c85b744f fix: show error when present (not approval) (#5662) 2022-12-12 13:51:38 -05:00
Callil Capuozzo
aa29ea80a9 fix: tweak landing page buttons (#5661)
* Tweak landing details

* flex

Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-12-12 13:45:28 -05:00
pp-hh-ii-ll
3613dc2d4a style: add transition to button and move gradient up (#5660)
Add transition to button and move gradient up

Moves gradient up to obscure more of the swap box
2022-12-12 13:33:22 -05:00
pp-hh-ii-ll
e22554b4c4 fix: responsive styling for info button (#5659)
Responsive styling for info button

Decreases gap and font size and adds margin to external link arrow icon
2022-12-12 12:55:25 -05:00
pp-hh-ii-ll
5f1625f5dc fix: update outline button to use non-deprecated colors (#5657)
Update outline button to use non-deprecated colors

Quick fix for about page – full refactor to come later
2022-12-12 11:48:01 -05:00
pp-hh-ii-ll
c1e6dd7335 fix: Add hover state to footer link (#5656)
* Add hover state to footer link

* Update hover outline to textTertiary

Don't use deprecated color
2022-12-12 11:45:46 -05:00
pp-hh-ii-ll
45419c2739 fix: responsive behavior for info cards (#5655)
Responsive behavior for info cards

Decreases margin, font size, card height, and grid gap in mobile
2022-12-12 11:40:09 -05:00
Mike Grabowski
c2342a86d6 fix: pointer events on Swap (#5654)
* feat: decouple landing from swap

* implement pointer events
2022-12-12 11:23:55 -05:00
Zach Pomerantz
504cd5b848 build: bump widgets/universal-router-sdk (#5582)
* build(deps): bump @uniswap/widgets from 2.22.0 to 2.22.2

Bumps [@uniswap/widgets](https://github.com/Uniswap/widgets) from 2.22.0 to 2.22.2.
- [Release notes](https://github.com/Uniswap/widgets/releases)
- [Changelog](https://github.com/Uniswap/widgets/blob/main/.releaserc.json)
- [Commits](https://github.com/Uniswap/widgets/compare/v2.22.0...v2.22.2)

---
updated-dependencies:
- dependency-name: "@uniswap/widgets"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* build(deps): bump @uniswap/widgets to 2.22.5

* fix(snyk): ack oz vulns

* build(deps): bump @uniswap/widgets to 2.22.9

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-12 11:21:22 -05:00
Vignesh Mohankumar
1faf13639c feat: styled footer links (#5644)
* feat: styled footer links

* grid

* center

* Update bottom links and full bleed image

* Mobile spacing and font size adjustments

Decrease spacing in mobile and swap the sizing of fonts between mobile and desktop sizes

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
Co-authored-by: pp-hh-ii-ll <111304124+pp-hh-ii-ll@users.noreply.github.com>
2022-12-12 11:18:58 -05:00
Vignesh Mohankumar
69c084ebe7 fix: full bleed about banner (#5650)
* fix: full bleed about banner

* add px
2022-12-12 11:12:59 -05:00
Zach Pomerantz
e5ac7e77da fix: observe submitted allowance immediately (#5620)
Fixes a bug where a user could submit a transaction, but would be required to re-sign a permit for a subsequent transaction, because the prior transaction's modification of allowance was not detected.
2022-12-12 11:02:12 -05:00
Vignesh Mohankumar
0614358a5e feat: close landing page when wallet connected (#5639) 2022-12-12 10:39:38 -05:00
pp-hh-ii-ll
42784e6121 fix: update card images (#5649)
update card images

Update card images to improve legibility
2022-12-12 10:37:58 -05:00
Vignesh Mohankumar
830500dc3b fix: use background-size cover for about banner (#5641) 2022-12-12 10:36:41 -05:00
Vignesh Mohankumar
5af32592aa fix: about button copy change (#5638) 2022-12-12 09:36:02 -05:00
Vignesh Mohankumar
0f36a99e98 fix: remove period in about copy (#5643) 2022-12-12 09:29:01 -05:00
Callil Capuozzo
5fe9f3f6e8 fix: add light mode images and gradient mask (#5640)
* add light mode image and gradient mask

* fix-image-bleed

* clean up

* rm todo
2022-12-11 21:21:04 -05:00
Vignesh Mohankumar
167fff16a0 fix: remove period in landing page copy (#5637) 2022-12-11 18:33:36 -05:00
Vignesh Mohankumar
a6eff7823a fix: make background header a background-image (#5635)
* fix: make background header a background-image

* fit differently
2022-12-11 17:37:50 -05:00
Mike Grabowski
1aba4fbcd7 feat: add glow to landing page (#5636)
* chore: adjust z-index on the linear gradient

* feat: add blur

* fix: heights and paddings

* chore: abstract values into sep variable

* chore: remove bg

* chore: tweaks
2022-12-11 17:30:58 -05:00
Vignesh Mohankumar
714d215cda feat: add about card backgrounds (#5634)
* fix: update landing page paddings

* feat: add about card backgrounds

* fix
2022-12-11 17:30:45 -05:00
Vignesh Mohankumar
0f32ed34f7 fix: update landing page paddings (#5633) 2022-12-11 14:49:16 -05:00
Vignesh Mohankumar
3703e843f8 fix: improve mobile spacing/ordering on /about (#5632) 2022-12-11 14:42:32 -05:00
Vignesh Mohankumar
3c3158f443 fix: update landing page paddings (#5630)
* fix: update landing page paddings

* button gap
2022-12-11 14:33:41 -05:00
Vignesh Mohankumar
f933e538e6 feat: add background image to /about (#5623)
* feat: add background image to /about

* 100% height
2022-12-11 14:33:09 -05:00
Vignesh Mohankumar
02b678b4a9 fix: centers /about Panels (#5631)
fix: centers about Panels
2022-12-11 14:30:36 -05:00
Vignesh Mohankumar
c25a2cfc00 fix: show swap hover state on landing page (#5629)
* fix: body, #root, AppWrapper and BodyWrapper height: 100%

* fix: show swap hover state on landing page

* pointer events fix

* revert gradient change

* pointer events auto

* pointer events auto
2022-12-11 14:29:23 -05:00
Vignesh Mohankumar
a5d75cad5b fix: body, #root, AppWrapper and BodyWrapper height: 100% (#5628) 2022-12-11 14:27:00 -05:00
Vignesh Mohankumar
40784963a5 fix: copy changes for /about (#5626) 2022-12-11 14:26:46 -05:00
Vignesh Mohankumar
6ca8e4f664 fix: remove Earn and Build dApps links (#5625) 2022-12-11 14:26:32 -05:00
Vignesh Mohankumar
91c0580825 feat: add initial footer to /about (#5624) 2022-12-11 14:26:22 -05:00
Ian Lapham
c518501e7b fix: update unsupported list (#5622)
Add GOLD1 to unsupported list
2022-12-10 15:51:19 -05:00
Zach Pomerantz
d59e4f334e fix: hexlify tx value from SwapRouter (#5621)
Hexlifies the value returned from universal-router-sdk, which is required for ethers to accept it as input.
Fixes an error thrown by ethers (RE: un-hexlified data).
See Uniswap/universal-router-sdk#92 (fixed in Uniswap/universal-router-sdk#93 but not yet released).
2022-12-09 20:05:52 -05:00
pp-hh-ii-ll
4c3528a03d style: update steps (#5619)
* update steps

Add Transfer crypto step to the steps and change Swap copy

* Fix transfer tokens image

Remove shadows from transfer token image
2022-12-09 17:24:47 -05:00
pp-hh-ii-ll
ed82f9ff8a fix: color updates (#5617)
Fixed colors for cards and text
2022-12-09 17:24:41 -05:00
lynn
dd5a22ce83 feat: add inline preview of pending txn in wallet dropdown (#5616)
* it looks good

* sort by latest timestamp and show latest only

* jordan comment
2022-12-09 15:34:55 -05:00
Zach Pomerantz
185c1f6772 build: pause scheduled releases (#5615) 2022-12-09 14:18:21 -05:00
lynn
93e6b65cb3 fix: swap quote loading spinner (#5569)
* init TEMP

* it's working now but the loading spinner is being redesigned by fred

* working with fred new design

* undo unnecesary changes

* undo unnecessary change

* rspond to jordan

* more fixes

* remove %
2022-12-09 13:28:44 -05:00
lynn
965a745d5e fix: token details chart x axis and time selector style tweaks (#5613)
init
2022-12-09 12:23:29 -05:00
pp-hh-ii-ll
6d97590c0f fix: adjustments to /about font size (#5614)
* Adjustments to font size

Changes font weights and sizes of text elements in the about page

* fixes

* fixes

Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-12-09 11:32:37 -05:00
Vignesh Mohankumar
8e7ab6f8c3 fix: copy changes about (#5611)
* fix: make cards smaller and update font-sizes

* breakpoints

* fix: update copy/images on About
2022-12-09 11:19:33 -05:00
Vignesh Mohankumar
61729610c2 fix: update /about cards and step sizings (#5610)
* fix: make cards smaller and update font-sizes

* breakpoints
2022-12-09 10:58:48 -05:00
Vignesh Mohankumar
53860dd8e4 fix: update about preview on hover (#5607) 2022-12-09 10:30:46 -05:00
Vignesh Mohankumar
19028c1d82 fix: update About sizings (#5609) 2022-12-09 10:30:34 -05:00
Vignesh Mohankumar
6676d80707 fix: landing page font-size changes (#5608) 2022-12-09 10:27:45 -05:00
Vignesh Mohankumar
f9f804c381 feat: add page view traces for / and /about (#5594)
* feat: add page view traces for / and /about

* update analytics

* page name

* import
2022-12-08 22:56:14 -05:00
Vignesh Mohankumar
0a0b56b13d fix: center the subtext by using a container (#5599) 2022-12-08 22:29:41 -05:00
Vignesh Mohankumar
480f3f29f3 fix: handle light mode image in About step (#5601) 2022-12-08 22:29:35 -05:00
Vignesh Mohankumar
5f2072f449 fix: makes sure padding-bottom isn't overriden in Landing (#5603) 2022-12-08 22:29:23 -05:00
Vignesh Mohankumar
4e144c7fb5 chore: remove unused wallet icons (#5604) 2022-12-08 22:29:17 -05:00
Vignesh Mohankumar
cfbb6a7129 fix: light mode cards for /about (#5605)
* fix: light mode cards for /about

* transparent
2022-12-08 22:00:09 -05:00
Vignesh Mohankumar
61f03af20a fix: switch to scrollHeight and add less padding (#5600)
* fix: add less padding-top to about

* switch to scroll height

* add-200
2022-12-08 21:23:11 -05:00
Vignesh Mohankumar
5eb1274f97 feat: dynamically add padding-top on /about (#5597) 2022-12-08 20:33:17 -05:00
Vignesh Mohankumar
9eb7d45aea fix: prevent scroll on landing page (#5595)
use hook
2022-12-08 20:21:43 -05:00
Vignesh Mohankumar
2e1d4fdda1 fix: update links in /about cards (#5593) 2022-12-08 17:17:05 -05:00
Vignesh Mohankumar
e85b6e4cc6 fix: update links in /about info buttons (#5592) 2022-12-08 17:13:09 -05:00
Vignesh Mohankumar
9c334bc865 fix: tablet responsiveness on /about (#5591) 2022-12-08 16:46:39 -05:00
Vignesh Mohankumar
6a833fc740 fix: CTAButton should use white text always (#5589)
different colors
2022-12-08 16:20:10 -05:00
Vignesh Mohankumar
80ed8eb6c2 feat: /about mobile responsive (#5587)
* fix gap

* order

* update gap
2022-12-08 16:19:59 -05:00
Vignesh Mohankumar
a14d2df8e6 feat: add thumbnails to /about (#5586)
* remove these icons

* destructure

* move to constants

* update thumbnails
2022-12-08 15:21:00 -05:00
Vignesh Mohankumar
09511b06f2 feat: add selected state for about steps (#5584)
* refactor: move steps and cards into config

* selected state

* css only
2022-12-08 14:26:19 -05:00
Vignesh Mohankumar
9def686344 fix: add max-width to landing page subtext (#5585) 2022-12-08 12:59:02 -05:00
lynn
a88c083758 fix: token details loading state fixes (#5567)
* init

* no export

* respond to jordan
2022-12-08 12:55:10 -05:00
Vignesh Mohankumar
1a6cad4a8f fix: update swap description in about, remove transfer (#5583)
* fix: update swap description in about, remove transfer

* fix
2022-12-08 12:29:28 -05:00
Vignesh Mohankumar
505b3f2a20 feat: new /about page (#5578)
* update card

* copy changes

* change

* add descriptions

* move folder

* move card

* template

* powered by

* more

* wallet icons

* add initial buttons

* gap

* external

* size

* Title

* button changes

* undo

* other icons

* color

* rm border

* new icons

* font weight

* naming and gaps

* naming

* get started

* StepList

* move out step

* move title

* eslint

* import

* transition stuff

* rgb

* rm rem
2022-12-08 12:06:39 -05:00
Vignesh Mohankumar
1b5a145738 fix: textPrimary for landing page copy (#5580) 2022-12-08 00:46:57 -05:00
Zach Pomerantz
dbdd3a8e16 fix: handle user rejection (#5576) 2022-12-07 21:40:40 -08:00
Zach Pomerantz
78e438294f fix: disable swap while permit loading (#5577)
* fix: disable swap while permit loading

* refactor: UNKNOWN -> INVALID
2022-12-07 16:56:38 -08:00
Zach Pomerantz
2c014c6f38 fix: stable trade currency (#5574)
Uses a stable value for the trade's currencies, so that hooks depending on the currency are not rerendered.
Practically, this fixes an issue where changing the input amount would reset approval state.
2022-12-07 16:48:57 -08:00
lynn
7b3b7864ad fix: remove border on last item in txn list on wallet dropdown (#5568)
* init

* respond to jordan
2022-12-07 19:33:03 -05:00
Zach Pomerantz
e35eefbeb3 fix: only prompt for necessary approval/permit (#5575) 2022-12-07 16:25:15 -08:00
Vignesh Mohankumar
049a7d1d6a feat: add learn more button (#5572)
* fix pointer

* buttons

* fix gap

* buttons wrapper

* order
2022-12-07 18:46:40 -05:00
Mike Grabowski
28d6c6454e refactor: update to landing page structure (#5571)
* feat: initial work

* chore: add translations

* Revert "chore: add translations"

This reverts commit 8ba0bf4a2e.

* chore: bring it back
2022-12-07 18:10:37 -05:00
Vignesh Mohankumar
f96ecb59eb fix: update copy on landing page (#5566) 2022-12-07 14:59:04 -05:00
lynn
a4c54ff953 fix: show ens in wallet dropdown too if available (#5564)
* done

* handle no ENS case
2022-12-07 14:38:40 -05:00
Charles Bachmeier
d4cb32c4c3 feat: nft collection name and description size on larger screens (#5550)
* large collection name text on tablet and above

* make description text larger on tablets and above

* remove sprinkles

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-12-07 11:31:07 -08:00
Zach Pomerantz
efb76200ce feat: adds permit2 and universal router integration (#5554)
* feat: disable approval if permit2 is enabled

* feat: add permit through permit2

* fix: include analytics

* chore: pass permit to useSwapCallback

* feat: use universal router

* fix: remove unused import + update param formmating

* fix: suppress eslint error on restricted imports

* fix: lint issues

* fix: do not disable unapproved permit2 swap

* Revert "fix: do not disable unapproved permit2 swap"

This reverts commit be3f758e36.

* fix: do not disable unapproved permit2 swap

* fix: allow error for permit2 swap

* fix: better sequencing to handle rejections

* build: upgrade universal router sdk to include goerli address

* fix: mv block time into const

* fix: rm unnecessary id

* fix: cast swap error to string

* chore: parity with widgets

* test: rm old feature flags

* fix: gate permit2 on chain deployment

* fix: import for gate

Co-authored-by: Yannie Yip <yannie.yip@uniswap.org>
2022-12-07 11:24:50 -08:00
Charles Bachmeier
a96bdaad04 fix: align social overflow icon on mobile (#5561)
align social overflow on mobile

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-12-07 11:20:08 -08:00
Charles Bachmeier
b89860dc53 fix: change readMore val on address change (#5558)
change readMore val on address change

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-12-07 11:08:26 -08:00
Zach Pomerantz
e640dccebd test: reduce parallelization to 4 containers (#5562) 2022-12-07 10:37:29 -08:00
Vignesh Mohankumar
4710b832fa build: no eslint errors on local build (#5560) 2022-12-07 13:02:02 -05:00
Vignesh Mohankumar
fb07666e23 build: update .nvmrc (#5559) 2022-12-07 12:55:36 -05:00
Vignesh Mohankumar
22f64a98a1 feat: remove footer on landing page (#5555) 2022-12-07 09:42:28 -05:00
Vignesh Mohankumar
50f6401a8a feat: Initial landing page redesign updates (#5456)
* Initial landing page redesign updates

* export

* unnecessary brackets

* unused component

* remove state for the overlay

* remove more show landing logic

* only show when on /

* gated

* pointer events fix

* import z-index

* get started -> continue

* rm text-fill-color

* no fill color

* unused icon

* dont add route

* css fixes
2022-12-06 22:06:21 -05:00
Zach Pomerantz
6480b947ef build: upgrade widgets for permit2 (#5551)
* build: upgrade widgets for permit2

* feat: flag permit2 in widget
2022-12-06 12:41:45 -08:00
lynn
f41cbbb58f fix: broken polygon bridge link (#5548)
init
2022-12-06 15:20:08 -05:00
Mike Grabowski
0cb098b9d4 build: send source maps to Sentry on every release (#5540)
* feat: add source maps

* chore: use commit sha instead of semver for gh actions

* add test sentry action

* Delete sentry.yaml

* chore: add url prefix
2022-12-06 21:34:09 +04:00
lynn
76f5638583 fix: link color for learn more in token safety msg (#5547)
* fix

* Fix
2022-12-06 12:24:40 -05:00
aballerr
c840de73db fix: verified icon fix (#5538)
* fixed verified icon  on details to follow title properly
2022-12-06 09:55:32 -05:00
Zach Pomerantz
ab4271b2ff feat: permit 2 feature flag (#5545) 2022-12-05 22:26:16 -08:00
Zach Pomerantz
6f0586c596 build: install permit2 and universal-router sdks (#5546)
build: install permite2 and universal-router sdks
2022-12-05 22:25:11 -08:00
lynn
9f33ed06dd fix: improve network switching error to new design (#5543)
init
2022-12-05 23:25:29 -05:00
lynn
85f4cec829 fix: add back “NFT Sell item added” event (#5528)
* init

* fix

* fix

* remove debug
2022-12-05 21:44:43 -05:00
lynn
5e23501d58 fix: more precise numbers in swap exchange price (#5541)
fix rounding
2022-12-05 21:44:12 -05:00
Vignesh Mohankumar
6bc98363cc build: lint for unused exports (#5513)
* build: fail on unused exports

* fix

* dedupe

* add unused export to test

* fix

* some fixes

* unused

* rm unresolved

* add .eslintignore

* rm

* unused modal

* unused useragent
2022-12-05 18:18:07 -05:00
Jordan Frankfurt
e15ccc3c79 fix: update <AppBody /> to allow its intended prop passthrough (#5537) 2022-12-05 14:09:54 -06:00
Mike Grabowski
e8880be1d9 feat: better error page (#5536)
* initial commit

* wrap up styling

* feat: add eventId

* chore: finialise design

* chore: simplify css

* feat: use grids from theme and font family
2022-12-05 22:55:45 +04:00
Mike Grabowski
0e9b05405d feat: add Sentry / improve error handling (#5509)
* initial commit

* chore: tweaks

* chore: tweaks ahead of full rewrite

* chore: only enable Sentry in production builds

* chore: keep existing behavior

* chore: fix lint

* chore: add release

* feat: remove GA sendEvent exception

* chore: simplify

* chore: bring back new line

* chore: group code together
2022-12-05 15:37:37 +04:00
Vignesh Mohankumar
55d85d2623 feat: show Browser Wallet instead of Injected (#5531)
* feat: show Browser Wallet instead of Injected

* fix test
2022-12-02 17:34:20 -05:00
Vignesh Mohankumar
7fb7517a1a chore: remove more unused exports (#5529)
* chore: remove more unused exports

* fix

* undo top tokens change
2022-12-02 17:18:54 -05:00
Vignesh Mohankumar
1a6fe3c1a8 chore: remove more unused exports (#5515)
* chore: remove more unused exports

* remove surveypopup

* rm NewMenu
2022-12-02 16:44:07 -05:00
Vignesh Mohankumar
a49ff49185 chore: remove some unused exports (#5514)
* remove some unused exports

* undo
2022-12-02 16:22:04 -05:00
Jack Short
ca1dc593d9 style: updating page loader for activity (#5508)
* style: updating page loader for activity

* reusing loader
2022-12-02 15:45:12 -05:00
Charles Bachmeier
afacc4a348 fix: only show owner container if we have NftBalance data (#5526)
* only show owner container if we have NftBalance data

* add endAt to NftBalanceQuery

* simplify isOwner check

* add undefined check

* remove test

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-12-02 14:59:05 -05:00
Vignesh Mohankumar
91157b7a43 chore: remove unused hooks, utils, components (#5524) 2022-12-02 14:10:14 -05:00
Jayden Windle
d5e676efb5 feat: Adds support for embedded animation_urls (#5492)
* feat: adds support for embedded animation_urls

* chore: refactored styles and MediaType types

* chore: re-use image styles for embeds
2022-12-02 13:07:00 -05:00
Charles Bachmeier
9ac83bea7e fix: replace many blue instances with accentAction (#5501)
replace many blue instances with accentAction

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-12-02 10:48:34 -05:00
lynn
53b9a847ca fix: add back previously deleted trending row selected event (#5512)
* init

* upgrade analytics pkg
2022-12-02 10:45:13 -05:00
Vignesh Mohankumar
04f9127961 chore: remove more unused NFT code (#5525) 2022-12-02 10:08:31 -05:00
Vignesh Mohankumar
5364eb5715 chore: remove some unused NFT exports (#5517) 2022-12-01 23:07:00 -05:00
Vignesh Mohankumar
5126e24d19 chore: remove some unused exports (#5516) 2022-12-01 19:12:53 -05:00
Vignesh Mohankumar
a06bb79039 chore: remove all remaining unused exports (#5510)
chore: remove unused tokens/core variables
2022-12-01 17:13:07 -05:00
Vignesh Mohankumar
a446dc7f10 chore: add landing page flag to modal (#5511)
add flag to modal
2022-12-01 17:09:31 -05:00
lynn
e903a335d6 fix: disabled treatment for unlisted collection page card + tooltip styling fixes (#5507)
init
2022-12-01 16:56:59 -05:00
Vignesh Mohankumar
3be5e9b5fe chore: remove unused nft variables (#5506) 2022-12-01 15:41:35 -05:00
Jack Short
818e98328e style: adding loading state for asset activity (#5503)
* style: adding loading state for asset activity

* translations

* previous translations did not work
2022-12-01 15:18:10 -05:00
Charles Bachmeier
aa3225c21c feat: show 1155s in collection filter (#5498)
* show 1155s in collection filter

* continue to hide shared contract collections

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-12-01 14:19:37 -05:00
Vignesh Mohankumar
35d66f1e09 chore: remove nft feature flag (#5484)
* chore: remove nft feature flag

* add back wallet modal terms

* unused styles

* rm
2022-12-01 14:18:30 -05:00
Charles Bachmeier
e156635f77 feat: add mobile profile menu filter header (#5499)
* add mobile profile menu filter header

* incorrectly set color

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-12-01 14:00:53 -05:00
Charles Bachmeier
d2a97c62ed fix: always show listed % (#5497)
Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-12-01 13:58:36 -05:00
aballerr
6aa999f713 fix: Web 2398 (#5488)
* adding highlight when no value for selling has been set
2022-12-01 13:43:05 -05:00
lynn
0a3f8636e7 fix: wrong color on list button (#5502)
* init

* simplify
2022-12-01 13:39:18 -05:00
Jack Short
f5de7178d9 style: updating details loader to match design (#5504) 2022-12-01 13:36:15 -05:00
yyip-dev
6c203cc990 fix: reduce size for remove liquidity button (#5500)
Fix size for remove liquidity button
2022-12-01 11:17:58 -05:00
aballerr
3a40159147 fix: making colors correct on approval screen (#5444)
update approval button colors to be correct
2022-12-01 10:41:49 -05:00
Vignesh Mohankumar
c6f6bd446b chore: remove react-confetti (#5443) 2022-12-01 08:33:50 -05:00
Vignesh Mohankumar
416212be3b chore: remove /swap/:outputCurrency redirect (#5442) 2022-12-01 08:33:02 -05:00
Vignesh Mohankumar
ce9f4525a3 chore: remove unused favoriteTokens flag (#5454) 2022-12-01 08:32:39 -05:00
Vignesh Mohankumar
23a250aae0 chore: landing page feature flag (#5453) 2022-12-01 08:32:24 -05:00
Vignesh Mohankumar
5d5e0f4596 fix: full width for all TokenRow breakpoints (#5491) 2022-12-01 08:31:58 -05:00
Zach Pomerantz
d6199e0f61 build: release to cloudflare pages (#5441)
* build: release to cloudflare pages

* build: add params as secrets

* build: use node@16 for pages

* build: clarify step
2022-11-30 13:42:26 -08:00
cartcrom
a611cd03d8 fix: add retries to relay network layer (#5485)
* implemented relay modern

* cleaned up relay env

* added max number of retries

* remove caching layer

* fixed sparkline caching

* updated retry vars

* moved delay backoff logic into sep function

* inlined beforeRetry

* deduplicated

* added custom error middleware

* added custom error middleware

* empty array

* update

* clear errors

* only if errors exist

* check length

* fix: create empty data on error

* fix: rm unnecessary types

* fix: rm unnecessary import

* fix: return empty data if res.errors

* fix: clear errors but do ont throw

* fix: use noThrow

* retry explicit array

* reordered middleware

Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2022-11-30 15:37:48 -05:00
Charles Bachmeier
bacc9667e8 fix: allow 0 after decimal (#5487)
allow 0 after decimal

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-30 09:27:28 -08:00
Jack Short
41776655dc style: full width explore banner (#5486)
style: full width explore bannner
2022-11-30 12:17:40 -05:00
aballerr
a350f59811 feat: adding in eth value to listing page (#5481)
* adding in eth value in sell page
2022-11-30 11:18:45 -05:00
Charles Bachmeier
bdc336e188 fix: successfully list ENS to x2y2 (#5482)
successfully list ENS to x2y2

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-30 08:07:42 -08:00
Charles Bachmeier
8f44adb038 refactor: scientific notation helper fn (#5479)
* fix listing ens to x2y2

* add helper fn for handling scinetific notation

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-30 07:59:26 -08:00
Charles Bachmeier
e4ae705eb1 fix: listing ens to x2y2 (#5477)
fix listing ens to x2y2

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-30 07:24:21 -08:00
Jack Short
1afc36454d fix: supporting commas (#5472) 2022-11-30 09:59:10 -05:00
Charles Bachmeier
1b65d6a1ce fix: lisiting modal (#5464)
fix lisitng modal

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-30 06:25:08 -08:00
Charles Bachmeier
677fabf71a feat: NFTs on Uniswap (#5458)
* move to temp url

* update url to include nft path

* use prod graphql

* remove redundant declaration

* enable nfts on uniswap

* remove unused env var

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-30 05:28:20 -08:00
lynn
e138e0ecf2 fix: don't open bag automatically when removing items (#5452)
fix
2022-11-29 17:23:22 -05:00
Callil Capuozzo
60bd2db4c1 fix: fixes search styling nits (#5446)
* fixes search styling nits

* Improve box contrast in dark mode
2022-11-29 14:01:23 -08:00
Charles Bachmeier
c7dd0f06e7 fix: collection names truncating early (#5450)
fix collection names truncating early

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-29 16:53:11 -05:00
Charles Bachmeier
76dc71e442 fix: remove set height from unavailable assets (#5449)
* remove set height from unavailable assets

* actually remove

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-29 13:39:10 -08:00
Charles Bachmeier
88bb048920 chore: remove unused keys (#5448)
remove unused keys

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-29 13:38:01 -08:00
Jack Short
1344e57c4d feat: share link on transaction page (#5440)
* feat: share link on transaction page

* responding to comment
2022-11-29 16:26:12 -05:00
Charles Bachmeier
0b18bf0813 feat: remove gated key for graphql query (#5447)
remove gated key for graphql query

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-29 13:24:15 -08:00
lynn
1195be5747 fix: button colors (#5435)
* init

* fix

* respond to comments

* respond

* fix
2022-11-29 16:08:52 -05:00
aballerr
3aa98d626b fix: reverting to previous styles (#5439)
* Fixing overlay regression caused from a commit this morning
2022-11-29 15:07:37 -05:00
Charles Bachmeier
362873d968 fix: update Welcome banner text (#5438)
update Welcome banner text

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-29 11:39:34 -08:00
lynn
2fe5e487f4 fix: add eth to price (#5437)
add eth to price
2022-11-29 14:28:11 -05:00
cartcrom
5b418c68af feat: upgrade widget to 2.20.0 (#5436)
upgraded widget to 2.20.0
2022-11-29 13:48:13 -05:00
Jack Short
18f64d6dac style: updating collection loading for mobile (#5434) 2022-11-29 13:36:46 -05:00
Mike Grabowski
af2725ec25 feat: make bag more distinctive from the nav bar (#5426)
* feat: initial commit

* chore: tweaks

* chore: remove modalOverTooltip

* chore: tweaks

* not needed

* one more tweak

* chore: fix issue on mobile

* chore: simplify

* chore: fix lint issues after rebase
2022-11-29 22:31:36 +04:00
Mike Grabowski
6fd5dc0cfc chore: various banner responsive tweaks (#5408)
* chore: fix black collection title in light mode

* fix: explore bottom padding on mobile, align on larger devices

* chore: introduce new xs breakpoint, as per Figma

* feat: new copy for banner on mobile + text wrapping

* chore: extra code

* chore: remove unused theme

* chore: update copy

* Update Banner.tsx

* chore: wrap it up
2022-11-29 22:31:26 +04:00
Mike Grabowski
ce5c0ff453 feat: increase hit-target for remove button (#5412)
* feat: increase hit-target for remove button

* chore: add conditional back

* update
2022-11-29 22:22:45 +04:00
lynn
b419b85694 fix: remove animation on nav (#5432)
remove animation on nav
2022-11-29 12:54:10 -05:00
Jack Short
9d37b1bb55 fix: sweep adding the correct assets from amms (#5424)
WEB-2438 sudo and nftx fixes
2022-11-29 12:53:34 -05:00
lynn
57371fb47e fix: color on button in nft details (#5431)
* fix color

* fix
2022-11-29 12:49:19 -05:00
Jack Short
e9dd0c90e0 fix: sweep reopens bag correctly (#5430) 2022-11-29 11:59:04 -05:00
lynn
f373a52da4 fix: verified icon sizes and color are messed up in view my nfts (#5425)
* fix

* remove color change
2022-11-29 11:44:23 -05:00
lynn
e4473e3007 fix: use same loader in view my nfts as collection (#5428)
* loader

* fix
2022-11-29 11:31:57 -05:00
Charles Bachmeier
da2f168eeb refactor: connect to prod gql and api endpoint (#5422)
* move to temp url

* update url to include nft path

* use prod graphql

* remove redundant declaration

* reformating event request

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
Co-authored-by: Jack Short <john.short.tj@gmail.com>
2022-11-29 08:22:57 -08:00
Vignesh Mohankumar
76e3caa659 fix: keep bag closed after manual close (#5429) 2022-11-29 11:13:47 -05:00
Mike Grabowski
7fa91d1442 fix: style on transaction modal (#5427) 2022-11-29 20:03:31 +04:00
aballerr
d999388876 fix: transaction not waiting (#5405)
fixing transaction not waiting
2022-11-29 10:45:48 -05:00
yyip-dev
82c7657402 feat: Match tokens table & price designs with nft (#5402)
* Match tokens table & price designs with nft
- adjust token table max width
- update price percentage changes styling

* Default delta arrow iconSize to 20px
* Pass in boolean instead of number to styled component param
2022-11-29 01:09:55 -05:00
Jordan Frankfurt
cb4101e606 fix(cypress): patch to add another parallelization and make timeout longer than block time (#5423) 2022-11-28 20:32:30 -06:00
yyip-dev
92b0433184 fix: adjust margin on icon/button on pool page (#5403)
Adjust margin on icon/button on pool page
2022-11-28 20:19:01 -05:00
lynn
21e5208d5c fix: nft explore banner polish (#5410)
* init

* fix

* undo

* oops
2022-11-28 18:20:14 -05:00
vignesh mohankumar
6b09aa9457 fix: use accentAction for VerifiedIcon (#5420)
* fix: use accentAction for VerifiedIcon

* lint
2022-11-28 18:09:39 -05:00
Jordan Frankfurt
21594343b5 fix(polling): correct gas price color (#5413)
* fix(polling): correct gas price color

* pr feedback
2022-11-28 17:07:05 -06:00
Jordan Frankfurt
f29c9f8440 fix(banner): fix 1px non-overlay gap (#5414)
* fix(banner): fix 1px non-overlay gap

* pr feedback

* pr feedback
2022-11-28 17:06:52 -06:00
Mike Grabowski
a6549dd340 fix: add outline to bottom navigation (#5415)
* fix: add outline to bottom navigation

* Update index.tsx
2022-11-29 03:06:04 +04:00
Charles Bachmeier
9dabacef9b refactor: change marketplace ordering (#5411)
change marketplace ordering

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-28 14:39:52 -08:00
Mike Grabowski
80921e782f chore: update link color (#5417) 2022-11-29 02:37:38 +04:00
lynn
183beddc72 fix: copywriting nft banner (#5421)
init
2022-11-28 17:33:30 -05:00
Mike Grabowski
7ce718df22 chore: update welcome banner copy (#5418)
chore: update copy
2022-11-29 01:47:29 +04:00
Mike Grabowski
82fd79f0e2 chore: reduce border by 1px (#5419) 2022-11-29 01:47:18 +04:00
aballerr
d24c62ec4b fix: Minor polish fixes (#5407)
* Loading state fixes, make volume lowercase, remove loading circle
2022-11-28 12:47:17 -05:00
Jack Short
2ea70d1894 fix: remove last item behavior from bag (#5409) 2022-11-28 12:14:21 -05:00
Callil Capuozzo
448090b534 style: Phase1 search polish (#5350)
* Polish search bar

* Additional search bar polish

* Polish styles and breakpoints

* Address comments

* Address comments

* Add useMemo

* Remove transitions
2022-11-28 09:35:05 -05:00
Zach Pomerantz
b1fd484894 test: install fixed version of yarn-deduplicate (#5390) 2022-11-24 12:23:56 -05:00
unipadmini
aeb636cf8a fix: Display blank row if no listing price. (#5398)
Co-authored-by: Padmini Pyapali <padminipyapali@Padminis-MacBook-Pro.local>
2022-11-23 20:28:38 -05:00
Jack Short
4240908c4c fix: no title for unavailable nft (#5397) 2022-11-23 19:16:46 -05:00
Charles Bachmeier
d53ba64218 fix: reduce success image size (#5399)
* marketplace links

* drop down size of successful purchase image

* align unicorn with header

Co-authored-by: JackShort <john.short.tj@gmail.com>
Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-23 16:14:26 -08:00
Jack Short
89ce5a9805 style: open all containers on details (#5396) 2022-11-23 17:54:23 -05:00
Jack Short
1790492f17 style: adding links to marketplace icons on details (#5394)
marketplace links
2022-11-23 17:54:10 -05:00
Jack Short
304cd72eed fix: adding pool icon to sudo assets (#5395) 2022-11-23 17:53:56 -05:00
Jack Short
9dba68b34c fix: changing buy now to add to bag (#5393) 2022-11-23 17:19:22 -05:00
Charles Bachmeier
588567b900 fix: incorrect looks rare creator royalties (#5392)
* properly show LR royalties in grid

* add LR royalty to total return calculation

* common LR basis points const

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-23 14:14:26 -08:00
Mike Grabowski
ef964ab120 feat: differentiate modal from bottomsheet (#5387)
* feat: differenciate modal from bottomsheet

* chore: add ability to disable esc/overlay tap to dismiss
2022-11-23 21:39:23 +01:00
Charles Bachmeier
f3d64b65da fix: Stop traits from url re-appearing (#5391)
traits no longer re-appear when removed

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-23 12:01:39 -08:00
Mike Grabowski
a9200b2c39 chore: fix invalid css color prop on text components (#5388)
* chore: fix

* chore: fix snapshot tests
2022-11-23 19:49:42 +01:00
Charles Bachmeier
209fd33780 fix: always sort not for sale assets towards the end when sorting by price (#5389)
* always sort not for sale assets towards the end when sorting by price

* default 0

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-23 10:33:30 -08:00
Jack Short
940c1dbb8e fix: a few bugs on details (#5386)
* fix: a few bugs on details

* no seller if no owner

* removing seller for erc1155
2022-11-23 12:55:13 -05:00
aballerr
5dce68a62f feat: Implementing claims logic, adding error state and minor copy change (#5357)
* Implementing claims logic
2022-11-23 10:44:10 -05:00
unipadmini
9dd8ad1db6 fix: Update copy for viewing 1155 assets. (#5375)
* chore: Update copy for viewing 1155 assets.

* Remove is so it looks better.

Co-authored-by: Padmini Pyapali <padminipyapali@Padminis-MacBook-Pro.local>
2022-11-22 22:04:13 -05:00
lynn
0b40f72f0c fix: hide collection search for > 300 collections due to lack of search param input for OS api (#5383)
* init

* fix

* respond to charlie
2022-11-22 19:16:53 -05:00
Mike Grabowski
875171e36a feat: handle 0 in banner card (#5385)
feat: fix web-2411
2022-11-23 00:20:29 +01:00
Mike Grabowski
8e9a20a6c8 chore: various responsive tweaks to carousel (#5377)
* feat: resposive tweaks

* feat: display inline badge

* make animation slightly faster

* chore: change color
2022-11-23 00:00:45 +01:00
Mike Grabowski
1a31560374 feat: welcome nft banner (#5379)
* wip

* finished modal, waiting for assets

* feat: use srcset for better assets optimisation

* feat: bg photo

* various tweaks

* feat: wrap up logic

* chore: use proper link

* chore: bring switch back
2022-11-22 22:37:53 +01:00
lynn
d528b28203 fix: nft promo banner init state fix (#5384)
init
2022-11-22 15:57:18 -05:00
lynn
c1cb712087 feat: nft explore promo banner (#5369)
* init

* it looks good and is working

* don't change image on every render

* un-move dark mode hook

* oops

* handle mobile screen smallest size

* first round comment responses

* second round comments

* rest of comments

* fix analytics changes

* remove unnecesasry z index
2022-11-22 15:18:19 -05:00
cartcrom
ceed5e0b4c fix: always return arrays from typed queries (#5382)
added empty array fallbacks
2022-11-22 14:47:35 -05:00
cartcrom
a449338252 fix: searchbar fetching promise resolve fallback (#5380)
* added promise resolve fallback

* removed extra indent
2022-11-22 14:00:37 -05:00
cartcrom
9662344e24 fix: render invalid address warnings on token details (#5260)
* initial commit
* polishing loading state
* small refactors
* polished on chain token network switching
* fixed commited merge conflict
* small refactor
* fixed merge conflicts
* PR comments and refactors
* fix unintented trace property change
* second round of comments
2022-11-22 11:22:07 -05:00
Jack Short
1536e18784 style: updating details (#5371)
* style: adjusting details page

* moving owners

* removing traits if no traits

* adding accent colors

* trait grid breakpoint

* some comments

* addressing comments
2022-11-22 11:17:36 -05:00
unipadmini
c19431eb20 fix: Issue where decimal appears as 0 on listings page. (#5354)
* Fix issue where decimal appears as 0.

* Checking explicit value.

Co-authored-by: Padmini Pyapali <padminipyapali@Padminis-MacBook-Pro.local>
2022-11-22 11:02:52 -05:00
Charles Bachmeier
634e38529c fix: after retry, put listing button in a ready state (#5372)
* update color confirmation

* update color checkmark

* reset continue button after retry

* reset before listing

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-21 17:08:17 -08:00
Charles Bachmeier
083ec425d0 feat: approve collections in parallel on desktop, sequentially on mobile (#5374)
approve in parallel on desktop

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-21 16:43:59 -08:00
Mike Grabowski
e8c09db146 feat: multiline ellipsis when text is too large (#5365)
* feat: multiline ellipsis

* do not repeat
2022-11-22 01:40:43 +01:00
Charles Bachmeier
9ab4d952ef fix: use lowercase for gray market icons (#5370)
use lowercase

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-21 15:39:54 -08:00
Charles Bachmeier
48883cce8d fix: Can remove marketplace or listing from modal (#5362)
* removing asset doesn't change other listings

* remove marketplace from modal removes asset

* working multiple markets

* better fix

* track signed listing

* simpler solution

* remove unused field

* correct transition

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-21 13:10:56 -08:00
Zach Pomerantz
3d820d39b7 fix: include user-added tokens if selected (#5367) 2022-11-21 16:06:19 -05:00
cartcrom
4fdca48a97 feat: coned on token details/search (#5349)
* fixing alignment

* migrating stats to coned

* fully replaced formatAmount usage

* reformatted pricechart function w/ yannie's suggestions
2022-11-21 15:06:18 -05:00
aballerr
7834ab7979 fix: removing details-marker from safari (#5364)
* removing details-marker from safari and mobile
2022-11-21 14:41:37 -05:00
Zach Pomerantz
dee808cc57 fix: include user-added tokens in selector (#5363)
* fix: include user-added tokens in selector

* fix: omit user-added tokens from queryless selector
2022-11-21 14:03:51 -05:00
vignesh mohankumar
4c23f62a24 fix: show mobile filters on top of nav (#5366) 2022-11-21 14:00:59 -05:00
dependabot[bot]
93633a81a7 build(deps): bump @uniswap/widgets from 2.18.0 to 2.19.2 (#5361)
* build(deps): bump @uniswap/widgets from 2.18.0 to 2.19.2

Bumps [@uniswap/widgets](https://github.com/Uniswap/widgets) from 2.18.0 to 2.19.2.
- [Release notes](https://github.com/Uniswap/widgets/releases)
- [Changelog](https://github.com/Uniswap/widgets/blob/main/.releaserc.json)
- [Commits](https://github.com/Uniswap/widgets/compare/v2.18.0...v2.19.2)

---
updated-dependencies:
- dependency-name: "@uniswap/widgets"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* build: pin web3-react versions and dedup deps

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2022-11-21 13:35:12 -05:00
Mike Grabowski
7465a0e999 feat: various improvements to banner (#5317)
* initial commit

* chore: responsive improvements

* feat: responsive carousel

* chore: fix carousel

* chore: less magic, components

* chore: bump friction a bit to compensate for carousel changes

* fix: position of loading bubbles

* chore: fix max-width on fullscreen breakpoints not taking 100 space

* fix full screen max-width

* chore: remove first card offset
2022-11-21 19:14:20 +01:00
lynn
6aac978754 fix: mobile profile bag copywriting change (#5358)
copywriting change
2022-11-21 12:05:19 -05:00
Charles Bachmeier
62775f6091 feat: approve collections 1x1 (#5359)
approve collections 1x1

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-21 08:51:16 -08:00
Zach Pomerantz
97b3725c19 build: include widgets in dependabot (#5356) 2022-11-21 11:36:21 -05:00
Charles Bachmeier
46563ee565 fix: align items on collection page (#5355)
align items on collection page

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-21 07:16:40 -08:00
cartcrom
c68624e048 fix: swap input size difference (#5351)
removed redudant check that broke input box height
2022-11-20 20:04:42 -05:00
Jordan Frankfurt
0fa1c5e6ea fix: update clear all filters button styles for consistency (#5328)
* fix: update clear all filters button styles for consistency

* pr feedback
2022-11-19 14:04:46 -06:00
vignesh mohankumar
a7fd60987e fix: no filters sidebar animation on mobile (#5320) 2022-11-19 11:10:02 -05:00
Jack Short
51fe44d53a fix: no price adjustment popups for pooled assets (#5322)
* fix: no price adjustment popups for pooled assets

* refactoring for readability
2022-11-18 20:36:32 -05:00
Charles Bachmeier
edf67e8e45 fix: add left margin to activity page (#5327)
* add left margin to activity page

* fix margins on filters and on mobile
2022-11-18 15:00:05 -08:00
lynn
babfebccef refactor: view my nfts loading optimization (#5318)
* working

* remove commented code
2022-11-18 17:44:06 -05:00
Charles Bachmeier
ea02d9e919 feat: List Page (#5323)
* working dropdown button

* memo text

* working dropdown modal

* click outside

* move grid to its own file

* add file

* re-organized page layout

* header updates

* text change

* margin

* ETH

* text input

* respond to comments

* move listinggrid to its own file

* add file

* organize imports

* remove 0 margin

* undo testing

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-18 14:31:06 -08:00
Charles Bachmeier
bb3b236cd9 refactor: move listinggrid to its own file (#5326)
* move listinggrid to its own file

* add file

* organize imports

* undo unrelated testing
2022-11-18 14:19:05 -08:00
aballerr
1d3fd512ae feat: Claim rewards (#5308)
*  Adding in claim usdc modal v1.  Logic and pill ui tweak to follow in v2
2022-11-18 16:27:27 -05:00
Charles Bachmeier
5dbd0ae782 feat: Listing marketplace dropdown (#5314)
* working dropdown button

* memo text

* working dropdown modal

* click outside

* respond to comments

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-18 13:22:08 -08:00
pp-hh-ii-ll
b95621758c chore: add Gray950 and remap backgroundBackdrop to it (#5321)
Add Gray950

Adds Gray950 hex and remaps backgroundBackdrop to it
2022-11-18 15:54:34 -05:00
Zach Pomerantz
ce51ffae75 fix: include user-added tokens in selector (#5319) 2022-11-18 12:32:14 -08:00
lynn
8cd32138ac fix: erc 1155 tooltip behavior on mobile (#5305)
fix erc 1155 tooltip behavior on mobile
2022-11-18 15:29:19 -05:00
Charles Bachmeier
785c2a6712 fix: Revert "feat: add glow on all pages" (#5315)
Revert "feat: add glow on all pages (#5275)"

This reverts commit 72c5e64f74.
2022-11-18 11:09:55 -08:00
Jack Short
56a9952546 fix: bag autoclose when going to collection page (#5311)
* fix: bag autoclose when going to collection page

* moved eslint comment
2022-11-18 13:27:19 -05:00
Jack Short
7059a12a25 style: light mode background style for floating sell bag (#5312) 2022-11-18 13:27:08 -05:00
Mike Grabowski
da01254247 feat: add floor change on mobile (#5302)
* few more tweaks

* remove extra code
2022-11-18 18:16:11 +01:00
Jordan Frankfurt
54a7b943ce fix: make carousel responsive (#5300)
* fix: make carousel responsive

* remove padding from CarouselItemIcon
2022-11-18 11:12:26 -06:00
Jordan Frankfurt
ec6c843db6 fix: collection screen for mobile (#5287)
* fix: collection screen for mobile

* margin to match collection item container

* fix loading skeleton

* pr feedback + some minor code cleanup
2022-11-18 11:09:32 -06:00
aballerr
7a6bb369d4 fix: updating to have proper width (#5304)
updating to have proper width
2022-11-18 12:06:10 -05:00
lynn
66a38c8e51 fix: add infinite scroll to view my nfts filter panel (#5216)
* infinite_scroll_working

* fix

* remove extra

* add infinite loading

* working

* remove null

* filter button text fixes

* respond to charlie plus mobile tooltip fixes

* make filter bar sticky

* respond to charlie
2022-11-18 11:20:06 -05:00
Zach Pomerantz
f79d2f821e fix: size down new position button (#5262) 2022-11-18 08:11:14 -08:00
Mike Grabowski
72c5e64f74 feat: add glow on all pages (#5275)
* chore: add more pronounced glow on all nft pages

* chore: add glow effect everywhere

* chore: add in a few more places

* wip: simplification

* chore: describe API

* chore: small refactor

* feat: add glow to two more pages

* chore: add glow on all other pages

* chore: simplify

* chore: tweaks

* chore: update type

* chore: update white bg as per Cal suggestion

* chore: dont export props

* chore: fix type

Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-11-18 10:49:48 -05:00
Charles Bachmeier
01a44d49b0 fix: Can't scroll behind bag (#5299)
* mobile bag scroll behind and snap

* fix laggy animation on profile page when filters are opened

* don't scroll assets behind bag

* refactor duration

* correct placement of isBagExpanded

* simplify conditions

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-17 20:15:29 -08:00
github-actions[bot]
f0412f5d47 chore(i18n): new Crowdin translations (#5256)
* chore(i18n): synchronize translations from crowdin [skip ci]

* empty

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-11-17 22:42:51 -05:00
Felipe Brahm
2887ee9ac8 chore: remove unused file (#5269) 2022-11-17 22:27:11 -05:00
Felipe Brahm
79d5211db4 refactor: remove unnecessary casting (#5270) 2022-11-17 22:25:34 -05:00
yyip-dev
d05e5d028b fix: theme color hex typo (#5294)
theme color hex typo
2022-11-17 22:24:08 -05:00
Jack Short
d3a415ee96 fix: close bag automatically on details (#5296)
* fix: close bag automaticall on details

* auto closing on explore too
2022-11-17 21:11:24 -05:00
Jack Short
db9ac38c64 feat: adding suspicious icons to bag rows (#5298) 2022-11-17 21:11:10 -05:00
Charles Bachmeier
f27d119181 feat: Sell bag styling (#5297)
match buy bag styles

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-17 17:26:29 -08:00
Jack Short
f2b85621f5 fix: adding back listing icon to profile page (#5289)
* fix: adding back listing icon to profile page

* responding to comments
2022-11-17 20:01:24 -05:00
Charles Bachmeier
d7bc0aaf4c fix: empty sell tag state (#5295)
fix empty sell tag state

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-17 16:51:30 -08:00
Jack Short
f50e0ca9f9 style: updating profile skeleton (#5293)
style: updating proflie skeleton
2022-11-17 19:29:41 -05:00
aballerr
84960b0cef fix: search bar width sizing (#5277)
* Updating Search Bar to be more responsive
2022-11-17 19:00:11 -05:00
Jack Short
42646003fe style: correct collection loading (#5288)
* style: correct collection loading

* review comments
2022-11-17 18:49:33 -05:00
Charles Bachmeier
321b8df3a2 fix: working profile scroll on mobile (#5291)
* working scroll on mobile

* just continue

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-17 15:18:36 -08:00
Jack Short
f1990ff001 style: adding header to top of profile page (#5285) 2022-11-17 18:13:32 -05:00
Jack Short
b48af759f1 style: moving mobile sell bag above tab bar (#5292)
* style: moving mobile sell bag above tab bar

* changing color

* changing to toggleBag

* cleanup imports

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-17 18:09:10 -05:00
Jack Short
3969f0414d style: correct padding for view my nfts (#5286) 2022-11-17 17:55:48 -05:00
aballerr
9dc6c60a1a fix: fixing button color (#5290)
fixing approve text color
2022-11-17 17:39:02 -05:00
Mike Grabowski
4b686a0147 fix: border radius on safari for carousel (#5274)
* fix: borders

* chore: potential fix

* chore: add bg to wrapper to avoid transparent lines

* simplify implementation

* chore: simplify code

* chore: add animations
2022-11-17 23:19:53 +01:00
lynn
f9f8eea6f6 fix: add filter text when filter button open (#5217)
* fix

* remove extra

* filter button text fixes
2022-11-17 16:30:54 -05:00
cartcrom
3f6dc180cf feat: update token icon sourcing (#5208)
* initial setup
* working version
* optimized image quality
* refactoring file structure
* updating backup logos
* cleaning up code
* refactored file structure
* fixing state update issue
* updated test
* fixed currency logo bug
* updated image background color
* finished pr comments
* fixed additional PR comments
2022-11-17 16:25:04 -05:00
Jack Short
7ce58b55a1 fix: play video on asset card (#5284) 2022-11-17 15:46:35 -05:00
Charles Bachmeier
e8d1067313 fix: tx screen tweak (#5283)
tx screen tweak

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-17 11:16:12 -08:00
Jordan Frankfurt
c12b0a6dab fix: adjust gap down to 16px on large screens (#5276)
* fix: adjust gap down to 16px on large screens

* pr feedback
2022-11-17 13:05:53 -06:00
Mike Grabowski
effc3d1c4d fix: rendering of glow effect on mobile safari (#5272) 2022-11-17 20:00:45 +01:00
Mike Grabowski
63a9bd4fbf feat: improve formatting of NFT prices with shared module (#5245)
* wip: change formatting of nft

chore: use a different package

use pure webpack instead

* revert changes to yarn.lock

* chore: update lock one more time

* chore: upgrade conedison

* chore: tweaks

* chore: handle 0

* chore: update to latest and use proper method

* chore: update conditional

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2022-11-17 19:59:40 +01:00
Charles Bachmeier
ca829a355c fix: tx screen overflow (#5282)
fix tx screen overflow

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-17 10:59:18 -08:00
cartcrom
8464fc70fe build: keep existing gql schema on fetch failure (#5149)
* updated fetch script

* fixed input too long error failing in cypress/vercel
2022-11-17 13:33:08 -05:00
cartcrom
dd68f89bf9 fix: blocked tokens not appearing or having icons (#5251)
* fixed blocked tokens not appearing or having icons
* removed previous blocked Icon
* updated snapshot
* changed to slash icon
2022-11-17 13:32:37 -05:00
Jordan Frankfurt
e42991c066 fix(bag): icon update to remove front handle (#5280) 2022-11-17 12:26:24 -06:00
Mike Grabowski
6eb699712d chore: fix horizontal overflow (#5279)
chore: fix overflow horizontal
2022-11-17 12:00:12 -06:00
Jordan Frankfurt
1d6662dfe3 fix: use ThemeButton for claim and view/sell nfts (#5278)
* fix: use ThemeButton for claim and view/sell nfts

* fix(bag): icon update to remove front handle

* Revert "fix(bag): icon update to remove front handle"

This reverts commit 8d8a40bd4a.
2022-11-17 11:31:31 -06:00
Jack Short
258be9bf65 feat: adding sudoswap to sweep (#5257)
* feat: adding sudoswap amm pricing

* integrated amm pricing on collection

* removing bag recalculation

* feat: adding sudoswap to sweep

* revisions

* typo

* adding back recalculating bag

* reformatting

* simplification

* bag recalculation for sudoswap

* responding to comments

* findindex
2022-11-17 12:04:05 -05:00
Mike Grabowski
8592703931 fix: right arrow in carousel not rotated (#5273)
fix: arrow rotate
2022-11-17 18:02:40 +01:00
Jack Short
44ecc9a203 feat: adding sudoswap price calculation (#5252)
* feat: adding sudoswap amm pricing

* integrated amm pricing on collection

* removing bag recalculation

* revisions

* typo

* adding back recalculating bag

* reformatting

* bag recalculation for sudoswap

* responding to comments
2022-11-17 11:48:10 -05:00
Charles Bachmeier
b19e7809ea feat: simplified duration dropdown (#5264)
* simplified sort dropdown

* add new file

* switch

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-17 08:02:49 -08:00
Callil Capuozzo
43a0bf4c31 style: polish explore banner blur effect (#5267)
* Update Banner.tsx

* Adjust dark theme opacity value
2022-11-16 22:07:30 -05:00
lynn
546423512a feat: Web 2233 erc 1155 card redesign (#5249)
* init

* init

* remove unnecessary style changes

* ensure no pointer events on tooltip
2022-11-16 21:57:25 -05:00
Callil Capuozzo
b13acb33ed style: explore table polish (#5261)
* Normalize explore styles

* slightly reduce row padding
2022-11-16 21:47:18 -05:00
Mike Grabowski
82c3193d21 refactor: better theming (#5259) 2022-11-16 20:26:26 -05:00
Charles Bachmeier
503fc37a4b fix: Can list and relist to all marketplaces (#5250)
* all listing working

* working when connected locally

* update LR and cleanup

* add comment about LR strategy

* use ms 60s

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-16 15:42:19 -08:00
aballerr
1788c9f3c0 fix: max depth error (#5258)
fixing max depth error
2022-11-16 18:21:50 -05:00
Connor McEwen
e1d489a6bc chore: update deploy action (#5254) 2022-11-16 14:50:14 -08:00
Mike Grabowski
9b31e7b66d feat: render background below navbar + remove overflow (#5247)
* feat: render bg below nav

* remove overflow on header

* chore: remove unused prop
2022-11-16 22:19:05 +01:00
Mike Grabowski
5696c61354 feat: add glow to trending table (#5248)
* feat: add glow

* chore: simplify

* chore: move component to theme
2022-11-16 22:18:53 +01:00
Callil Capuozzo
b30679c9f9 style: adjust grid behavior and update collection page styles (#5226)
* Update CollectionNfts.css.ts

* Css details

* Adjust css details

* CSS tweaks

* Adjust colors

* Color tweaks

* update font-size

* Update grid breakpoints

* Refine css grid behavior

* Add comments

* Update outline approach

* Tweaks from review

* Fixes from comments

* fix "sm" breakpoint on item grid

* fix mobile padding alignment and overflow issue

* Update card styles

* Fix overflowing banner dropshadow

* Add requested changes

* Simplify layout for filter chips and buttons

* Add breakpoint sprinkles

* Update Card.css.ts

* Add shared variable

* Address comments

* Address comments

* Clean up card styles
2022-11-16 16:11:17 -05:00
vignesh mohankumar
1572410c47 ci: GitHub CODEOWNERS (#5244) 2022-11-16 13:08:29 -08:00
aballerr
f3d5fe08b6 fix: setting up a single buy state (#5206)
* setting up a single buy state
2022-11-16 15:37:43 -05:00
Zach Pomerantz
247fbfdf01 fix: retain permit sig if amount decreases (#5253) 2022-11-16 12:18:31 -08:00
lynn
f391f1c719 feat: add tooltips when adding and removing from nft bag (#5222)
* init

* make sure tooltips dont appear during sweeps

* fixes comments from charlie

* style: example tooltip (#5238)

* refactor: remove unused CollectionProfile (#5229)

* ex

* centering

* fix: updating bag to not remove nfts on click (#5224)

* updating bag to not remove nfts on click

* chore: bump redux-multicall (#5211)

* chore: bump redux-multicall

* fix: updgrade multicall

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>

* refactor: remove unused nft utils (#5239)

* fix: remove Select All and Sell buttons in Profile (#5228)

* refactor: remove isSellMode in ProfilePage

* yes

* fix(token-details): remove balance summary links to current page (#5223)

* refactor: rm remaining unused nft code (#5243)

* chore: enable jsx-curly-brace-presence and autofix (#5242)

* fix: limit max volume change value to 9999% (#5227)

* fix web-2246

* chore: change to >

* chore: use single component

* fix: approve button font size (#5187)

* fix: approve button font size


Co-authored-by: 0xsaranonearth <saran.s@pillow.fund>

* fix: don't include accentActiveSoft background on navicon active state (#5240)

don't include accentActiveSoft background on navicon active state

* feat: render blurred collection cover photo in the header (#5233)

* initial commit

* feat: blurred header

* chore: replace with helper

* chore: cleanup

* chore: different extension

* chore: layout tweaks

* chore: tweaks

* chore: prevent weird text selection on double click

* chore: wip for linear gradient/plain color light mode

* feat: linear-gradient when image missing

* chore: clean up post merge

* feat: different opacity for dark/light mode

* chore: fix paddings

* refactor: remove unused nft css (#5241)

* refactor: remove unused nft css

* unused

* unused

* refactor: remove unused isSellMode, setIsSellMode in useSellAsset (#5236)

* refactor: remove unused isSellMode, setIsSellMode in useSellAsset

* rm

* fix: reverting navbar change (#5237)

* reverting mobile navbar changes

Co-authored-by: vignesh mohankumar <vignesh@vigneshmohankumar.com>
Co-authored-by: aballerr <alex.ball@uniswap.org>
Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: Mike Grabowski <grabbou@gmail.com>
Co-authored-by: S A R A N <44068102+saranonearth@users.noreply.github.com>
Co-authored-by: 0xsaranonearth <saran.s@pillow.fund>
Co-authored-by: Lynn Yu <lynn.yu@uniswap.org>

Co-authored-by: Jack Short <john.short.tj@gmail.com>
Co-authored-by: vignesh mohankumar <vignesh@vigneshmohankumar.com>
Co-authored-by: aballerr <alex.ball@uniswap.org>
Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: Mike Grabowski <grabbou@gmail.com>
Co-authored-by: S A R A N <44068102+saranonearth@users.noreply.github.com>
Co-authored-by: 0xsaranonearth <saran.s@pillow.fund>
2022-11-16 14:18:37 -05:00
lynn
d38854749b feat: view my nft cards redesign (#5246)
* init

* link
2022-11-16 13:49:45 -05:00
aballerr
10a1963801 fix: reverting navbar change (#5237)
* reverting mobile navbar changes
2022-11-16 12:46:30 -05:00
vignesh mohankumar
be7e808fff refactor: remove unused isSellMode, setIsSellMode in useSellAsset (#5236)
* refactor: remove unused isSellMode, setIsSellMode in useSellAsset

* rm
2022-11-16 11:42:56 -05:00
vignesh mohankumar
ef9a59a96b refactor: remove unused nft css (#5241)
* refactor: remove unused nft css

* unused

* unused
2022-11-16 11:23:10 -05:00
Mike Grabowski
78b6ef60ac feat: render blurred collection cover photo in the header (#5233)
* initial commit

* feat: blurred header

* chore: replace with helper

* chore: cleanup

* chore: different extension

* chore: layout tweaks

* chore: tweaks

* chore: prevent weird text selection on double click

* chore: wip for linear gradient/plain color light mode

* feat: linear-gradient when image missing

* chore: clean up post merge

* feat: different opacity for dark/light mode

* chore: fix paddings
2022-11-16 16:58:18 +01:00
Jordan Frankfurt
779a699ff0 fix: don't include accentActiveSoft background on navicon active state (#5240)
don't include accentActiveSoft background on navicon active state
2022-11-16 09:39:59 -06:00
S A R A N
02e5478c6e fix: approve button font size (#5187)
* fix: approve button font size


Co-authored-by: 0xsaranonearth <saran.s@pillow.fund>
2022-11-16 10:04:14 -05:00
Mike Grabowski
6520dd33fa fix: limit max volume change value to 9999% (#5227)
* fix web-2246

* chore: change to >

* chore: use single component
2022-11-16 16:03:16 +01:00
Mike Grabowski
c479239ab0 chore: enable jsx-curly-brace-presence and autofix (#5242) 2022-11-16 11:09:53 +01:00
vignesh mohankumar
55c3c527f5 refactor: rm remaining unused nft code (#5243) 2022-11-16 01:47:58 -05:00
Jordan Frankfurt
8b98597566 fix(token-details): remove balance summary links to current page (#5223) 2022-11-16 00:39:45 -06:00
vignesh mohankumar
bfcda30c04 fix: remove Select All and Sell buttons in Profile (#5228)
* refactor: remove isSellMode in ProfilePage

* yes
2022-11-15 18:48:29 -05:00
vignesh mohankumar
c7f0af6902 refactor: remove unused nft utils (#5239) 2022-11-15 18:36:05 -05:00
vignesh mohankumar
49b09148c6 chore: bump redux-multicall (#5211)
* chore: bump redux-multicall

* fix: updgrade multicall

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2022-11-15 18:12:33 -05:00
aballerr
8e2307cbdb fix: updating bag to not remove nfts on click (#5224)
* updating bag to not remove nfts on click
2022-11-15 18:11:53 -05:00
vignesh mohankumar
5978d1ec09 refactor: remove unused CollectionProfile (#5229) 2022-11-15 17:34:11 -05:00
Jack Short
c0638e9033 fix: adding amm pricing updates (#5225)
* fix: adding amm pricing updates

* responding to pr comments

* renaming

* adding filter to callback
2022-11-15 17:26:21 -05:00
vignesh mohankumar
ceafe40c65 refactor: remove unused WalletAssetDisplay (#5230) 2022-11-15 17:23:26 -05:00
vignesh mohankumar
86ee1dd666 refactor: remove unused icons (#5234) 2022-11-15 17:17:21 -05:00
Jack Short
95be7b1d5b fix: sweep marketplaces (#5231)
* fix: sweep marketplaces

* responding to pr comments
2022-11-15 16:53:35 -05:00
vignesh mohankumar
7ce022b28e refactor: rename ShoppingBag to Bag (#5232) 2022-11-15 16:18:05 -05:00
vignesh mohankumar
dd8233f869 build: don't fail local build on lint (#5219) 2022-11-15 12:39:25 -05:00
Jordan Frankfurt
947a078161 fix(bag): update active/hover/open-state styles (#5221)
* fix(bag): update active/hover/open-state styles

* bag svg update, item counter update
2022-11-15 11:27:30 -06:00
Danny Daniil
7add78ff80 fix: update analytics package to use default event (#5213)
new analytics version
2022-11-15 11:37:04 -05:00
Jordan Frankfurt
fdf511e283 fix(1155): don't show unique owners on collection page (#5218) 2022-11-15 09:59:14 -06:00
Mike Grabowski
99e491c4fc fix: remove empty collections from trending (#5215)
* fix: remove cyberpunks from trading

* nits

* chore: refactor loading a bit

* chore: bring back hardcoded value

* chore: remove import

* chore: filter out

* chore: use memo
2022-11-15 16:54:31 +01:00
lynn
ad84da10c9 fix: nft asset sizing / aspect ratio bug (and make collection nfts fit in square too) (#5180)
* init wip

* init
2022-11-14 22:10:38 -05:00
Mike Grabowski
72a8270084 fix: do not show floor/volume change on all (#5214)
* fix: do not show floor/volume change on all

* chore: nit

* chore: add new type of cell and fix lint

* chore: one more place
2022-11-15 02:45:16 +01:00
github-actions[bot]
62575092db chore(i18n): new Crowdin translations (#5072)
* chore(i18n): synchronize translations from crowdin [skip ci]

* empty

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-11-14 19:53:13 -05:00
Jordan Frankfurt
299f4c8afb fix(bag): CounterDot for small values (#5205)
* fix(bag): simplify header

* pr feedback: adjust margins

* add margin-auto instead of flex-basis for space-filling to get a more accurate click area

* pr feedback from lynn

* rename numberdot to counterdot

* fix(bag): header counter for small values
2022-11-14 18:35:24 -06:00
Jordan Frankfurt
f9eb46a09b fix: close bag when the user needs to connect a wallet (#5209) 2022-11-14 18:35:04 -06:00
Jordan Frankfurt
2970f9f1cb fix(bag): review asset buttons (#5182)
* fix(bag): review asset buttons

* clean up

* pr feedback
2022-11-14 18:34:49 -06:00
Charles Bachmeier
ce79774de9 feat: Details List CTAs correctly routes users to the list page with asset selected (#5204)
* start routing fn

* file renaming

* properly load NFtBalance data

* lazy load asset details

* extend useLoadNftBalance

* working go to list

* reset assets before routing

* reset state when entering via profile button

* remove cancel listing button

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-14 16:26:10 -08:00
Zach Pomerantz
cbefbba02c feat: send analytics for swaps modified in-wallet (#5212)
* build: upgrade analytics-events

* feat: better swap analytics
2022-11-14 15:25:05 -08:00
Zach Pomerantz
3acbcbc690 fix: err and warn if user modifies tx (#5210)
* fix: err and warn if user modifies tx

* fix: update message

* fix: clarify swap error name
2022-11-14 15:09:12 -08:00
Charles Bachmeier
7b086848bf refactor: lazy load asset details and profile page (#5203)
* properly load NFtBalance data

* lazy load asset details

* extend useLoadNftBalance

* handle different balance query formats

* correct load params
2022-11-14 14:38:02 -08:00
Zach Pomerantz
77a6d158ea fix: imperatively send SwapSigned (#5207) 2022-11-14 14:27:50 -08:00
aballerr
28be15ef9f fix: fixing color of buttons (#5179)
* fixing color states, price slider and navbar
2022-11-14 16:04:29 -05:00
Jordan Frankfurt
96dc7e0998 fix(bag): simplify header (#5185)
* fix(bag): simplify header

* pr feedback: adjust margins

* add margin-auto instead of flex-basis for space-filling to get a more accurate click area

* pr feedback from lynn

* rename numberdot to counterdot
2022-11-14 12:34:16 -06:00
vignesh mohankumar
c8f1c98639 fix: resolves infinite load for WalletConnect (#5156)
* fix: resolves infinite load for WalletConnect

* actually, only 1.7.8 exists

* dedupe

* 1.8.0
2022-11-14 12:53:46 -05:00
aballerr
8c3ba8bac3 fix: Simplifying opacity hover and fixing a link (#5200)
* Simplifying Opacity hover state and fixing a link styling
2022-11-14 12:29:38 -05:00
Charles Bachmeier
c563dd5a39 feat: add market logos to filters and chips (#5199)
* add market logos to filters and chips

* remove comment
2022-11-14 11:34:23 -05:00
unipadmini
bd8cd71452 style: Update banner text, font size, color. (#5195)
* chore: Update banner text, font size, color.

* fix css

* Update line height to 88.

Co-authored-by: Padmini Pyapali <padminipyapali@Padminis-MacBook-Pro.local>
Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-11-14 10:52:38 -05:00
unipadmini
61d0fd9062 fix: Add ETH to the floor price in trending collections banner. (#5194)
Co-authored-by: Padmini Pyapali <padminipyapali@Padminis-MacBook-Pro.local>
2022-11-14 10:22:36 -05:00
aballerr
68709ae65b feat: Details loading (#5162)
* Merging in details loading state
2022-11-14 09:33:50 -05:00
unipadmini
ac1e83ea9f fix: Collection name should link to collection page. (#5198)
Co-authored-by: Padmini Pyapali <padminipyapali@Padminis-MacBook-Pro.local>
2022-11-14 08:34:18 -05:00
unipadmini
6215911719 style: Reduce radius and increase padding of trait chips on collection/profile pages (#5196)
* style: Reduce border radius and increase padding of trait chips on collection pages.

* Update trait chips on profile/view my NFTs page.

Co-authored-by: Padmini Pyapali <padminipyapali@Padminis-MacBook-Pro.local>
2022-11-14 07:50:11 -05:00
unipadmini
fc81c6e37d chore: Change font weights for headlines from normal -> medium. (#5193)
Co-authored-by: Padmini Pyapali <padminipyapali@Padminis-MacBook-Pro.local>
2022-11-13 19:37:21 -05:00
Charles Bachmeier
9d5e0701e7 fix: disable polling after scroll (#5191)
disable polling after scroll
2022-11-13 13:33:38 -05:00
lynn
66bdfd8a94 fix: only disable erc 1155 in sell mode (#5183)
* init

* make height into variable

* respond charlie

* cleaner code

* dont include erc 1155 when selecting all

* fix

* disable select all for sus flag nfts too

* oops
2022-11-12 00:03:19 -05:00
Zach Pomerantz
935694630b fix: do not poll when loading more assets (#5184) 2022-11-11 14:54:26 -08:00
Zach Pomerantz
f8399fd03c fix: enforce uniform asset height (#5181)
* fix: show loading assets at uniform height

* fix: enforce the uniform asset height

* fix: memoize assets

* fix: be more lenient with uniformHeight

* fix: simplify mapping
2022-11-11 17:29:57 -05:00
Jordan Frankfurt
429ade5b20 fix: add back the border-radius for swap tx conf (#5164)
add back the border-radius for swap tx conf
2022-11-11 16:13:49 -05:00
Zach Pomerantz
5c21dd9852 fix: defer useInterval until callback resolves (#5096)
* fix: defer useInterval until callback resolves

* fix: avoid refs in useInterval
2022-11-11 13:08:29 -08:00
aballerr
2ce5990f60 fix: fixing header on light mode (#5178)
* fixing header on light mode
2022-11-11 15:29:31 -05:00
Charles Bachmeier
d56851561b feat: mobile filters menu (#5163)
* header and scroll

* allow sweep buy now off

* generic filter row header

* begin building sort dropdown

* add file

* working checkmark

* remove icons

* updating scroll to work with mobile

* prevent scorlling behind menu

* hover styles

* remove console.log

* respond to comments

* revert null

* styled component header

* filter item styled component

* padding for items, slider, and inputs

* fixed scroll on mobile

Co-authored-by: Alex Ball <alex.ball@uniswap.org>
2022-11-11 15:01:39 -05:00
Zach Pomerantz
5325b5f8b4 fix: nft waterfalls requests (#5168)
* fix: request all sweep data in parallel

* fix: trigger collection query from a wrapping screen

* load sweep for correct markets

* add preload logic for assets query

* add load query to explore table

* fix: cleanup AssetFetcherParams

* fix: preload trending collections

* fix: graphql array argument

* fix: actually use preloaded asset query

* fix: use network and suspense to actually parallelize

Co-authored-by: Charlie <charles@bachmeier.io>
2022-11-11 14:55:09 -05:00
lynn
27936cf3f5 feat: image cropping / sizing on view my nfts (#5177)
init
2022-11-11 14:54:37 -05:00
Jordan Frankfurt
ff6f43d7aa fix(bag-footer): remove double border top and excess margin (#5171) 2022-11-11 13:34:32 -05:00
lynn
f1443671ef feat: Web 1854 listed card (#5160)
* init

* it's working with jack's card.tsx components

* add nft details on cards for view my nfts

* listed cards ready for review

* remove unnecessary code

* updated radius

* first round charlie comments

* respond all comments

* init

* fix

* color

* remove floor price when not on sell mode

* remove floor when nft is listed

* feat: Web 1858 disabled card 1155 when sell mode is on (#5169)

* disabled states + tooltips

* remove collection asset changes

* popover offset changes

* respond to padmini comment

* respond to charlie
2022-11-11 13:22:19 -05:00
Zach Pomerantz
a95697daf8 fix: initialize analytics outside of react lifecycle (#5173) 2022-11-11 09:47:37 -08:00
cartcrom
0835744006 feat: replaced protocol disclaimer with privacy policy link (#5170)
copy updates
2022-11-11 11:28:27 -05:00
Danny Daniil
f5df2fed09 feat: de-148- Analytics package integration (#5093)
* integrate analytics sdk

* roll back vscode

* remove dup imports

* use dummy api key and url from env

* update analytics sdk for optional init

* yarn deduped

* update documentation

* add analytics events package

* getBrowser from analytics events

* remove token banner

* add origin app

* replace local analytics

* upgrade events version

* events 1.0.4

* remove importToken
2022-11-11 11:05:57 -05:00
aballerr
5e7f6333b1 fix: Activity updates (#5165)
* listing and styling updates
2022-11-11 09:34:55 -05:00
Zach Pomerantz
2aa4ec6a38 fix: clear or retain amounts on token select (#5161)
* fix: clear or retain amounts on token select

* lint: add curlies
2022-11-10 16:01:37 -08:00
lynn
a70ef4326d feat: unlisted view my nft cards (#5129)
* init

* it's working with jack's card.tsx components

* add nft details on cards for view my nfts

* listed cards ready for review

* remove unnecessary code

* updated radius

* first round charlie comments

* respond all comments

* fix

* remove floor price when not on sell mode
2022-11-10 15:28:17 -05:00
Zach Pomerantz
6edc73784c fix: show 6 sigFigs for tx history (#5135) 2022-11-10 11:23:03 -08:00
aballerr
da6e13130b fix: Several Listing Cleanup Items (#5119)
* Improving view my nfts and listing
2022-11-10 12:39:37 -05:00
Jordan Frankfurt
4ef4ea8f58 fix: give a bunch of list renders keys (#5158)
* fix: give a bunch of list renders keys

* pr feedback

* pr feedback
2022-11-10 11:51:04 -05:00
vignesh mohankumar
4438818f38 fix: don't fetch tokens on empty search (#5155) 2022-11-10 11:35:35 -05:00
cartcrom
12eb337444 fix: one point price charts + added suspense (#5030)
* Used suspense for graph queries
* cleaned up unused code
* updated skeleton
* fixed zach's pr comments
* removed console.log
* throw error on missing token details address
2022-11-10 11:00:32 -05:00
cartcrom
44163f54b1 refactor: remove unused selector list/import components (#5145)
* removed unnused components
2022-11-10 10:57:18 -05:00
vignesh mohankumar
4b282d7813 fix: don't fetch collections without flag (#5154)
* better way

* check if value
2022-11-10 09:21:21 -05:00
vignesh mohankumar
f862a3f975 chore: add accentAction to sprinkles (#5146)
* fix: update Checkbox to accentActive

* revert checkbox

* one definition
2022-11-09 20:10:38 -05:00
Greg Bugyis
48d5955185 feat: Log NFT Sell events (#5106)
* Log profile page view

* Log sell flow started

* Add Start Listing event

* Add constant for list modal + useTrace

* Log sell item added

* Log listing completed

* Fix usd_value property

* Move log to startListingFlow

* Use Set to remove duplicate marketplaces

* Move listing completed event
2022-11-10 01:57:30 +02:00
Charles Bachmeier
dbf5c63ece refactor: remove graphql flag and default to gql endpoints (#5151)
* remove graphql flag and old endpoints

* remove unused queries

* deprecate old sell order type

* better null checks

* merge conflict
2022-11-09 18:15:40 -05:00
vignesh mohankumar
37d2603406 fix: accentAction for FilterButton (#5147)
* fix: accentAction for FilterButton

* update
2022-11-09 17:15:36 -05:00
aballerr
9bb1ca2970 fix: Hiding block on nft (#5148)
* hiding block # and gwei estimate on nft pages since it often is behind other react components
2022-11-09 16:15:52 -05:00
Charles Bachmeier
2abae0ee4c refactor: replace sweep query with gql call (#5143)
replace sweep query with gql call
2022-11-09 16:05:57 -05:00
vignesh mohankumar
9f8355ed7b refactor: useIsNftPage hooks (#5142) 2022-11-09 16:01:34 -05:00
Greg Bugyis
c5bed1c6fb style: Font weight on Trending Collections table (#5121)
* Drop classnames on Trending Table TD cells (no longer used)

* Fix font-weight in Trending Collections table collection name to match Figma

* There was a newer Figma

* Fixes

* Extend maxWidth on collection name (mobile)

* Mobile/desktop tweak

* Fix mobile size and add constants

* Make truncatedText a styled component
2022-11-09 22:42:52 +02:00
Jordan Frankfurt
1411a92146 feat(sell-bag): closing link sell bag open/close state with sell mode activation (#5128)
* stash resolve

* toggling bag open/close also toggles sell mode
2022-11-09 15:18:52 -05:00
Jordan Frankfurt
d016bdd87c fix(identicon): fix wrapper border-radius (#5144)
* fix(identicon): fix wrapper border-radius

* pr feedback
2022-11-09 14:56:25 -05:00
aballerr
491ae578ab feat: Mobile status bar (#5141)
* Updating mobile status bar to shrink (nft enabled)
2022-11-09 14:48:23 -05:00
vignesh mohankumar
1df685f31e fix: default to buy now disabled (#5140) 2022-11-09 11:52:56 -05:00
Charles Bachmeier
02aeb43e62 fix: don't pluralize Filter Button with 1 result (#5139)
* don't pluralize results with 1 result

* pass in count for profile page
2022-11-09 11:15:34 -05:00
aballerr
1d849927ef fix: fixing loader (#5138)
Fixing bug in loader that would not use correct stroke color
2022-11-09 11:11:18 -05:00
Charles Bachmeier
1893d258b5 feat: add marketplace and trait counts to assets query (#5137)
* working total count

* trait counts

* marketplace counts

* carousel card

* undo count refactor

* Filter styles

* remove any cast and handle 0
2022-11-09 10:44:42 -05:00
Charles Bachmeier
ed7f126bd0 fix: updates to wallet asset schemas (#5132)
* updates to wallet asset schemas

* update map type and market check

* much better syntax
2022-11-09 10:31:30 -05:00
Jordan Frankfurt
9a38c4e58d fix(bag): don't close when the user switches pages (#5133) 2022-11-08 18:47:01 -06:00
aballerr
99f3998941 fix: Several bugs on nft, see comments for clarity (#5116)
* a number of minor fixes related to nfts
2022-11-08 17:39:49 -05:00
vignesh mohankumar
30fa88e3af fix: show transparent box on empty banner (#5131)
* fix: show transparent box on empty banner

* div
2022-11-08 16:20:12 -05:00
vignesh mohankumar
d951172a81 chore: update nft grays (#5124)
* chore: update nft grays

* forgot to change some out

* prettier

* add 700
2022-11-08 16:15:05 -05:00
aballerr
eb35d3a2a0 fix: price range and details screen sizing (#5094)
* adjustments to screen sizing and updating to work better with graphql
2022-11-08 15:36:52 -05:00
Charles Bachmeier
87455fc096 fix: sort explore table null values (#5130) 2022-11-08 14:41:21 -05:00
Greg Bugyis
054d92cb9c style: Fix Trending Table filter borders on Safari (mobile & desktop) (#5122) 2022-11-08 20:13:34 +02:00
Charles Bachmeier
36109a1fe7 refactor: update nft gql fetcher endpoint (#5126)
update gql fetcher for prod endpoint
2022-11-08 13:11:25 -05:00
Charles Bachmeier
8f8fe9ddad fix: lowercase markets for gql profile cards (#5127)
lowercase markets for gql profile cards
2022-11-08 13:11:00 -05:00
Charles Bachmeier
2b279e00f9 feat: virtual containers for collection pages (#5125)
* use fixedsizeList only

* add autosizer comments

* undo asset testing change

* init

* cleanup

* scrollbar styles

* scrollbar styles

Co-authored-by: Lynn Yu <lynn.yu@uniswap.org>
2022-11-08 12:15:21 -05:00
Jordan Frankfurt
9f5c588bdd feat(sell-bag): patch open/close behavior (#5107)
keep bag link in nav bar at all times
2022-11-08 10:14:00 -06:00
Charles Bachmeier
415b3a1548 fix: add more null checks for Asset gql query (#5123)
add more null checks for Asset gql query
2022-11-08 10:54:11 -05:00
Charles Bachmeier
4e7b8264c3 refactor: Wallet Assets GraphQL Query (#5053)
* begin nft balance integration

* inf scroll works

* working list

* update comment

* connect collection filters

* use lazyload

* update schema

* working with new schema

* details for nfs assets

* cleanup

* more null checks

* unique index for loading cards

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-08 09:02:39 -05:00
lynn
0ef6d1625a fix: collection stat line fixes (#5112)
fix
2022-11-07 19:45:23 -05:00
yyip-dev
0258460821 refactor: remove token promo banner (#5114)
* Remove token promo banner

* Remove unused variable and import

Co-authored-by: Yannie Yip <yannie@UNISWAP-MAC-072.local>
2022-11-07 19:42:03 -05:00
Zach Pomerantz
2246afcefb fix: only poll every 12s (#5110)
* fix: only poll every 12s

* refactor: clarify polling interval

* doc: polling interval

* docs: further clarification

* fix: ctor super first
2022-11-07 15:35:31 -08:00
vignesh mohankumar
e0767b1cb7 build: Revert "build: deploy on friday AMs" (#5113)
Revert "build: deploy on friday AMs (#5085)"

This reverts commit a5cb1f05dc.
2022-11-07 18:34:03 -05:00
lynn
15dd02fe6a refactor: filter panel (#5103)
* init

* remove unnecessary chagnes

* fix comments
2022-11-07 17:13:08 -05:00
lynn
562a386de7 fix: release phase 1 nav bar (#5111)
* init

* just release phase 1 nav bar

* oops
2022-11-07 16:16:06 -05:00
vignesh mohankumar
99bea34f14 chore: add new background to theme (#5109)
* chore: add new background to theme

* update snapshot
2022-11-07 16:05:57 -05:00
Greg Bugyis
58f1c6ff84 fix: Event property fixes (#5108)
* Fix usd value on NFT buy bag success

* Fix bag quantity property on nft_buy_bag_changed
2022-11-07 19:35:48 +02:00
Jordan Frankfurt
b2481d6ba8 fix(asset-details): if an asset has no listings, don't try to render them (#5088)
* fix(asset-details): if an asset has no listings, don't try to render them

* add todo
2022-11-07 10:22:03 -06:00
Zach Pomerantz
eaa9b51913 feat: nft polling (#5083)
* feat: nft polling

* docs: document the poll

* chore: add todo for cursor tracking

* fix: poll all pages

* 5s polling

Co-authored-by: Charlie <charles@bachmeier.io>
2022-11-07 07:28:38 -08:00
vignesh mohankumar
6f68980d86 chore: update design-system grays (#5097)
* chore: update design-system grays

* update snapshots
2022-11-04 17:40:42 -04:00
vignesh mohankumar
9e05c178b4 fix: move /profile to /nfts/profile (#5084)
* fix: move /profile to /nfts/profile

* add back variable

* fix

* rm shouldShowBag
2022-11-04 17:13:38 -04:00
Jack Short
d98808dae9 fix: for cutoff border radius (#5095) 2022-11-04 16:29:43 -04:00
Jack Short
01a749a755 fix: wrong types for set min (#5092) 2022-11-04 16:13:31 -04:00
Jack Short
c233ba1175 style: updating collection page for mobile (#5078)
* style: updating collection page for mobile

* addressing comments

* responding to comments
2022-11-04 16:13:17 -04:00
vignesh mohankumar
b1dc415fb5 fix: replaceState instead of pushState for collection filters (#5089)
* fix: replaceState instead of pushState for collection filters

* comment
2022-11-04 15:59:18 -04:00
Charles Bachmeier
1242aef466 fix: marketplace icons on details page (#5091) 2022-11-04 12:32:30 -07:00
Charles Bachmeier
7f2bb6c6ae fix: add back floor to search results (#5087)
* add back floor to search results

* fix search by address

* slice const
2022-11-04 12:16:35 -07:00
aballerr
4b1b6098f3 feat: Details implementation (#5059)
* Details Page Update
2022-11-04 12:06:39 -06:00
Jordan Frankfurt
53a6acc199 feat(bag): add check if the user has manually closed the bag (#5074)
* feat(bag): add check if the user has manually closed the bag, and don't reopen on asset add until bag is cleared

* pr feedback
2022-11-04 12:19:42 -05:00
Charles Bachmeier
bd0a32b07c fix: gql traits for collection (#5080)
fix gql traits for collection
2022-11-04 10:07:59 -07:00
lynn
7d480494ba fix: enlarge pfp icon (#5076)
* init

* init

* fix
2022-11-04 12:25:40 -04:00
Greg Bugyis
5caed66b39 fix: Remove rank on trending collection table (mobile) (#5086) 2022-11-04 18:04:22 +02:00
lynn
136c16bbae fix: fix sell bag empty state (#5079)
* init

* fix comments
2022-11-04 11:23:29 -04:00
lynn
691dcd269c fix: activity page polish (#5081)
* fix

* remove env omg
2022-11-04 10:37:38 -04:00
vignesh mohankumar
a5cb1f05dc build: deploy on friday AMs (#5085) 2022-11-04 08:45:24 -04:00
Callil Capuozzo
4a14db2d4c fix: Update pools page to match token table design (#4861)
* Update pool pages design

* Fix small text

* Mobile tweaks

* remove redesign flag

Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-11-04 02:10:19 -04:00
Greg Bugyis
a57c19bb45 feat: Collection Activity mobile fixes (#5073) 2022-11-03 21:35:24 +02:00
Charles Bachmeier
9fd6ab01de refactor: Asset Details GQL Query (#5037)
* add details query

* add new query file

* connect details gql query to page

* remove comment

* type refactoring

* working pooled asset logic

* useLazyload

* remove any cast

* Deprecated_SellOrder

* extranneous cast

* return markets

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-03 10:52:20 -07:00
lynn
48aa11403f fix: polish controller bar in collection and my nft page (#5069)
* fix

* remove console logs

* remove unused theme

* fixes
2022-11-03 13:21:36 -04:00
Jordan Frankfurt
31b0c3dc04 fix: remove border-top-x-radius (#5071) 2022-11-02 17:36:34 -05:00
Jordan Frankfurt
d575c72127 feat(nft-bag): wrong-network-cta (#5056)
* pull warning out into its own component

* add wrong network cta

* simplify sufficient balance logic

* consolidate warning and button text logic
2022-11-02 16:56:37 -05:00
Greg Bugyis
d400b9094d feat: Buy Bag events (#5062)
* Add activity boolean to Collection page event

* Log add-to-bag events

* WIP

* Bag update events

* Log pay event

* Bag success event

* Add bag signed event

* Move formatting function out to util

* Format event properties with utility function

* Remove console log and fix event on details page

* Remove commented code

* Fix event names to follow convention

* Move priceChangedAssets logging to useEffect

* Add modal constant and useTrace

* Fix typo
2022-11-02 23:21:02 +02:00
Charles Bachmeier
fda9d29d5e fix: prices passed in scientific notation (#5070)
fix prices passed in scientific notation
2022-11-02 13:48:02 -07:00
Charles Bachmeier
d74c05008b refactor: Add Collection Stats GraphQL query (#5022)
* add demo Asset Fetcher

* new file

* update fetcher

* update query name

* beginning integration type

* uncomment

* working mutant apes

* comment out debug logging

* pass in inputs to query

* update collections to handle inf scroll

* paginated query first attempt

* wrapped assetQuery

* building pagination, needs spread

* working pagination

* working sort

* use cacheconfig

* change query source in Collection page

* passed in filters

* fetch schema from main endpoint

* delete unused relayenv

* rename token_url

* easy GenieAsset refactoring

* add rarity

* update price info

* remove logging

* remove redundancy

* refactor usd price fetching for assets

* update standard and address

* remove unused cacheconfig

* add gql collection query

* dont repeat ethprice calc

* unmemo bools

* reduce duplicated usd price logic

* cleanup imports

* useUsd price hook

* restructure Traits datatype

* working traits

* add new markets

* resolve merge conflict

* totalVolume workaround

* update comment

* fix for totalVolume bug

* add sudoswap icon

* deprecate unused vars in GenieCollection

* interim rarity verified

* cleanup

* use forEach

* add comment

* undefined division

* cleanup

* usememo marketplace select

* update % formatting

* use updated prod schema

* useLazyLoad

* remove any cast

* re-add null checks

* respond to comments

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-02 13:33:08 -07:00
lynn
c8f365ca31 fix: adjust mobile view bag z-index (#5067)
init
2022-11-02 15:48:55 -04:00
lynn
66ab3e21c8 fix: dynamic padding based on screen sizes for collections + my nft (#5064)
* init

* my nft pages
2022-11-02 15:48:20 -04:00
vignesh mohankumar
d4b15a6de4 fix: show <.001 ETH in collection floors (#5065) 2022-11-02 15:32:24 -04:00
lynn
fe61365a11 fix: event filter styling adjustment (#5063)
* init

* jack comment
2022-11-02 14:10:23 -04:00
github-actions[bot]
c5047a9301 chore(i18n): new Crowdin translations (#4859)
chore(i18n): synchronize translations from crowdin [skip ci]

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2022-11-02 10:44:06 -07:00
lynn
d4f8f2a600 fix: remove blur transition as requested by bryan (#5060)
* init

* init
2022-11-02 12:12:19 -04:00
lynn
d41a5a4874 fix: nav bar icon sizes (#5051)
* init

* fix
2022-11-02 10:07:10 -04:00
lynn
2fe444f903 fix: make addresses clickable (#5040)
* init

* fix

* change color to primary

* fix

* respond to comments
2022-11-01 22:38:25 -04:00
Jack Short
155bf2e873 style: updated collection cards (#5047) 2022-11-01 19:15:50 -04:00
Jack Short
6e282a6d13 style: updating explore table (#5043)
* style: updating explore table

* pr comments

* addressing pr comments

* moved loading table to its own component

* removing clsx

* updating key for row

* updating spacing
2022-11-01 16:09:03 -04:00
lynn
d3a2e14d4d fix: stop nft id tag from getting cut off (#5049)
* init

* respond to comments

* fix
2022-11-01 15:46:50 -04:00
vignesh mohankumar
619c0a0f46 fix: sometimes show verified nft collections first (#5055)
* fix: sometimes show verified nft collections first

* simplify

* use showNfts logic

* rename

* use collections not trending
2022-11-01 14:55:07 -04:00
Jack Short
d4fb0913a4 feat: explore carousel (#5042)
* feat: explore carousel

* removing peeking cards

* mobile carousel and pr changes

* collectionStats fetching

* total listings calc
2022-11-01 14:37:00 -04:00
Charles Bachmeier
734a15e350 fix: Adds some null checks to Asset gql query (#5058)
* add some null checks

* undo susflag change

* fix not for sale logic

* fix rarity

* fix rarity format

* remove logging

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-01 11:06:53 -07:00
lynn
d3cbcc769c fix: remove radial gradient background effect from nft pages (#5057)
init
2022-11-01 14:05:06 -04:00
Charles Bachmeier
ab43800d8e refactor: add suspense loading states for Relay on Collection Page (#5021)
* add suspense loading states for Relay

* remove duplication

* cleanup

* add back in suspense wrapper

* rename to skeleton

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-11-01 09:48:04 -07:00
Greg Bugyis
74accb2b7e feat: Search result events (#5025) 2022-11-01 17:28:27 +02:00
lynn
289119833a fix: button color (#5052)
init
2022-10-31 17:28:02 -04:00
lynn
8445d61df0 fix: stat line polish (#5050)
init
2022-10-31 14:26:10 -04:00
lynn
ffb6318475 fix: collection banner sizing (#5039)
* fix

* fix in response to vm comments
2022-10-31 13:32:51 -04:00
lynn
b1a0c3d6a9 fix: Web 1616 make time stamp body bodysmall (#5046)
* copywriting change

* init

* remove prev change
2022-10-31 11:47:23 -04:00
lynn
42edf9750e fix: copywriting change (#5045)
copywriting change
2022-10-31 11:37:59 -04:00
Greg Bugyis
5398826400 feat: Log NFT explore events (#4997)
* Add page event and constant for NFT Explore

* Log trending row event

* Add chainID to table row log properties
2022-10-28 23:19:05 +03:00
lynn
d4884716e2 fix: when scrolled, remove blur on nav bar (#5035)
* init

* add transition animation as per fred rec

* add border transition rec by fred

* respond to comments
2022-10-28 16:12:02 -04:00
Zach Pomerantz
6712eafefe fix: display updated widget token immediately (#5020)
* fix: display updated widget token immediately

* fix: disable if undefaulted

* docs: add comment
2022-10-28 12:41:50 -07:00
aballerr
aba6c1a1f4 docs: adding comment to env (#5038)
* adding comment to env for clarity on exposed variables
2022-10-28 14:30:09 -05:00
Charles Bachmeier
964001fe78 refactor: update all nft fetchers to use v3 endpoint (#4894)
update all fetchers to use v3 endpoint

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-10-28 10:12:48 -07:00
lynn
449c323fbb fix: modify hyperlink styling in nft collection descriptions (#5012)
* init

* this isn't really correct but halfway there

* modify opacity as per slack discussion
2022-10-28 12:10:18 -04:00
Jordan Frankfurt
d290adb0b8 feat: add medium-button and use it nft bag for removal (#5014)
* add medium-button and use it nft bag for removal

* close icon hover states

* update bag row to use correct hover background color

* update x to opacity effect

* pr feedback
2022-10-28 10:04:13 -05:00
lynn
ac4e64db6c fix: Web 1544 filter bar remove transparent bg on nft collection pages (#5034)
* remove blur effect

* init
2022-10-28 10:31:10 -04:00
lynn
3a0c930113 fix: adjust padding on collection page from 32 to 48 (#5036)
fix
2022-10-28 10:30:58 -04:00
blairmason
58c94b7279 feat: amplitude proxy (#5026)
* configure amplitude sdk to send events to Uniswap reverse proxy
2022-10-27 13:33:10 -07:00
Zach Pomerantz
02d25daa4c build: upgrade widget to 2.18 (#5032) 2022-10-27 13:22:17 -07:00
Charles Bachmeier
ef57ff7611 refactor: NFT Assets GraphQL Integration (#4928)
* add demo Asset Fetcher

* new file

* update fetcher

* update query name

* beginning integration type

* uncomment

* working mutant apes

* comment out debug logging

* pass in inputs to query

* update collections to handle inf scroll

* paginated query first attempt

* wrapped assetQuery

* building pagination, needs spread

* working pagination

* working sort

* use cacheconfig

* change query source in Collection page

* passed in filters

* fetch schema from main endpoint

* delete unused relayenv

* rename token_url

* easy GenieAsset refactoring

* add rarity

* update price info

* remove logging

* remove redundancy

* refactor usd price fetching for assets

* update standard and address

* remove unused cacheconfig

* dont repeat ethprice calc

* unmemo bools

* reduce duplicated usd price logic

* cleanup imports

* useUsd price hook

* resolve merge conflict

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-10-27 10:08:25 -07:00
Charles Bachmeier
bed0b3ab1c fix: re-add verification icon for collections in search (#5028)
re-add verification icon for collections in search

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-10-27 09:38:54 -07:00
Zach Pomerantz
751ba3c62d fix: token price (#5018)
* feat: add decimals, wrapper to token query

* fix: construct token in details page

* fix: clean widget default behavior

* fix: actual defaulting again

* fix: split token from price queries

* fix: reimplement TokenPrice query

* chore: rm old code

* fix: keep loading chart while loading

* fix: mv loader down

* fix: loading chart
2022-10-26 18:53:44 -07:00
Zach Pomerantz
83bc6db74e fix: clean up widget token lock (#5017)
* feat: add decimals, wrapper to token query

* fix: construct token in details page

* fix: clean widget default behavior

* fix: actual defaulting again
2022-10-26 18:16:04 -07:00
Zach Pomerantz
058aa52faf fix: fetch decimals from token query (#5016)
* feat: add decimals, wrapper to token query

* fix: construct token in details page
2022-10-26 18:00:53 -07:00
Jordan Frankfurt
2e3950018a fix: update "item" to "nft" in closed bag mobile copy (#5015)
https://uniswaplabs.atlassian.net/browse/WEB-1567
2022-10-26 18:53:24 -05:00
Greg Bugyis
d86120a257 feat: Collection page log events (#4971)
* Log collection page view

* Make property names/intention more clear

* Remove console log

* Add event for Activity tab

* Filter events (buy now, marketplaces, and price range)

* Handle trait items

* Bump collection stats mobile padding

* Use shouldLogImpression to conditionally fire event

* Adding back trace on Collection page, still necessary

* Add back address property

* Drop Buy Now log, not part of first set

* Update filter properties to match spreadsheet

* Only trigger price range log if inputs contain a value

* Fix ordering on Page Names

* Capitalize text

* Add constant for filter types

* Add chainId as property
2022-10-27 00:44:46 +03:00
Zach Pomerantz
e2fea4a5fb fix: do not flicker when navigating tokens (#5013) 2022-10-26 10:27:50 -07:00
lynn
1f810f84be fix: remove chain selector for nft pages (#5002)
remove chain selector for nft pages
2022-10-26 12:56:26 -04:00
Jordan Frankfurt
f6ffc68ef7 fix: update bag header layout (#5005)
* fix: update-bag-header

* pr feedback
2022-10-26 10:49:41 -05:00
Jordan Frankfurt
b3c44f20d7 fix: bag footer layout (#5003)
* fix: bag footer layout

* pr feedback

* remove balance from footer
2022-10-26 10:37:35 -05:00
Zach Pomerantz
8a5045f635 fix: do not test rpc urls before walletconnecting (#5008) 2022-10-26 08:15:06 -07:00
Zach Pomerantz
c1607bbd52 fix: token details layout gap (#5004) 2022-10-26 08:14:38 -07:00
Zach Pomerantz
dfbed6b89d fix: rm connect wallet border (#5009) 2022-10-25 17:44:50 -07:00
Zach Pomerantz
c871e55d82 fix: clean up balance summaries (#4984)
* fix: clean up balance summaries

* fix: nits

* fix: off-chain balances

* fix: only show token under details

* fix: consolidate formatting
2022-10-25 13:46:25 -07:00
Jordan Frankfurt
f15ac091b4 fix: hover flash (#4998) 2022-10-25 15:21:19 -05:00
Greg Bugyis
6037d74cfb feat: page view event on NFT Details (#4995)
* Add details page to page constants

* Add page view event to details page
2022-10-25 22:46:41 +03:00
Zach Pomerantz
d0e4659d32 feat: transition between tokens details (#4981)
* fix: navigate to widget-selected token

* fix: leave tokens if default is already set

* refactor: clean up widget skeleton

* fix: clean widget skeleton

* feat: transition between tokens

* fix: flicker on chart draw

* fix: nits

* fix: pixel-match loader

* fix: rm debug clause

* fix: hr color
2022-10-25 12:16:01 -07:00
lynn
2d87e692e6 fix: change suspicious activity warning txt (#5001)
change text
2022-10-25 15:12:00 -04:00
lynn
f65fb5bc2b fix: fixes show more / show less (#5000)
* fixes font

* oops merge again
2022-10-25 15:11:25 -04:00
lynn
83597c0efe fix: enlarge stat line font (#4999)
fix font
2022-10-25 14:56:43 -04:00
Jordan Frankfurt
21ee680d3a fix: bag row item usd price alignment (#4996) 2022-10-25 11:14:03 -05:00
Jordan Frankfurt
627af50841 fix: total and 'my bag' text style update (#4994) 2022-10-25 11:04:12 -05:00
Zach Pomerantz
a955b3730e feat: navigate to widget-selected token (#4975)
* fix: navigate to widget-selected token

* fix: leave tokens if default is already set

* refactor: clean up widget skeleton

* fix: clean widget skeleton

* fix: nits
2022-10-25 08:56:15 -07:00
vignesh mohankumar
2f7c5b1df4 chore: remove remaining redesign flag usage (#4958)
* chore: remove redesign flag in base shared components

* remove more flags

* rm pending view

* chore: remove liquidity redesign flags

* rm searchmodal

* rm searchmodal

* rm searchmodal

* numericalinput

* rm remaining

* rm flag

* fix

* fixes

* !isactive fix

* fix appbody

* hoverdefault fix
2022-10-25 09:08:14 -04:00
lynn
8fca286099 fix: resolve some tokens not searchable by contract address in token selector cx bug (#4988)
* init

* ask zzmp question

* fixes omg

* remove comment

* comments

* respond to zzmp

* fix
2022-10-24 23:53:42 -04:00
cartcrom
8be9701700 fix: token selector contract address search (#4987)
* fixed contract address search not working after importing token
* fixed unsupported asset bug
2022-10-24 16:22:26 -04:00
Jack Short
d66002dc75 feat: nft sweep (#4972)
* adding slider

* removing test css

* initial sweep pass

* cleaning up sweep functionality

* adding eth amount for sweep

* handling input

* sweep does not add duplicates

* updating fetcher to handle traits + price

* locking sweeped items on contract addr change/ filter change

* final touches to sweep for desktop

* desktop sweep finalizations

* keeping state after close

* added mobile sweep

* loading state

* dedup

* addressing comments
2022-10-24 14:55:55 -04:00
Zach Pomerantz
b12e5270fa fix: sync network connector to wallet (#4985)
* fix: sync network connector to wallet

* fix: clean todos
2022-10-24 11:51:19 -07:00
lynn
a717818920 fix: truncate search token name earlier (#4956)
* truncate search token name earlier

* fixes in response to comments
2022-10-24 12:57:01 -04:00
cartcrom
d9434a1a9c feat: update token safety / lists / verification (#4968)
* removed selected list logic and state
* updated copy
* updated warning color
* updated lists and fixed native currency bug
* removed no-longer-relevant active list tests
* removed leftover list code
* copy and color changes
2022-10-24 11:53:00 -04:00
Jack Short
a920a93b3d feat: erc1155 specific functionality to details page (#4867)
* adding erc1155 specific functionality to details page

* style update
2022-10-24 11:34:39 -04:00
Jordan Frankfurt
0987a311cf fix(nft): empty bag state render (#4947)
* fix empty bag state render

* add tests
2022-10-21 12:38:30 -05:00
Jack Short
a97a6b7fa8 chore: update price range slider to rc-slider (#4980)
* chore: update price range slider to rc-slider

* removing styles

* decreasing stepsize
2022-10-21 13:37:42 -04:00
vignesh mohankumar
414b221727 fix: no margin-top for LoadingRows (#4979) 2022-10-21 13:33:15 -04:00
aballerr
bab2f47ac9 style: filters update (#4749)
* styles filter update
2022-10-21 09:43:30 -05:00
vignesh mohankumar
0323725543 fix: add padding to LoadingRow (#4931)
* fix: add padding to LoadingRow

* remove sortable on header
2022-10-20 16:20:39 -04:00
aballerr
f6a7c8568e fix: overflow and empty popup (#4973)
* fixing a popup bug and wallet overflow
2022-10-20 11:28:03 -05:00
Charles Bachmeier
a21bbfd5a7 feat: NFT GraphQL Feature Flag (#4969)
* add nft graphQl feature flag

* connect flag to env provider

* attempting metadata relay env switch

* working config

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-10-20 08:51:00 -07:00
cartcrom
5f431a1e26 feat: show wrapped native asset at top of token selector (#4967)
* finished feature

* simplified logic from pr comments

* added checking for disableNonToken back in
2022-10-19 18:41:12 -04:00
vignesh mohankumar
bf13b4a917 chore: remove redesign flag in swap (#4964) 2022-10-19 17:42:34 -04:00
vignesh mohankumar
c7ea77d292 chore: rm redesign flags from CurrencyInputPanel (#4966)
* chore: remove flags from CurrencyInputPanel

* one more rm

* unused

* unused
2022-10-19 16:06:37 -04:00
Connor McEwen
00d674376e chore: use the same font as the main app in the widget (#4853)
* chore: use the same font as the main app

* match css file

* use string since values are the same
2022-10-19 14:34:20 -04:00
Connor McEwen
afaa52e5e7 feat: use widget validate function (#4909)
* feat: use widget validate function

* load GA scripts
2022-10-19 13:30:42 -04:00
vignesh mohankumar
443cfe7540 chore: remove favoriteTokens flag (#4955)
* chore: remove favoriteTokens flag

* remove more favorites stuff

* unused imports
2022-10-19 12:55:45 -04:00
Jordan Frankfurt
6768e4f4f7 chore: clean up unneeded code (#4426) 2022-10-19 11:47:38 -05:00
vignesh mohankumar
a0e9211b71 chore: remove redesign flag in settings (#4959)
chore: remove redesign flag in base settings
2022-10-19 10:12:28 -04:00
cartcrom
aeeb3a248a fix: show blocked tokens warning (#4954)
shows blocked warning
2022-10-18 17:10:11 -04:00
lynn
3586a2884c fix: swap quote event (#4923)
* init

* testing

* remove console line

* remove todos
2022-10-18 15:24:50 -04:00
Greg Bugyis
5e2bdc4e4b feat: Update Collection Stats and number formatting (#4937) 2022-10-18 19:58:27 +03:00
vignesh mohankumar
f2a33b6f6b chore: rm redesign flag in WalletModal (#4957) 2022-10-18 12:38:57 -04:00
vignesh mohankumar
5462526f53 fix: hover state shows for full header cell (#4940) 2022-10-18 12:10:02 -04:00
vignesh mohankumar
4388bbe0a2 fix: don't crash on unexpected chain (#4952)
* fix: don't crash on unexpected chain

* skip if undefined
2022-10-18 11:30:12 -04:00
Greg Bugyis
6f2c09adea feat: NFT Collections: add 24-hour price change and delta arrow (#4913)
* Add 24-hour volume and delta arrow to Collection Stats

* Move 24-hour floor change after Floor stat in row

* Position percent change arrow with styled div

* Use math.round instead of toFixed()

* PR Feedback

* Remove console log
2022-10-18 00:46:03 +03:00
vignesh mohankumar
f9aadbbbdb chore: remove tokenSafety flag (#4944) 2022-10-17 17:30:44 -04:00
vignesh mohankumar
f8c0525512 chore: remove deprecated colors (#4945) 2022-10-17 17:28:33 -04:00
Yadong Zhang
175ffade5e fix: handled undefined circleLogoUrl and failed fetchQuery (#4916)
* fix: handled circleLogoUrl undefined.

* fix: catch error and return empty data.

* fix: added optional chaining for circleLogoUrl in TokenRow file.
2022-10-17 14:26:30 -07:00
vignesh mohankumar
cba30fb0b1 chore: remove navBarFlag (#4941)
* chore: remove navBarFlag

* move Polling
2022-10-17 16:44:11 -04:00
vignesh mohankumar
604b854ef7 chore: remove tokens flag (#4943) 2022-10-17 12:28:16 -04:00
lynn
332843f428 fix: add logging for token details (#4925)
logging for token details
2022-10-13 17:27:30 -04:00
Zach Pomerantz
cee32f9751 fix: display loaded logo on token details (#4922) 2022-10-13 12:15:09 -07:00
cartcrom
cb480706a2 fix: display 0 instead of '-' on explore table (#4892)
* fixed table display
* updated test
2022-10-13 14:00:22 -05:00
Zach Pomerantz
4f74267144 fix: prevent marking x-chain wrapped as native (#4921) 2022-10-13 11:34:27 -07:00
Jordan Frankfurt
f6b08e8ed1 fix: make background opaque (#4895)
* fix: remove old background-color flash (#4890)

remove old background-color

* fix: make background opaque

* refactor to fix dismissal bug and improve code quality

* fix merge errors
2022-10-13 13:33:40 -05:00
Zach Pomerantz
0faaa3f0c4 fix: disallow duplicate currencies in widget (#4919)
fix: currency equality check
2022-10-13 11:20:53 -07:00
lynn
6acc9300c0 fix: add origin to every event (#4918)
* add origin to every event

* remove console log
2022-10-13 13:38:52 -04:00
Zach Pomerantz
70d33fb255 build: upgrade widget (#4917)
* build: upgrade widget

* build: upgrade widget
2022-10-13 10:37:06 -07:00
Charles Bachmeier
c0db592ab5 feat: revised profile card designs (#4901)
* add default style

* update select button styles

* add styles for listed cards

* update index for profile skeleton

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-10-13 10:13:35 -07:00
lynn
a5c5567936 feat: widget analytics (#4869)
* chore: todos for analytics

* example

* another skeleton logging event

* feat: onSwapApprove

* feat: widget tracing

* feat: better useTrace

* feat: max

* feat: switch

* add trace amd remove onreviewswapclick

* onExpandSwapDetails

* feat: initial quote

* add event properties for wrap

* feat: update ack

* SWAP_SIGNED

* feat: submit

* fix: wrap type

* chore: tracing

* move format fn to utils

* fix: remove old background-color flash (#4890)

remove old background-color

* revert: add back phase0 bug fixes (#4888)

* Revert "revert: removing phase0 bug fixes temporarily (#4886)"

This reverts commit 06291a15a6.

* use token amount

* Revert "use token amount"

This reverts commit f47c00358b.

* dont render if empty

* fix: upgrade pkg to eliminate compile error (#4898)

* upgrade pkg

* dedup

* fix: Remove token selector flash of old ui  (#4896)

remove token selector flash of old view

* fix: Web 1561 logging event for clicking on explore banner toast +  WEB-1543  [Explore Banner] String should be sentence case (#4899)

* explore banner changes

* remove console log

* oops

* test: run tests on all PRs (#4905)

* fix: use correct optimism icon in explore (#4893)

* fix: click area should match button effect (#4887)

* fix: update font-weight values to match spec (#4863)

* fixes. working now verified on console.

* fix: mobile tweaks (#4910)

* update manifest theme colors to magenta

* text spacing and right positioning on very small screens

* feat: load token from query data (#4904)

* fix: do not fetch balances cross-chain

* build: updgrade widget

* feat: cleanly load and switch chains from widget

* fix: load token from query data

* build: trigger checks

* fix: do not override native token from query

* fix: catch error on switch chain

* refactor: useTokenFromActiveNetwork

* refactor: defaultToken behavior clarification

Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: vignesh mohankumar <vignesh@vigneshmohankumar.com>
Co-authored-by: cartcrom <39385577+cartcrom@users.noreply.github.com>
2022-10-13 12:20:59 -04:00
Connor McEwen
cdd5b66d1b fix: merge conflict 2022-10-13 11:38:26 -04:00
Zach Pomerantz
b65fffc5f7 feat: load token from query data (#4904)
* fix: do not fetch balances cross-chain

* build: updgrade widget

* feat: cleanly load and switch chains from widget

* fix: load token from query data

* build: trigger checks

* fix: do not override native token from query

* fix: catch error on switch chain

* refactor: useTokenFromActiveNetwork

* refactor: defaultToken behavior clarification
2022-10-13 11:38:26 -04:00
Jordan Frankfurt
a3a3e934a1 fix: mobile tweaks (#4910)
* update manifest theme colors to magenta

* text spacing and right positioning on very small screens
2022-10-13 11:38:26 -04:00
Jordan Frankfurt
8a4e07e6b2 fix: update font-weight values to match spec (#4863) 2022-10-13 11:38:26 -04:00
Jordan Frankfurt
7f4413c79c fix: click area should match button effect (#4887) 2022-10-13 11:38:26 -04:00
cartcrom
55beaf65a2 fix: use correct optimism icon in explore (#4893) 2022-10-13 11:38:26 -04:00
Zach Pomerantz
20fe76ad29 test: run tests on all PRs (#4905) 2022-10-13 11:38:26 -04:00
lynn
0d5bc753ca fix: Web 1561 logging event for clicking on explore banner toast + WEB-1543 [Explore Banner] String should be sentence case (#4899)
* explore banner changes

* remove console log

* oops
2022-10-13 11:38:26 -04:00
lynn
79507a4b03 fix: Remove token selector flash of old ui (#4896)
remove token selector flash of old view
2022-10-13 11:38:26 -04:00
lynn
3a1be04a36 fix: upgrade pkg to eliminate compile error (#4898)
* upgrade pkg

* dedup
2022-10-13 11:38:26 -04:00
vignesh mohankumar
ec523e5235 revert: add back phase0 bug fixes (#4888)
* Revert "revert: removing phase0 bug fixes temporarily (#4886)"

This reverts commit 06291a15a6.

* use token amount

* Revert "use token amount"

This reverts commit f47c00358b.

* dont render if empty
2022-10-13 11:38:26 -04:00
Jordan Frankfurt
c7b1aa2948 fix: remove old background-color flash (#4890)
remove old background-color
2022-10-13 11:38:26 -04:00
Greg Bugyis
9370383f64 feat: Remove value prop from NFT Explore (#4914) 2022-10-13 17:35:56 +03:00
Charles Bachmeier
9856c03566 fix: issues with NFT listing (#4828)
* can approve marketplaces for listing

* add consts

* fix issue with expiration time

* adding api key to env + changing variable

* updating env name to req

* removing console

* use v3 endpoint

* remove unussed util

* uneeded null check

* remove console.log

Co-authored-by: Jack Short <john.short.tj@gmail.com>
Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-10-12 15:24:55 -07:00
vignesh mohankumar
ec686bcaa5 chore: remove phase0 flags (#4833)
* chore: remove phase0 flags

* unused imports

* update snapshots

* fix link test

* use the data cy

* delete lists test

* rm wallet.test

* update snapshot

* fix: update default html background-color (#4881)

* Revert "fix: update default html background-color (#4881)"

This reverts commit 043f844067.

Co-authored-by: Connor McEwen <connor.mcewen@gmail.com>
2022-10-12 10:56:20 -04:00
vignesh mohankumar
06291a15a6 revert: removing phase0 bug fixes temporarily (#4886)
* Revert "fix: handle backspace out of /tokens (#4879)"

This reverts commit 3e40a6f5c6.

* Revert "fix: add padding-bottom to TokenDetailsLayout (#4882)"

This reverts commit f91b48e214.

* Revert "fix: updates outputCurrency link in mobile balance footer (#4885)"

This reverts commit e340f405b4.
2022-10-12 09:34:03 -05:00
vignesh mohankumar
3e40a6f5c6 fix: handle backspace out of /tokens (#4879)
* fix: handle backspace out of /tokens

* simplify banner

* simplify banner more
2022-10-12 09:05:53 -05:00
vignesh mohankumar
f91b48e214 fix: add padding-bottom to TokenDetailsLayout (#4882) 2022-10-12 09:03:14 -05:00
vignesh mohankumar
e340f405b4 fix: updates outputCurrency link in mobile balance footer (#4885) 2022-10-12 09:02:54 -05:00
Connor McEwen
24fc39b016 fix: upgrade widget to fix token selection field (#4878) 2022-10-12 00:41:55 -04:00
Zach Pomerantz
2fc3f3c00e fix: network token memoization (#4877)
* build: upgrade redux-multicall

* fix: memoize network token

* docs: invalid token
2022-10-11 21:41:20 -07:00
Connor McEwen
21e0faeb1e fix: actually fetch token object on page (#4875)
* fix: actually fetch token object on page

* syntax
2022-10-11 20:46:59 -04:00
Zach Pomerantz
4b71a8d5f4 build: upgrade widget (#4873) 2022-10-11 17:00:11 -07:00
Zach Pomerantz
4075965252 revert: "revert: "fix: use widget network connection"" (#4871)
Revert "revert: "fix: use widget network connection" (#4870)"

This reverts commit 3538312769.
2022-10-11 16:21:51 -07:00
Zach Pomerantz
3538312769 revert: "fix: use widget network connection" (#4870)
Revert "fix: use widget network connection (#4866)"

This reverts commit 2924f36970.
2022-10-11 16:06:17 -07:00
Zach Pomerantz
2924f36970 fix: use widget network connection (#4866)
* fix: switch network connector on other network token details

* fix: use jsonRpcUrlMap for widget

* fix: use widget network provider

* build: upgrade widget

* build: upgrade widget

* fix: SwapController typing
2022-10-11 15:45:43 -07:00
lynn
bf16dfa09c fix: fix twitter links (#4868)
* fix twitter links

* fix
2022-10-11 16:42:19 -04:00
Charles Bachmeier
910e86d6a2 feat: Add loading skeleton for profile page (#4823)
* Add loading skeleton for profile page

* add consts for sidebar width and padding

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-10-11 12:37:55 -07:00
Connor McEwen
537fea103e fix: revert max input formatting change (#4865)
revert max input formatting change
2022-10-11 14:16:52 -04:00
lynn
87a6e2709b fix: remove double $ render (#4864)
remove double $ render
2022-10-11 13:43:11 -04:00
Jack Short
d704e78223 feat: details owner actions (#4851)
* feat: initial pass at price details container

* feat: nft details owners actions

* adding check for bad types
2022-10-11 12:53:33 -04:00
Connor McEwen
8ceabd513c feat: upgrade widget build (#4862) 2022-10-11 11:48:33 -04:00
Zach Pomerantz
4806c69053 fix: map wrapped tokens to native tokens for top/trending (#4855)
* fix: map wrapped to native for trending tokens

* fix: close top tokens subscription

* fix: map wrapped to native for top tokens

* fix: link to native from native

* refactor: unwrapToken.ts

* fix: mv query to effect

* fix: native token logos

* fix: use NATIVE_CHAIN_ID

* fix: rm todo

* fix: include NATIVE_CHAIN_ID

* fix: NATIVE_CHAIN_ID import
2022-10-10 22:34:11 -07:00
github-actions[bot]
c9f333003b chore(i18n): new Crowdin translations (#4713)
* chore(i18n): synchronize translations from crowdin [skip ci]

* empty

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-10-10 23:23:39 -05:00
vignesh mohankumar
33fa32cb07 chore: remove unused TokensLoading (#4858) 2022-10-10 23:16:06 -05:00
vignesh mohankumar
5d1377af80 fix: track token_list_rank (#4857) 2022-10-10 23:15:47 -05:00
Zach Pomerantz
a75e239fd2 fix: keep search history synced with trending (#4854) 2022-10-10 19:34:27 -07:00
lynn
a663482dc6 fix: second part of price fixes (#4852)
* init

* use named args

* transaction price format

* respond to comments

* 1.00 rounding edge case
2022-10-10 22:09:02 -04:00
lynn
e8d6235529 fix: revise strings on token details + change privacy disclaimer edits to be enabled by phase 1 flag (#4856)
* init

* nft flag name change
2022-10-10 21:58:42 -04:00
cartcrom
d8677d8a6d feat: lazy load sparklines (#4827)
* testing removing sparklines

* fixed build

* filter working

* added lazy loading of sparklines

* fixed bugs

* removed comments

* add back memo

Co-authored-by: Connor McEwen <connor.mcewen@gmail.com>
2022-10-10 16:51:45 -04:00
Callil Capuozzo
351f66a83e fix: Update input placeholder text color (#4848)
Update input placeholder text color
2022-10-10 16:50:35 -04:00
omahs
79c7c01964 fix: minor typo (#4845)
Fix: typo

Fix: typo
2022-10-10 13:25:14 -07:00
Greg Bugyis
f51474b66d feat: [Collection Stats] update listings copy and change value to percentage (#4718) 2022-10-10 21:28:57 +03:00
lynn
14f01905d7 fix: price formatting spot check fixes (#4850)
fix price formatting
2022-10-10 13:49:32 -04:00
vignesh mohankumar
23eb31e6a2 fix: aligns token ranking column (#4849) 2022-10-10 13:28:19 -04:00
lynn
e8d4f00f49 fix: remove no tokens state and replace w loading (#4847)
* remove no tokens state and replace w loading

* update snapshot
2022-10-10 12:23:49 -04:00
aballerr
978e3f945d feat: adding in trait chips (#4807)
* adding in traitchips
2022-10-10 11:23:45 -04:00
Jordan Frankfurt
072f394476 feat(WEB-1457): update banner text (#4841) 2022-10-07 14:06:55 -05:00
lynn
5926d7037d fix: handle tiny numbers (#4842)
* handle tiny numbers

* remove console
2022-10-07 14:43:52 -04:00
lynn
52b51ee7d0 fix: price calculations are wrong (#4840)
* make every duration have latest price point

* simplify

* fix info tip icon regression

* remove unecessary line

* use memo

* fix MASSIVE ERROR in number cal

* bump widget v

* delete unit test failing for some obscure reason, added todo

* fix unit tests
2022-10-07 13:51:31 -04:00
Jordan Frankfurt
54f831ede4 fix(token-details): make breakpoints more consistent and use only theme.breakpoint values (#4836)
* fix(token-details): make breakpoints more consistent and use only theme.breakpoint values

* feat(token-details): design patch for mobile swap button footer

* render mobile balance footer w/ only swap button when user is disconnected

* don't render BalanceSummary if no balances are provided

* full width swap button footer until breakpoints.lg
2022-10-07 12:35:27 -05:00
Fred Zaw
c9ead63ff6 style: increase name column width in token table (#4835)
increase name column width in token table
2022-10-07 13:27:51 -04:00
Fred Zaw
9ca74cf8d2 style: updated crosshair light/dark color and stroke width (#4837)
updated crosshair light/dark color and stroke width
2022-10-07 13:24:21 -04:00
Connor McEwen
2a0d455419 fix: animation on mount wasn't happening (#4839) 2022-10-07 13:20:29 -04:00
Connor McEwen
9e959ca455 fix: import widget font (#4813)
* import widget font

* update comment
2022-10-07 12:00:42 -04:00
lynn
d3f6796bb9 fix: make sure every duration has latest price point (#4832)
* make every duration have latest price point

* simplify

* fix info tip icon regression

* remove unecessary line

* use memo
2022-10-07 11:44:36 -04:00
cartcrom
64d6eeabcb fix: info tip light theme issue (#4825)
fixed light theme issue

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
2022-10-07 09:59:58 -04:00
lynn
859258c25c fix: standardize decimals for token prices in explore, token details, search (#4821)
* token prices in explore, token details, search

* use correct dollar format function

* additional price corrections

* remove oopsies

* changes in notion from andy

* use currencyAmountToPreciseFloat everywhere
2022-10-06 20:27:23 -04:00
Jordan Frankfurt
2338255a54 fix(token-details): nits from design re: headers, spacing, layout (#4829)
* fix(token-details): nits from design re: headers, spacing, layout

* pr feedback
2022-10-06 18:26:51 -05:00
Zach Pomerantz
843afa93c3 fix: do not load token list (#4820)
* build: upgrade widgets

* fix: use empty token list

* build: trigger checks
2022-10-06 17:50:33 -05:00
Zach Pomerantz
5441e63825 build: upgrade widgets (#4824) 2022-10-06 14:35:34 -07:00
Charles Bachmeier
7bf741027e feat: profile listing sidebar (#4809)
* Add sell header to Bag

* split bag content to its own file

* empty tag state

* continue button

* file re-arranging and add profile select row content

* update padding

* better null check

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-10-06 14:23:57 -07:00
Zach Pomerantz
0017e2fcc8 test: use goerli (#4826)
* test: use goerli

* test: skip rinkeby-specific tests

* revert: retain arbitrum rinkeby
2022-10-06 15:16:58 -05:00
cartcrom
5c9c8b4cb7 feat: explore category info icons (#4787)
* added tooltips
* switched to premade tooltip component
* added 'help' cursor
2022-10-06 14:39:41 -04:00
Jack Short
873d0ea2a3 chore: breaking details into two containers (#4822)
* holding

* breaking up code into two areas for development purposes
2022-10-06 13:56:41 -04:00
Charles Bachmeier
db4987f557 feat: Sell Mode Button (#4803)
* remove sort and search functionality

* add sell mode button toggle

* update cards to sell mode

* split wallet asset display file

* remove unused style

* address comments

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-10-06 10:44:14 -07:00
Jordan Frankfurt
b0b61f886d fix: refactors the way chainId is accessed in some places (#4818)
fix: refactors the way some data is accessed
2022-10-06 11:55:46 -05:00
cartcrom
5d4b25f417 feat: chart states polish (#4819)
* init
* finished missing data component
* finished feature
2022-10-06 12:51:37 -04:00
Callil Capuozzo
c88d7c880b fix: Adjust verified icons to accentAction (#4804)
* Adjust verified icons to accentAction

* Adjust to match designs

* Apply verified icons in all places

* use theme.accentAction

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
2022-10-06 11:37:48 -05:00
Jordan Frankfurt
a96d13978b feat(token-details): link between native:wrapped assets in the balance summary (#4817)
* feat(token-details): link between native:wrapped assets in the balance summary

* update pageChainName access method
2022-10-06 11:36:52 -05:00
Jordan Frankfurt
22b26de78d feat(token-details): native/wrapped-native balance UI (#4814)
* feat(token-details): balance hook

* mobile balance UI

* feat(token-details): sidebar balance summary

* pr feedback
2022-10-05 22:46:24 -05:00
lynn
53b57879a3 fix: link to explore table when explore tokens banner clicked (#4811)
* token banner

* responses to jordan
2022-10-05 22:59:35 -04:00
lynn
d794cef770 fix: more explore table fixes (#4806)
* testing

* remove dev dep

* fixed

* fixes

* add developer comments

* link to eth token page when eth clicked in search bar

* undo commit to wrong pr / branch smh

* fix ascending sorted tokens index
2022-10-05 22:51:22 -04:00
lynn
19f175ba89 fix: make eth in search bar navigate to eth token details (#4812)
* make eth in search bar navigate to eth token details

* use local resolving functions
2022-10-05 22:44:27 -04:00
vignesh mohankumar
aaf105ef51 fix: add redirect from /tokens to /tokens/ethereum (#4816) 2022-10-05 20:14:32 -04:00
vignesh mohankumar
974308f939 fix: center TimeButton in PriceChart horizontally (#4795) 2022-10-05 19:28:33 -04:00
vignesh mohankumar
0ec738a48a fix: update hover states in control CurrencyInputSelector (#4815) 2022-10-05 19:27:12 -04:00
cartcrom
904f6e22f4 feat: search attempts route to current chain (#4785)
* finished feature

* added L2 icons

* removed console.log
2022-10-05 15:50:33 -04:00
cartcrom
66fad96e61 perf: improve token details query performance (#4808)
* updated hook
* fixed build error
2022-10-05 15:50:08 -04:00
cartcrom
9037930e56 feat: added widget skeleton to loading state (#4793)
* added widget skeleton to loading state

* removed memo

* made theme inline
2022-10-05 11:19:46 -04:00
cartcrom
d62013177d feat: add 52 w highlow (#4791)
updated query
2022-10-05 10:44:09 -04:00
lynn
fc08ede58a feat: privacy disclaimer change (#4790)
* privacy disclaimer change

* remove change for current site, only apply to phase 0
2022-10-04 18:38:55 -04:00
vignesh mohankumar
995a62985e fix: allows SwapDetailsDropdown to be opened (#4794) 2022-10-04 17:46:21 -04:00
aballerr
67d5a00a0c fix: fixes show more not showing on long collection description (#4789)
* fixes bug where show more does not always show up properly
2022-10-04 16:53:27 -04:00
lynn
84364c9df2 fix: make number of loading rows make more sense when filtering, changing duration etc (#4781)
* fix loading

* simplify

* respond to zach

* remove console log

* simplify and eliminate tokensListLength

* respond to nit
2022-10-04 16:40:24 -04:00
Jordan Frankfurt
446eb9f9a4 fix(IconButton): improves code quality and fixes a console error re: incorrect data- attribute syntax (#4788) 2022-10-04 15:37:57 -05:00
vignesh mohankumar
a73e814167 fix: swap hover states (#4771)
* Swap component tweaks

* Fix spacing issues and update swap arrows icon

* px

* fix ternaries

* 20px

* create a separate OutputWrapper

* variable

* update border radius case

* fix type

* use right variable

* move the containers around

* rename to swap section

* swapdetailssection

* remove unnecessary autocolumn

* border radius

* remove unnecessary wrapping div

* wrap the output swap stuff

* inherit border-radius

* update overlay styles

* remove floating bg

* fix ungated version

* fix background colors

* trying this out

* separate blocks

* accent action on the buttons

* undo

* show unselected state properly

* show on expert mode

* 0 not none

* handle margintop

* flag font size

* undo reverse icon change

* fix build

Co-authored-by: Callil Capuozzo <callil.capuozzo@gmail.com>
2022-10-04 14:10:42 -04:00
aballerr
7125562c9d fix: fixing issue with decimal in price range (#4784)
* fixing issue with decimal in price range
2022-10-04 12:27:50 -04:00
lynn
1361f99639 fix: remove ALL in time periods (temporary until v2 backend data available) (#4780)
* remove ALL

* fix to zach comments

* fix comment
2022-10-03 18:19:46 -04:00
lynn
d70a87a89a fix: new swap confirmation modal scroll style (#4768)
* init

* fix in response to cmcewen comment

* top getting cut off fix

* persist change for mobile
2022-10-03 16:27:32 -04:00
Jack Short
2cb0d9527e style: filling background color for collection header (#4774)
* style: filling background color for collection header

* udpating color
2022-10-03 11:17:07 -04:00
cartcrom
1839e145ec style: updating explore language and css (#4772)
* finished updating explore language and css
* implemented feedback from fred
* refactored css for row height
* extended filter option
2022-10-03 10:49:17 -04:00
lynn
8c1e41a3a8 fix: glitchy lazy loading (big jump / unnecessary scroll) (#4776)
* fix glitchy loading

* fix initial no tokens state
2022-09-30 17:23:05 -04:00
Charles Bachmeier
9859c0b4dd feat: add empty wallet state (#4765)
add empty wallet state

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-30 14:19:33 -07:00
Charles Bachmeier
1138101dd0 feat: profile entry point in wallet dropdown (#4760)
* refactor sell and select page to profile page

* add renamed profile pages

* add profile entry button

* add profile details header

* small adjustments for small screens

* add new details component

* show tag on correct page

* fix wallet dropdown height

* update header spacing

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-30 13:54:32 -07:00
Connor McEwen
106ac7ea35 chore: bump widget version (#4775)
* chore: bump widget version

* .2
2022-09-30 16:39:57 -04:00
Zach Pomerantz
19b4ee463b fix: memoize tokens in TokenDetails (#4777) 2022-09-30 13:04:52 -07:00
Connor McEwen
2aea96c3ba feat: fade in text on details page (#4773) 2022-09-30 14:28:02 -04:00
Connor McEwen
b1fb499e29 feat: animate in token details line chart (#4745)
* WIP

* animated in chart

* add comment

* revert env change

* comments

* merge main

* fix hard reload
2022-09-30 14:27:52 -04:00
Greg Bugyis
64207f29b0 feat: Log events on NavBar Search (#4761) 2022-09-30 20:56:16 +03:00
lynn
7b6ac6cfaa fix: update network warning styling (#4767)
* init

* respond to cmcewen comments
2022-09-30 13:51:58 -04:00
vignesh mohankumar
8a9ade5f12 fix: shorten SearchBar height (#4766)
* fix: shorten SearchBar height

* fix positioning
2022-09-30 13:27:33 -04:00
Connor McEwen
a3e567bc8a chore: upgrade react-spring version (#4770)
* chore: upgrade react-spring version

* remove interpolate

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-30 13:09:06 -04:00
Jack Short
a887666bf5 feat: mobile hover bag (#4742)
* initial hover bag

* feat: mobile hover bag

* updating mobile bag

* addressing comments and adding stuff to usebag
2022-09-30 11:26:27 -04:00
Jack Short
ed8aa08255 chore: remove extra decimals on cards (#4757)
* chore: removing decimals

* only on cards

* slight fix

* updating across app
2022-09-30 11:04:16 -04:00
aballerr
53f4fb9ede chore: Merging Loading states 2 (#4708)
* adding in remaining loading styles


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-29 14:56:53 -04:00
lynn
bb1ccb7f1a fix: price chart crash when undefined price point (#4763)
fix price chart crash
2022-09-29 14:08:37 -04:00
Jack Short
03fe90ad53 chore: updating pool tooltip (#4756)
* chore: updating pool tooltip

* updating to bodySmall
2022-09-29 13:24:52 -04:00
vignesh mohankumar
1601962f03 fix: use font-feature-settings in AppWrapper (#4759)
* font-feature-settings

* fix: use font-feature-settings across app

* move to appwrapper

* oops

* maybe better?

* fix
2022-09-28 18:14:00 -04:00
ICONation
ac8e59acba fix: Comparing formattedData reference with [] doesn't work as expected (#4717)
Fix comparing formattedData reference with [] 

This condition will always return 'false' since JavaScript compares objects by reference, not value. ts(2839)
2022-09-28 15:03:28 -07:00
vignesh mohankumar
5f6d17bfe2 fix: grow left panel in token details (#4754) 2022-09-28 17:50:05 -04:00
lynn
3c5fe00c30 fix: restores styling for verified and blocked tokens (#4753)
* fix

* update snapshot

* add blocked token icon

* repsond to vm
2022-09-28 17:30:11 -04:00
Jordan Frankfurt
91754848af fix(styles): revert global bold on links (#4755) 2022-09-28 16:12:08 -05:00
cartcrom
d8eb4d188a fix: display 0 percent change on explore (#4747)
* fixed issue
2022-09-28 16:49:04 -04:00
vignesh mohankumar
25d64911d4 fix: left align SearchBar when text present (#4752) 2022-09-28 15:45:52 -04:00
Zach Pomerantz
888f02dbaa fix: approval pending ux (#4693)
* fix: approval button colors

* feat: show spinner while pending wallet interaction

* fix: constant allow button height
2022-09-28 12:18:32 -07:00
vignesh mohankumar
728a5653be fix: update TokenDetails layout sizing (#4750) 2022-09-28 15:12:01 -04:00
vignesh mohankumar
a5dc0fddb8 fix: remove ignore exhaustive deps in SearchBarDropdown (#4746)
* fix: remove ignore exhaustive deps in SearchBarDropdown

* move into the effect
2022-09-28 13:48:56 -04:00
lynn
134f30e81f fix: resolve bug where changing duration when filter string is applied does not change data (original duration is still applied) (#4737)
* init middle of change

* init

* fix

* respond to jordan
2022-09-28 13:22:52 -04:00
Greg Bugyis
9b07ac2be4 feat: log token explore search event (#4695)
* Log token explore search event

* Move event directly above target element
2022-09-28 20:07:18 +03:00
vignesh mohankumar
571a49ba6f fix: no cursor pointer on SearchBar input (#4743) 2022-09-28 12:37:19 -04:00
vignesh mohankumar
077437e1f1 fix: update swap box styles (#4687)
* fix: update swap box styles

* fix balance text color/weight

* fix padding

* text color
2022-09-28 12:29:58 -04:00
vignesh mohankumar
ba9e509d67 refactor: split out SearchBarDropdown (#4744)
refactor: split out SearchBarDropdown.tsx
2022-09-28 12:26:01 -04:00
vignesh mohankumar
181ab149e3 fix: left align TimeOptions until small breakpoint (#4739)
* fix: left align TimeOptions until small breakpoint

* mobile fixes
2022-09-28 11:44:43 -04:00
vignesh mohankumar
5ef64c7dd1 fix: network filter container shouldn't expand on mobile (#4736) 2022-09-28 11:33:42 -04:00
vignesh mohankumar
0f6a675d0c fix: center TimeButton in PriceChart (#4738) 2022-09-28 11:31:19 -04:00
Jack Short
ec3552bbde style: updating bag styles (#4724)
* updating footer

* bag optimizations

* correct margins for price change rows

* pay button color

* adding fiat values

* using bodySmall
2022-09-28 10:25:18 -04:00
lynn
5783602694 fix: Web 1254 explore sparkline chart quality tweaks (#4732)
* init

* init

* undo random height padding

* revert weird merge mistakes

* fixes sparkline sizing

* respond to jordan comments

* add comments
2022-09-27 21:13:07 -04:00
vignesh mohankumar
9ba76992e4 fix: no hover on price estimate in swap (#4734) 2022-09-27 17:26:05 -04:00
vignesh mohankumar
d075ab6a74 fix: no hover on balance text in swap (#4735) 2022-09-27 17:22:02 -04:00
cartcrom
4cdfeaae34 feat: use new token lists (#4733)
* initial commit

* updates

* prevent unsupported from being validated

* removed unused export

* removed unecessary in

* removed unecessary brackets
2022-09-27 16:57:29 -04:00
Charles Bachmeier
e54b46910a feat: add deep shadow on card hover (#4730)
add deep shadow on card hover

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-27 13:36:06 -07:00
lynn
9558406c90 fix: revert simplify search bar filter string handling and reduce # of state changes" (#4731)
Revert "fix: simplify search bar filter string handling and reduce # of state changes (#4716)"

This reverts commit 86785c726a.
2022-09-27 15:15:10 -04:00
Greg Bugyis
f735c34841 feat: Trending Collections Table (#4694)
* Migrate Trending Collections: first pass

* Adding types for react-table

* Forgot to add yarn.lock

* Update sprinkles colors and add accentSuccess to match Figma

* Style cleanup

* Fix overlap on activity items and text wrapping on Value Prop

* Update header to new typography name

* Make entire table row link to collection

* Remove duplicated navigate() on table row

* Use borderStyle: none (sprinkle) instead of hidden

* Use common typography style for table header row

* Sprinkles for rank styles

* Sprinkles for TrendingOptions border styles

* Update color on trendingOption active state

* Restore useEffect to hide certain columns on mobile

* forgot to save one file

* Update accent color

* Use isMobile instead of breakpoint check
2022-09-27 20:33:15 +03:00
vignesh mohankumar
1aa4afad5f chore(theme): add stateOverlayPressed (#4690) 2022-09-27 13:08:15 -04:00
Charles Bachmeier
58005d81d6 fix: broken Details links (#4729)
fix broken Details links

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-27 10:00:02 -07:00
lynn
b0381c58e6 fix: Web 1258 token selector remove import from token list functionality (#4726)
* testing

* init

* respond to vm comments and remove dead code

* remove dead code

* update snapshot
2022-09-27 12:07:19 -04:00
Jordan Frankfurt
99a3cfafc9 feat: support NATIVE page for all supported chains (#4722)
support NATIVE page for all supported chains
2022-09-27 11:05:38 -05:00
Charles Bachmeier
6c908eb710 refactor: update card colors and rename backgroundAction (#4725)
update card colors and rename backgroundAction

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-27 08:48:13 -07:00
aballerr
dc15144a29 chore: merging loading states part 1 (#4626)
* Part 1 of merging in loading states


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-27 11:07:46 -04:00
Jack Short
34431bcb75 feat: porting over transaction screens (#4720)
* feat: porting over transaction screens

* cannot trigger unless flag enabled

* inital comment addressings

* adjusting zIndex

* changing zIndex when modal is open
2022-09-27 10:31:08 -04:00
cartcrom
0041b787ec refactor: remove unnecessary auth (#4723)
* removed aws auth
* updated fetching and package scripts
* updated url usage
2022-09-26 18:01:50 -04:00
cartcrom
868edc6028 fix: error when hitting enter on search (#4721)
* fixed issue
* fixed comment
2022-09-26 16:49:49 -04:00
Annie Ke
d8c84a91f4 chore: switch optimism testnet from kovan to goerli (#4719)
* chore: switch optimism testnet from kovan to goerli

* update supported chain id check

Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-09-26 14:42:47 -04:00
Jack Short
68282af457 feat: activity port (#4702)
* adding activitySwither

* in the middle of porting activity

* ported over activity leaving - working on breakpoints

* updating responsive design

* updating responsive design

* addressed comments
2022-09-26 14:34:46 -04:00
Charles Bachmeier
0ecb732331 refactor: update common typography (#4714)
update common typography

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-26 08:42:25 -07:00
lynn
86785c726a fix: simplify search bar filter string handling and reduce # of state changes (#4716)
fix search bar filter handling
2022-09-26 11:31:46 -04:00
Jack Short
10fe7f5213 feat: purchasing through bag (#4696)
* feat: purchasing assets from bag

* better state management for bag

* fix: comineItemsWithTxRoute.ts

* fixed purchasing assets in review
2022-09-26 10:17:59 -04:00
cartcrom
4deab7554c fix: search crash and explore row numbering (#4715)
fixed
2022-09-23 15:28:54 -04:00
cartcrom
b92c8007e4 feat: explore chain switching (#4710)
* initial commit
* replaced isUserAddedToken with chain-switching friendly version of hook
* reverted useTopTokens()
* addressed first round of PR comments
2022-09-23 15:15:59 -04:00
lynn
029f3acbd5 fix: fix explore table filtering and sorting bugs (#4705)
* fix explore table bugs

* temp

* fix search bar incongruency when navigating to other tab + remove flickering data

* add local cache

* more clear names

* add back useTopTokens return type interface

* respond to comments and dedup repeated code

* respond to cmcewen comments
2022-09-23 14:45:28 -04:00
Jordan Frankfurt
0b9fda5b25 feat(token-details): fix crash on undefined object access (#4712)
feat(token-details): fix crash on undefined object access +some small errors
2022-09-23 12:07:03 -05:00
github-actions[bot]
47816f2530 chore(i18n): new Crowdin translations (#4625)
chore(i18n): synchronize translations from crowdin [skip ci]

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2022-09-23 09:11:26 -07:00
Charles Bachmeier
73023499aa refactor: Sprinkles Design System Update Color (#4704)
* text primary and secondary

* backgroundOutline

* lightGray

* placeholder

* error and disconnect

* deprecate

* loading

* white opacities

* white

* border cleanup

* organize

* bagQuantity color fix

* fix nav border colors

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-23 09:00:53 -07:00
lynn
241043b616 fix: remove number from name in balances (#4711)
remove number
2022-09-23 11:41:29 -04:00
lynn
e97e117298 fix: show real balance in footer summary instead of dummy data (#4707)
real balances to footer
2022-09-23 11:06:55 -04:00
aballerr
b63e95388c chore: Merging in search, sort (#4675)
* Porting over search and porting over sort
2022-09-22 17:52:44 -04:00
vignesh mohankumar
ef8fba1d49 feat: add git commit hash on build (#4701)
* feat: add git commit hash on build

* process.env.

* works

* log

* import

* log full
2022-09-22 15:29:29 -04:00
Zach Pomerantz
be64c03d06 fix: track origin (#4700)
fix: add origin
2022-09-22 12:02:57 -07:00
Zach Pomerantz
45682ca59e feat: track Brave and UA (#4699)
* fix: track Brave from UA

* feat: track UA
2022-09-22 11:42:33 -07:00
Jordan Frankfurt
397b9d423e feat(explore): rewrite top tokens hook (#4697)
rewrite top tokens hook
2022-09-22 13:06:31 -05:00
Jack Short
d9113fb6d4 feat: adding suspicious and pooled asset icons to cards + rarity (#4686)
* adding pooled assets and suspicious assets icons

* adding rarity

* better way to get states
2022-09-22 12:44:43 -04:00
Jack Short
5dc0df2132 feat: initial bag port (#4665)
* initial bag port

* adding add to bag

* adding remove

* addressing comments

* reenable bag on disconnect when reviewing price changes
2022-09-21 16:44:46 -04:00
Jordan Frankfurt
7f2cc9a3e6 feat: add tvl to token details page (#4692)
* add tvl to token details page

* remove mcap, add explanation of market entities
2022-09-21 15:35:17 -05:00
Charles Bachmeier
d3c4ca6e09 feat: add Sell listing page (#4664)
* add listing modal

* add new files

* Add listing page

* remove useeffect

* re-add useeffect and includes array

* position relative

* add listing datatype

* use pluralize

* readable const

* clsx

* parseFloat 0 default

* don't use any

* cant use months for ms

* remove unused input style

* border sprinkles

* clsx

* duration enum

* remove unused index

* pluralize

* clsx

* pluralize

* type refactoring

* move format to utils

* remove uneeded check

* border sprinkles

* change input based on ref

* remove console.log

* correct warning check

* better clsx

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-21 13:30:28 -07:00
lynn
28538214d2 feat: new lazy load that scrolls whole window and not inside fixed size container (#4684)
* init

* messy but working omfg

* dont set initial to 500 set to just 1 for testing purposes

* it looks pretty now and works well

* sorting filtering and suspense loading are working

* fix comments

* handle token rows lacking addresS

* start working with new data schema

* new gql schema

* initial commit

* improved performance, added filtering

* lint

* removed comments and accidental settings.json changes

* refactor: switch explore over to new queries (#4657)

* initial commit
* improved performance, added filtering
* addressed pr comments
* fixed typescript issue

* merges

* fix

* fix oopsies

* fix accidental changes

* its working

* drop leftover comment

* clean up loaded row props

* respond to comments

* respond to jordan comments

* init

* remove unnecessary pkgs

* undo yarn lock changes

* loading rows fix

* change loading rows to 3 as per fred instruction

* remove anys

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
Co-authored-by: cartcrom <cartergcromer@gmail.com>
Co-authored-by: cartcrom <39385577+cartcrom@users.noreply.github.com>
2022-09-21 14:03:54 -04:00
Zach Pomerantz
4f48f3372c feat: weth check (#4685)
* feat: throw on invalid deposits

* feat: add new bug link

* chore: note the usage of error state
2022-09-21 11:39:35 -05:00
Jordan Frankfurt
9e070107a2 feat: new gql schema (#4654)
* new gql schema

* refactor: switch explore over to new queries (#4657)

* initial commit
* improved performance, added filtering
* addressed pr comments
* fixed typescript issue

* drop leftover comment

* clean up loaded row props

Co-authored-by: cartcrom <39385577+cartcrom@users.noreply.github.com>
2022-09-21 09:44:14 -05:00
vignesh mohankumar
2a92b2992f fix: remove hover state for chevrons in nav (#4681)
* fix

* fix
2022-09-21 10:28:22 -04:00
aballerr
e180153c3a chore: merge marketplace and traits (#4645)
* porting of filters

Co-authored-by: Jack Short <john.short.tj@gmail.com>
2022-09-21 07:22:05 -04:00
Greg Bugyis
e35f9e16a1 feat: NFT Explore Activity Feed (#4635)
* NFT Explore: Add Activity Feed to Banner section

* Renamed separate style file

* Fix positioning to not squish details section

* Add back activeRow state

* Hide Activity on smaller screens

* Fix for uneven widths between collections

* Addressing PR feedback

Co-authored-by: gbugyis <greg@bugyis.com>
2022-09-21 02:08:25 +03:00
vignesh mohankumar
8e955e9257 fix: fully round corner on account dropdown (#4682)
* fix: fully rounder corner on account dropdown

* comment
2022-09-20 18:38:32 -04:00
lynn
9ca44652b3 fix: make token detail chart full width and x axis fixes (#4669)
* full chart width

* add offsets to x axis start and end times so they dont get cut off

* hide ticks

* reduce offsets

* undo
2022-09-20 17:20:43 -04:00
vignesh mohankumar
3d89d72426 chore: feature flags token favorites (#4680)
* fix: fixes TokenTable header ordering

* flag favorite tokens

* imports

* remove fav col

* hide on token details
2022-09-20 16:36:44 -04:00
vignesh mohankumar
c2ffab3273 fix: center SearchBar vertically (#4677)
* fix: center SearchBar vertically

* oops
2022-09-20 16:36:23 -04:00
vignesh mohankumar
dbb62b613c chore: remove tokensNetworkFilter feature flag (#4679) 2022-09-20 15:57:22 -04:00
vignesh mohankumar
6f2d6e31c9 feat: add "approve in wallet" prompt on chain selector (#4673)
* logic

* working

* grid

* some file renaming

* Move to ChainSelectorRow.tsx

* remove flex

* more renames

* more styles

* fixes

* local imports

* more styling changes

* style

* fix mobile

* toggle open on open

* setIsOpen
2022-09-20 15:34:34 -04:00
vignesh mohankumar
944939a2e9 fix: makes sure wallet error is visible (#4676) 2022-09-20 15:32:11 -04:00
vignesh mohankumar
04164a550d fix: close WalletModal on connection (#4670)
* fix: close WalletModal on connection

* fix test
2022-09-20 14:08:09 -04:00
vignesh mohankumar
16a5e15070 fix: center Web3StatusConnectButton (#4671) 2022-09-20 14:02:59 -04:00
Charles Bachmeier
ee97d8d902 feat: add listing modal (#4663)
* add listing modal

* add new files

* remove useeffect

* re-add useeffect and includes array

* position relative

* add listing datatype

* use pluralize

* readable const

* clsx

* parseFloat 0 default

* don't use any

* cant use months for ms

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-20 10:45:22 -07:00
a6Ce6Bs
3d4b077b89 fix: networkProvider error (#4674) 2022-09-20 11:34:40 -05:00
pp-hh-ii-ll
0f4a89d938 fix: update Unisocks status icon and positioning (#4582)
* fix: update Unisocks status icon and positioning

Updates design of Unisocks icon and adjusts positioning to suit new design

* Update StatusIcon.tsx
2022-09-19 15:17:41 -04:00
vignesh mohankumar
0d0ec12dbf fix: normalize NavBar button heights (#4656)
* fix: normalize NavBar button heights

* chainswitcher and web3status are not using this component

* update nav icon
2022-09-19 14:50:30 -04:00
vignesh mohankumar
afe30a2c02 fix: reset Widget amount on URL change (#4668)
* fix: reset Widget amount on URL change

* empty
2022-09-19 14:50:16 -04:00
vignesh mohankumar
2f9289a2c5 fix: updates Widget defaultToken on URL change (#4666)
* fix: updates defaultToken on URL change

* rm usePrevious
2022-09-19 13:52:36 -04:00
vignesh mohankumar
7a9d2e80d0 refactor: move components/AmplitudeAnalytics to analytics (#4655)
* move components/AmplitudeAnalytics to analytics/amplitude

* move to analytics

* fix imports
2022-09-19 12:54:54 -04:00
vignesh mohankumar
d4b8735c04 fix: remove sendTestAnalyticsEvent (#4653)
* fix: remove sendTestAnalyticsEvent

* comments
2022-09-19 12:44:29 -04:00
vignesh mohankumar
d31687d0bf style: remove broken flex property (#4650) 2022-09-19 11:53:42 -04:00
vignesh mohankumar
470535dd33 fix: pass outputCurrency not inputCurrency (#4649) 2022-09-19 11:53:31 -04:00
lynn
27f53f1e99 fix: load correct initial display price and % delta w/o need for scrubbing on token detail chart (#4651)
* remove console logs

* fix in response to comments
2022-09-19 11:30:09 -04:00
aballerr
e7d498c95e chore: Merging details part 3 (#4637)
* Merging details part 3



Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-19 09:32:11 -04:00
vignesh mohankumar
02b617d297 fix: move token banner logic into Modals (#4638)
* move banner logic into Modals

* fixed

* z-index

* fix

* fix
2022-09-16 16:25:25 -04:00
vignesh mohankumar
96d04e1a7d fix: remove search overlay (#4648) 2022-09-16 16:24:13 -04:00
vignesh mohankumar
fe9d805d7c fix: link to swap with inputCurrency from mobile token detail (#4647) 2022-09-16 16:00:58 -04:00
vignesh mohankumar
b6c136839e fix: show copied text where address was clicked (#4646)
* pos x

* working

* tooltip width
2022-09-16 15:14:55 -04:00
Charles Bachmeier
8c947a0e0d feat: Add Select Page Modal (#4643)
* add select nfts shopping bag modal

* Add shopping bag to top lovel modal wrapper

* addressing comments

* rename to listingTag

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-16 11:31:25 -07:00
Charles Bachmeier
49c5cbbf3b feat: Add sell page filters sidebar (#4630)
* working sell filters

* split filters into own file

* include new file

* fix eslint warnings

* update filter button param and fix rerender bug

* de morgon's law

* usecallback

* move max_padding

* extend htmlinputelement for checkbox

* styles cleanup

* simplify checkbox sprinkles

* add null check to collectionfilteritem

* remove x axis scrollbar on collections

* update fitlerbutton logic

* scrollbar width

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-16 10:55:26 -07:00
Greg Bugyis
efaefe2e44 fix: Token Details chart: adjust curveTension on 1H chart timeframe (#4632)
Adjust curveTension on 1H chart timeframe
2022-09-16 20:19:20 +03:00
lynn
ed95f1b966 fix: add IP to test project for amplitude (#4644)
* init

* fix lint

* add comment

* lint fix

Co-authored-by: Lynn Yu <lynn.yu@ContangoITs-MacBook-Pro.local>
2022-09-16 13:13:30 -04:00
Jack Short
7ecbc552aa feat: cards resize to uniform height (#4639)
* feat: cards resize to uniform height if differenting heights in collection

* setting uniform height if card is video
2022-09-16 10:45:05 -04:00
Jack Short
dadc997398 chore: updating sprinkles z indices (#4641)
chore: updating sprinkles zindices
2022-09-15 19:10:43 -04:00
lynn
b90d6b5ab0 feat: amplitude swap fixes (#4627)
* init

* add back txn completed event
2022-09-15 17:53:45 -04:00
Jack Short
db5c6f82fd fix: search rerender (#4640) 2022-09-15 17:28:19 -04:00
lynn
f161f9617b feat: Web 924 explore use real data for the sparkline price charts (#4634)
* init

* test

* working w new hook

* simsplify

* fixes to comments

* extra comment remove
2022-09-15 17:27:33 -04:00
Connor McEwen
9d3249e6bd fix: rendering issues with modal/header (#4636)
* fix overlay issue with modal

* fix z index
2022-09-15 15:32:06 -04:00
Jack Short
f1c65afa98 feat: audio video nft collection cards (#4628)
* feat: video asset cards

* feat: audio cards

* square aspect ratio for videos

* adding playsinline
2022-09-15 15:12:23 -04:00
Jack Short
80c1f0cdf9 feat: nft filter bar (#4617)
* initial filter window

* filters

* filter button

* adding all filters to filter check

* sorting exports

* reviewing old css

* change to const

* responding to comments

* removing isMobile

* fixing radio input

* refactoring radio

* refactoring radio

* reusing the same class

* removing unused props

* removing useless clsx

* removing scrollToTop
2022-09-15 13:01:04 -04:00
aballerr
ea0fe83d00 chore: Merging details part 2 (#4594)
* Merging details part 2


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-15 12:28:04 -04:00
Greg Bugyis
994836fba7 style: Extend hover on secondary dropdown menu links (#4633)
* Full width hover on secondary menu links

* Remove commented line
2022-09-15 19:27:03 +03:00
Greg Bugyis
41aa1dcb0b feat: NFT Explore Value prop row (#4603)
* NFT Explore: value prop row

* Changes from PR feedback

* Tweak opacity values

* Style cleanup

* Adjust bg image on smaller screen sizes

* Remove unnecessary media query

Co-authored-by: gbugyis <greg@bugyis.com>
2022-09-15 11:48:15 +03:00
Zach Pomerantz
3965d3fdd9 feat: upgrade widget (#4629)
* feat: upgrade widget and use static connectors

* build: upgrade lockfile
2022-09-14 16:29:18 -07:00
cartcrom
ff6fd8a6e9 style: added transition ease to explore (#4616)
* initial commit
* updated transition css
* added opacity constants to theme, switched to using transition duration constants
2022-09-14 17:03:19 -04:00
taycaldwell
0a6906b23e fix: Swaps icons for light theme and dark theme (#4571)
Fix icons for light/dark mode
2022-09-14 14:17:36 -04:00
Charles Bachmeier
c38b5c0ce3 feat: migrate select page assets (#4618)
* add main nft sell page

* remove background

* more precise naming

* Add wallet assets for select page

* update styles while without filter bar

* remove unnecessary useeffect

* deprecate old stlye

* move to common props

* add round helper fn

* use react router link

Co-authored-by: Charlie <charlie@uniswap.org>
Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-14 11:07:58 -07:00
Zach Pomerantz
86f3b5a036 feat: caching provider (#4615)
* feat: caching providers

* feat: clear cache per block
2022-09-14 10:05:29 -07:00
Jack Short
382a44f040 feat: adding bag icon to navbar (#4619)
* feat: adding bag icon to navbar

* updating sell icon
2022-09-14 12:40:42 -04:00
Greg Bugyis
2d9604cd14 fix: Tick collisions on token detail price chart (#4623) 2022-09-14 17:19:38 +03:00
cartcrom
7930709bc3 refactor: unnesting token details into sectioned components (#4621)
finished refactoring
2022-09-14 10:19:18 -04:00
Zach Pomerantz
6fe2c92cee fix: reduce price fetching to every 2m (#4622)
* fix: reduce price fetching to every 2m

* fix: grammar
2022-09-13 15:16:01 -07:00
Jack Short
884dee2db3 fix: pointing nft links to the right url hash (#4620) 2022-09-13 17:03:08 -04:00
Zach Pomerantz
1f00c2a9c4 fix: fetch the usd price from parsed amount (#4612) 2022-09-13 10:31:30 -07:00
cartcrom
84070835df feat: token data cache (#4534)
* initial cache construction
* switched to relay cache, updated hooks
* fixed comments
2022-09-13 13:09:12 -04:00
Zach Pomerantz
fb389137e7 feat: adds ethers provider tracing (#4614) 2022-09-13 09:07:47 -07:00
Charles Bachmeier
c14b6a78ae feat: add main nft sell page (#4609)
* add main nft sell page

* remove background

* more precise naming

Co-authored-by: Charlie <charlie@uniswap.org>
Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-09-13 09:07:06 -07:00
Zach Pomerantz
a6c1c49f98 fix: update feature flags on update (#4613) 2022-09-13 09:03:59 -07:00
Charles Bachmeier
7848ad86bd fix: adjust search input width (#4610)
adjust search input width

Co-authored-by: Charlie <charlie@uniswap.org>
2022-09-13 08:39:57 -07:00
Charles Bachmeier
882c15dada fix: bug where changing tabs can open the searchbar (#4607)
* remove onFocus trigger

* typo on comment

Co-authored-by: Charlie <charlie@uniswap.org>
2022-09-12 11:39:07 -07:00
Charles Bachmeier
704ad222d9 feat: add animation to search skeleton and typing state (#4598)
* fade when loading

* fade results between searches

* trending search loading skeleton

* adjust skeleton and cleanup

* remove unused style change

* eslint

* add trendingTokens to query and remove unnecessary returns

* move array map compatibility higher in the call hierarchy

* add feature flag to isLoading param

Co-authored-by: Charlie <charlie@uniswap.org>
2022-09-12 10:47:53 -07:00
Charles Bachmeier
cfee80ce3c feat: Add animations for desktop, tablet, and mobile searchbar (#4584)
* animations working pre cleanup

* all sprinkles

* fix bug with phase1 search content

* new isTablet hook

* add conditional vars

* typeof window

* remove unneeded clsx usage

Co-authored-by: Charlie <charlie@uniswap.org>
2022-09-12 10:09:59 -07:00
github-actions[bot]
eb95cedd72 chore(i18n): new Crowdin translations (#4512)
chore(i18n): synchronize translations from crowdin [skip ci]

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2022-09-12 11:21:30 -04:00
vignesh mohankumar
99a7fb3383 fix: remove refetchOnFocus for routing-api (#4601) 2022-09-09 18:35:12 -04:00
vignesh mohankumar
7f4dbf9346 chore: update smart-order-router (#4600)
* bump SOR

* dedupe
2022-09-09 18:31:41 -04:00
Zach Pomerantz
09b00c9974 fix: use static rpc urls (#4599) 2022-09-09 14:58:13 -07:00
Zach Pomerantz
b74fb8174d feat: optimize AlphaRouter usage (#4596)
* feat: add RouterPreference.PRICE

* docs: add reference to quote params

* fix: cache routers between usages

* fix: tune price inquiries

* fix: note price queries tuning

* fix: clean up params - nix mixed

* fix: defer PRICE tuning
2022-09-09 13:07:53 -07:00
Jordan Frankfurt
a7ec5a64b7 feat(explore): add a simple search debounce (#4595)
add a simple search debounce
2022-09-09 14:09:08 -05:00
Greg Bugyis
c619dcf65d fix: Token chart - inconsistent x-axis time intervals (#4579)
* Use timeScale for x-axis

* Use d3 time intervals for ticks

* Drop slice for now, will handle differently

* scaleTime turned out to be unnecessary

* Use .nice() to help with tick spacing at start/end

Co-authored-by: gbugyis <greg@bugyis.com>
2022-09-09 22:08:57 +03:00
aballerr
1221d88e13 chore: Cypress utility function for selecting feature flags and walletdrop down cypress tests (#4536)
* Adding feature flag utility to cypress and adding wallet cypress tests


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-09 14:54:54 -04:00
Charles Bachmeier
48d2ead71d feat: update universal token search and trending tokens endpoint (#4593)
update universal token search and trending tokens endpoint

Co-authored-by: Charlie <charlie@uniswap.org>
2022-09-09 10:28:54 -07:00
aballerr
ed7099bfd6 chore: Merging details page (#4585)
* Initial merge of details page


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-09 13:23:41 -04:00
vignesh mohankumar
2604cdfdae fix: only initialize using chain query (#4567) 2022-09-08 12:16:29 -04:00
cartcrom
94dc389812 feat: widget speedbumps on swap review (#4544)
* initial commit
* finished feature
* addressed PR comments
2022-09-07 16:12:35 -04:00
Greg Bugyis
4a8c621f46 feat: add maxHeight to CurrencySearchModal (#4557)
* Add maxHeight to CurrencySearchModal (search only)

* Combine min and maxHeight into single modalHeight value

* Use clearer variable name to distinguish window height value

Co-authored-by: gbugyis <greg@bugyis.com>
2022-09-07 23:08:29 +03:00
aballerr
477af8af4e fix: Making sure all icons are 24px (#4580)
Making all icons size 24px on web status

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-07 15:47:24 -04:00
aballerr
a9a7d524aa fix: fixing token colors and token select persistence (#4575)
* fixing token colors and token select persistence

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-07 13:35:00 -04:00
aballerr
1cdaff8ddf fix: fixing match design (#4577)
* fixing select token favorite icon to match design



Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-07 12:44:19 -04:00
aballerr
eeea3d2dcc fix: fixed wallet scrolling issue (#4574)
* fixed scrolling issue for wallet


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-07 11:44:33 -04:00
lynn
f46b6a0697 fix: ensure nav bar goes above all other components when scrolling (#4576)
* fix nav bar below other components issue

* respond to comments
2022-09-06 17:18:54 -04:00
lynn
622581ee0a feat: show real values for current network balance (#4565)
* init

* remove card when balance is zero

* remove commented code

* remove commented
2022-09-06 11:50:02 -04:00
Yadong Zhang
eb725f51ce fix: handled liquidity minPrice and maxPrice are empty case. (#4569)
thanks!
2022-09-04 18:37:42 -05:00
lynn
4d4462368b fix: add back usd volume to swap submitted from ui instead of infura hook (#4563)
* init

* typo
2022-09-02 14:56:05 -04:00
lynn
6fe5d4363d fix: remove warning icon on search (#4564)
init
2022-09-02 14:55:50 -04:00
Jordan Frankfurt
b46fa27084 feat: disable branding on swap widget (#4561)
* feat: disable branding on swap widget:

* pr feedback
2022-09-02 10:03:06 -05:00
lynn
ade2440613 fix: missing logo redesign (#4535)
* fix: logos

* different font sizings for diff token sizes from fred

* remove missing symbol

* fix

* fixes to comments

* fix

* use calc instead of fn

* add comment
2022-09-01 17:51:43 -04:00
Jordan Frankfurt
4dc4620b60 feat: integrate widget tx states (#4553)
* feat(widget): sync transaction states

* s

* waiting on type release

* slippage is all that remains

* finalize tx integration

* pr feedback

* pr feedback - else if

* update @uniswap/widgets to 2.7

* add slippage tolerance from transaction.info
2022-09-01 13:17:39 -05:00
aballerr
202c2662f1 fix: Adding socks icon to users profile icon (#4545)
* Adding icon for socks owner for p0 redesign


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-01 14:08:49 -04:00
Charles Bachmeier
d2afd71c81 fix: change from flex to inline to fix safari bugs (#4559)
change from flex to inline to fix safari bugs

Co-authored-by: Charlie <charlie@uniswap.org>
2022-09-01 08:29:46 -07:00
aballerr
bad1ce2618 fix: Prod has chevron (#4558)
Remove chevron from prod

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-09-01 10:20:09 -04:00
Vignesh Mohankumar
f194845b2b chore: remove theme.blue200 (#4533)
* chore: remove theme.blue200

* favorite button changes
2022-08-31 20:13:21 -04:00
Jack Short
98d4e108e6 fix: search icon bug (#4556) 2022-08-31 19:35:06 -04:00
lynn
ab43ed1900 fix: connect wallet button chevron styling fixes (#4554)
* fix

* simplify
2022-08-31 18:16:42 -04:00
Greg Bugyis
b147e047a5 fix: Bump height on LineNumberCell and pass header boolean (#4548) 2022-08-31 20:36:23 +03:00
Charles Bachmeier
bbb616f56c feat: auto set cursor on searchbar opening (#4552)
* auto set cursor on searchbar opening

* comment update

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-31 10:33:51 -07:00
Charles Bachmeier
35a429ea65 feat: highlight first result by default (#4551)
highlight first result by default

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-31 10:33:33 -07:00
Zach Pomerantz
bd16543c10 build: upgrade @uniswap/widgets to 2.5.0 (#4546)
* build: rm d3-curve-circlecorners entry

* build: upgrade @uniswap/widgets package

* fix: widget input typing
2022-08-31 10:29:50 -07:00
Charles Bachmeier
cbdeae276e feat: adjust bottom navbar padding (#4550)
adjust bottom navbar padding

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-31 09:57:42 -07:00
lynn
e733113963 fix: modify chart axis to to match crosshairs in year view (#4547)
* fix

* simplify

* refactor

* move logic to monthTickFormatter

* time to date string
2022-08-31 11:31:33 -04:00
aballerr
272b030b89 fix: Fixing border overlap and reducing button size (#4537)
* fixing styling on wallet border

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-31 11:11:37 -04:00
Jack Short
472a553d13 fix: catch invalid address token details (#4529) 2022-08-30 17:25:59 -04:00
cartcrom
3a1bff146c feat: adding token safety article link (#4532)
updated article link
2022-08-30 17:24:23 -04:00
lynn
b82b9acc54 fix: remove stablecoin usd val fetch in logging to reduce infura spend (#4543)
remove stablecoin usd val fetch reduce infura
2022-08-30 15:15:49 -04:00
cartcrom
fac3845756 fix: missing segments of price chart (#4541)
fixed missing segments of line
2022-08-30 12:28:52 -04:00
Charles Bachmeier
9381a74f1d feat: nav update to new responsive designs (#4542)
* uppdated mobile nav

* adjust searchbar for new styles

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-30 09:08:10 -07:00
Charles Bachmeier
f6662a3208 fix: hide right and left border on mobile dropdown (#4540)
hide right and left border on mobile

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-30 07:15:50 -07:00
pp-hh-ii-ll
134af82d90 fix: updated color definitions for backgroundModule, add scrolledSurface (#4538)
Updated color definitions for BackgroundModule and tokens list in Explore page

Update Dark Mode BackgroundModule to Grey800 to match new design spec

Update Widgets theme to use BackgroundModule for Module

Update Token List in Explore page to use Surface instead of Module

Add Scrolled Surface color definition
2022-08-29 22:00:34 -04:00
Vignesh Mohankumar
75175b8e54 fix: don't track balances/values (#4539) 2022-08-29 18:46:37 -04:00
Greg Bugyis
e3d8599dc7 fix: [TokenDetails] Glyph placement on line chart (#4525)
* Modify line curve on token price chart to fix inconsistency on steep drops/increases and glyph placement

* Make curve required on LineChart

* Add curve to SparkLine chart

* Remove dependency: d3-curve-circlecornders - no longer used

* Drop d3-curve-circlecorner from react-app-env

Co-authored-by: gbugyis <greg@bugyis.com>
2022-08-29 21:40:05 +03:00
Charles Bachmeier
77ee69ad52 fix: search flash of no tokens found when typing (#4531)
* add null check to collection floor price

* don't show 0 if floor is null

* use debouncedSearchValue

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-29 10:47:42 -07:00
lynn
4b82838f80 fix: add back cancel button in token safety for swap (#4527)
* add back cancel button in token safety for swap

* also add to swap flow
2022-08-29 13:08:30 -04:00
Jack Short
a177829976 style: switching hovered and idle colors (#4526) 2022-08-29 12:49:36 -04:00
Kaylee George
b8b4f960dd fix: tokens banner link works (#4522)
* maybe fixed?

* fix

* fix link
2022-08-29 12:48:13 -04:00
Charles Bachmeier
2466414307 feat: search when no results there is too much top padding (#4530)
* add null check to collection floor price

* don't show 0 if floor is null

* remove top margin for no results

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-29 09:43:50 -07:00
Charles Bachmeier
a3a32f0d68 fix: add null check to collection floor price (#4528)
* add null check to collection floor price

* don't show 0 if floor is null

* formatEthPrice accepts udnefined

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-29 09:38:22 -07:00
Vignesh Mohankumar
ee001f86f0 refactor: remove isChainAllowed (#4494) 2022-08-29 10:21:18 -04:00
lynn
87d6975bd8 fix: stop swap layout shifts when reverse token button clicked (#4523)
fix
2022-08-26 17:22:58 -04:00
Kaylee George
4cab4e27ff fix: fix favorites button responsiveness on tokens explore (#4520)
fav button responsiveness
2022-08-26 16:47:41 -04:00
Kaylee George
f105f0995b fix: formatted delta on mobile view of token explore (#4519)
fix delta
2022-08-26 13:42:38 -07:00
Kaylee George
18e89a7353 fix: rm right padding on token details (#4518)
rm padding on mobile
2022-08-26 16:32:23 -04:00
Charles Bachmeier
445f9a67a4 fix: mobile network switcher (#4516)
* fix: mobile network switcher

* fix zindex

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-26 13:01:20 -07:00
Jack Short
4c039c900c fix: wrapped native asset resolve to their appropriate native asset o… (#4497)
* fix: wrapped native asset resolve to their appropriate native asset on respective chains

* addressed comments
2022-08-26 14:42:34 -04:00
Kaylee George
2c2e0a3419 fix: vertically center the explore table header text (#4514)
center
2022-08-26 14:41:34 -04:00
aballerr
1b43e0b28a fix: wallet mobile ui changes (#4515)
fix wallet mobile

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-26 14:41:02 -04:00
Connor McEwen
a23f7782b2 fix: widget module color (#4513) 2022-08-26 14:40:33 -04:00
Zach Pomerantz
723db9d0ea feat: integrate widget settings/value (#4499)
* widgets: v2.2.0

* refactor: wrap Widget

* feat: integrate widget settings

* refactor: import from widgets

* fix: better settings integration

* fix: include types

* chore: formatting

* build: bump widgets version

* feat: integrate widget value

* feat: integrate widget token selection

* feat: clean up widget integration

* build: bump widgets version

* refactor: mv widget wrapper to components

* refactor: split widget integrations

* refactor: value -> inputs

* fix: consolidate slippage hooks

* fix: memoize currency search modal

* refactor: clarify widget code

* fix: allow loading token in widget

* fix: add TradeType helpers
2022-08-26 11:19:51 -07:00
lynn
cbf165dc40 fix: oops (#4511)
oops
2022-08-26 11:12:48 -07:00
Kaylee George
6f3579acf1 feat: add token explore promo banner (#4481)
* initial design

* progress

* add background image

* add logic

* update

* delete unneed state

* more

* redux

* redux

* more redux

* rebase main

* rm unused state

* rm unused export

* relative link
2022-08-26 11:00:50 -07:00
lynn
c9e2f86e57 feat: add i18n to token detail and token explore (#4510)
init
2022-08-26 13:51:29 -04:00
aballerr
8c0199119e fix: Fix to mobile wallet experience (#4508)
* fixing wallet on mobile and making useClickoutside more extensible


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-26 13:35:38 -04:00
Kaylee George
5e6e6be888 fix: fix decimal formatting of token price on details page (#4470)
* init

* 6 decimals

* dollar dollar bill yo
2022-08-26 10:19:29 -07:00
github-actions[bot]
79fb6485b1 chore(i18n): new Crowdin translations (#4495)
chore(i18n): synchronize translations from crowdin [skip ci]

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2022-08-26 13:16:06 -04:00
Greg Bugyis
29baaaf2ed fix: Token Warning dismiss/redirect (#4482)
* Remove cancel option from TokenSafety modal

* Only redirect if token is blocked

* Remove unused variables

Co-authored-by: gbugyis <greg@bugyis.com>
2022-08-26 20:10:54 +03:00
Kaylee George
f824fb25c2 fix: explore table hover state colors (#4479)
* fix hover state colors

* colors

* fixed
2022-08-26 09:41:05 -07:00
Charles Bachmeier
28a6ea7e1a feat: NavBar I18N (#4507)
* wrap tabs and searchbar

* wrap chain switcher and fix right align bug

* undo translate chains

* replace t with i18n

* revert i18n

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-26 09:22:05 -07:00
lynn
65566faf17 fix: yellow button redesign, improve add liquidity page readability (#4504)
* init

* add background overlay for hover states
2022-08-26 12:02:03 -04:00
lynn
eb4f90e669 feat: add volume trade info to swap completed event (#4506)
add volume trade info to swap completed event
2022-08-26 10:56:53 -04:00
aballerr
40308158ca fix: Updating search token width and adding margin between token delta and price (#4500)
Updating search token width and adding margin between token delta and price

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-26 09:46:39 -04:00
Greg Bugyis
d0d5240474 fix: update Token table headers to match latest Figma (#4505)
TokenTable: update table headers to match latest Figma

Co-authored-by: gbugyis <greg@bugyis.com>
2022-08-26 15:21:35 +03:00
Charles Bachmeier
751ce8e6d6 feat: Mobile Nav (#4501)
* working and cleaned up mobile nav

* delete old files

* fix wallet position

* update searchbar breakpoint

* update full screen search

* delete old comments

* cleanup eslint

* Update MenuDropdown.tsx

* Update SearchBar.tsx

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-26 04:39:58 -07:00
Greg Bugyis
748a5eadc0 fix: Token Details - move About section below Market Stats (#4483) 2022-08-26 10:50:55 +03:00
lynn
5659fe21ea fix: fix swap small layout shifts when clicking reverse tokens button (#4503)
fix
2022-08-25 23:57:14 -04:00
lynn
bc899b74a3 feat: make token safety speedbumps appear for tokens with warnings in token selector (#4496)
* checkpoint: token modal safety warning working, showing speedbump

* fix styling

* dont show token safety once user has already ack'd that token

* fix cancel button on token safety - always navigate back to search
2022-08-25 21:20:04 -04:00
Zach Pomerantz
516c8b05a4 feat: add group flag toggles (#4502) 2022-08-25 16:54:15 -07:00
aballerr
8502f9e303 fix: Wallet updates (#4498)
* Wallet Polishing

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-25 17:50:38 -04:00
Jordan Frankfurt
bc90d416e6 feat: add background-color transitions to table color changes (#4491)
* feat: add background-color transitions to table color changes:

* pr review--use theme transition info
2022-08-25 16:34:05 -05:00
Charles Bachmeier
2fd1cd72fd fix: bug with network with no info (#4489)
* fix bug with network with no info

* remove unneeded check

* add null checks

* check info for supported case

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-25 11:32:26 -07:00
github-actions[bot]
3a2276dcd1 chore(i18n): new Crowdin translations (#4478)
* chore(i18n): synchronize translations from crowdin [skip ci]

* empty

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-08-25 14:30:25 -04:00
Vignesh Mohankumar
c432c583f6 fix: rename search to filter tokens (#4485)
* fix: rename search to filter tokens

* translate
2022-08-25 14:04:35 -04:00
Connor McEwen
9b8f5ed8f4 fix: update widget color scheme (#4475)
* fix: update widget color scheme

* Map Uniswap Design System colors to Widget color styles

Co-authored-by: pp-hh-ii-ll <111304124+pp-hh-ii-ll@users.noreply.github.com>
2022-08-25 13:50:46 -04:00
Jack Short
0713a15028 fix: adding explore buttons on loading (#4490) 2022-08-25 13:17:45 -04:00
Charles Bachmeier
62c502615f feat: show searchbar on tablet size (#4484)
show searchbar on tablet size

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-25 10:00:41 -07:00
Charles Bachmeier
fdbe4b8f5e feat: mobile network switcher (#4486)
* feat: mobile network switcher

* adjust bottom border radius on mobile

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-25 09:31:47 -07:00
lynn
33c73f4dc8 fix: network balances summary styling (#4487)
init
2022-08-25 09:15:36 -07:00
aballerr
c207a576e7 feat: Sample transitions pr (#4477)
* Updating theming to include transitions


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-25 11:25:49 -04:00
Jack Short
aa426514f3 chore: updating navbar padding for token pages (#4474)
* chore: updating navbar padding for token pages

* removing margin on pools page
2022-08-25 11:20:19 -04:00
aballerr
ba9c28892e fix: Fixing token modal warning to match figma design (#4476)
* fixing token modal warning to match figma design


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-25 10:06:12 -04:00
Charles Bachmeier
49c31ddfc8 feat: update sprinkles breakpoints (#4480)
update breakpoints

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-24 19:01:11 -07:00
github-actions[bot]
4424205814 chore(i18n): new Crowdin translations (#4460)
* chore(i18n): synchronize translations from crowdin [skip ci]

* empty

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-08-24 18:04:37 -04:00
lynn
874f3fb737 fix: fix copy button styling (#4473)
* fix copy button styling

* fix positionig

* preserve original css for token safety warning use case
2022-08-24 17:57:25 -04:00
Kaylee George
ac27c89a44 fix: change top tokens query return type (#4453)
* query return

* fix return

* rm default empty string

* rm ?

* undef

* undefined

* null

* fix

* handle search

* .

* rebase

* top tokens

* rm blank

* rm console log

* make 100
2022-08-24 12:38:22 -07:00
aballerr
0e530cf92e fix: added in correct wallet breakpoints (#4472)
* adding in wallet breakpoints

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-24 15:16:51 -04:00
Charles Bachmeier
ed66b00b20 feat: update Chain Switcher Modal and Active State (#4471)
* Add unsupported network and active state to chain switcher

* update switcher dropdown modal

* undo

* undo new styles, adjust padding

* update padding

* use supported chain helper fn

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-24 11:51:38 -07:00
cartcrom
84fb05239b fix: data api loading states and repetitive calls (#4461)
* diagnosing issues
* fixed loading states
* addressed PR comments
* fixed missing symbol issue
* fixed merge conflcit
* fixed uppercase token symbol issue
2022-08-24 14:13:21 -04:00
Vignesh Mohankumar
7500bbc0be fix: don't translate UNI (#4467) 2022-08-24 14:00:20 -04:00
Jack Short
c43c8de6cd chore: updating breakpoints (#4465)
* chore: updating breakpoints

* deprecating old breakpoints

* using breakpoints in theme instead of media queries
2022-08-24 13:43:46 -04:00
Connor McEwen
9d40db5b21 fix: update swap CTA button color (#4464) 2022-08-24 10:42:56 -07:00
Kaylee George
a61eca36ae fix: change toggle and input placeholder colors on swap settings flyout (#4466)
change colors
2022-08-24 10:41:24 -07:00
Kaylee George
60479a442f fix: remove UNI currency logo from swap widget approval button (#4468)
take away logo
2022-08-24 10:41:11 -07:00
Kaylee George
5257188f70 fix: fix token details 'share to twitter' information (#4469)
add twitter correct link
2022-08-24 10:33:19 -07:00
lynn
7599239983 fix: Web 897 redesign general token selector from swap focusing text input has incorrect background color (#4463)
* init

* add search icon
2022-08-24 12:42:17 -04:00
lynn
1561c0d000 feat: fix visual bugs on truncate token description (#4462)
init
2022-08-24 12:28:07 -04:00
Charles Bachmeier
1f740cf8c0 feat: update search icon (#4459)
* feat: update search icon

* re add chevron on mobile

* icon uses currentColor

* icon uses currentColor

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-24 07:07:12 -07:00
aballerr
55c5f03004 feat: Adding in remaining transactions to transaction history (#4455)
* adding in remaining transactions: Wrap, Collect Fees, Approval and claim rewards

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-24 09:59:11 -04:00
Charles Bachmeier
a345cff614 fix: cleanup styles for overflow modal (#4458)
* improvements to overflow modal

* add active state to overflow modal

* fix right aligned models

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-24 06:32:32 -07:00
lynn
85d8566cfa feat: make currencyInputPanel redesign changes apply only to swap (#4456)
* init: revert to pre redesign swap changes

* differentiate between swapCurrencyInputPanel and regular

* it was inverted whoops

* add padding to fiat row from cal
2022-08-24 02:00:48 -04:00
Charles Bachmeier
44d68e3ef0 fix: /pool position second icon zindex issue (#4457)
fix /pool zindex issue

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-23 21:05:58 -07:00
Greg Bugyis
04bd4900b0 feat: adds banner section (carousel only) for NFT Explore (#4383)
* NFT Explore: Banner section and carousel

* Fixes from PR feedback

* PR feedback and slight refactor of Carousel Progress indicators

* Only render current collection, and simplify fullWidth class

* Add colors to sprinkles and drop zIndex on bannerContent

* Simplify component structure

* Separate out CarouselIndicator and other cleanup

* Restore CarouselProgress component

* Position carousel progress over bg overlay

Co-authored-by: gbugyis <greg@bugyis.com>
2022-08-24 01:06:54 +03:00
github-actions[bot]
81f277b36f chore(i18n): new Crowdin translations (#4454)
* chore(i18n): synchronize translations from crowdin [skip ci]

* empty

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-08-23 16:47:51 -04:00
Connor McEwen
575660d3e8 fix: respect padding in cells with proper hover (#4451) 2022-08-23 16:41:42 -04:00
lynn
1e692491f1 fix: truncates to token details descriptions (#4450)
* inti

* respond to vm comments

* add paragraphs as per fred, respond vm comments

* respond last vm comment

* simplify

* move fn out of component

* fix messed up styling

* simplify

* simplify

* fred nits

* remove xtra token detail props

* fix sentence casing
2022-08-23 15:25:37 -04:00
Vignesh Mohankumar
b3639b3453 fix: makes SearchBar focus border-width consistent (#4452) 2022-08-23 11:44:01 -07:00
Kaylee George
53ebf37b40 feat: add top tokens query for Explore tokens table (#4448)
* progress

* map??

* idk

* maybe progress?

* more

* hook

* rm favs

* add query

* comment

* get rid of page query

* fix autoimports

* Update TokenRow.tsx
2022-08-23 11:13:35 -07:00
lynn
624ec33652 build: patch vanilla extract to speed up build time (#4447)
patch ve to build

Co-authored-by: Connor McEwen <connor.mcewen@gmail.com>
2022-08-23 12:02:27 -04:00
Charles Bachmeier
2890040118 feat: Fixed light mode styles and added hover states to navbar (#4449)
* cleanup navbar lightmode

* lightmode and hover states

* move magical gradient to common stlyes

* inherit border radius

* hover transition

* further split common gradient style

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-23 08:30:37 -07:00
aballerr
68db8b3e23 feat: wallet hover styling and moving wallet to correct navbar (#4444)
* updating wallet to have correct hover highlighting and have correct scrolling

Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-23 11:00:36 -04:00
Vignesh Mohankumar
9873491db1 fix: increases tokens search background contrast (#4443) 2022-08-22 15:17:40 -07:00
Vignesh Mohankumar
5d64ab0146 fix: flag NetworkFilter (#4442)
feat: flag token table network filter
2022-08-22 18:11:22 -04:00
github-actions[bot]
568267ce07 chore(i18n): new Crowdin translations (#4410)
* chore(i18n): synchronize translations from crowdin [skip ci]

* empty

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-08-22 17:29:40 -04:00
Vignesh Mohankumar
69cdefe996 fix: update Swap container padding (#4440)
* fix: update Swap container padding

* rm AlertWrapper

* empty
2022-08-22 17:28:17 -04:00
Charles Bachmeier
61758db589 fix: active state for Token Explore (#4439)
fix active state for Token Explore

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-22 14:23:34 -07:00
cartcrom
9e9d98bb31 fix: chart size responsiveness issue (#4441)
fixed responsiveness issue
2022-08-22 17:15:24 -04:00
lynn
6b2b771dc4 fix: correct mistaken usdc user property that should be weth (#4438)
fix
2022-08-22 16:33:00 -04:00
pp-hh-ii-ll
031bea0f50 fix: Update outdated colors (#4420)
* Update outdated colors and add shallowShadow

* Update colors.ts

Co-authored-by: Kaylee George <62825936+kayleegeorge@users.noreply.github.com>
2022-08-22 13:20:59 -07:00
Vignesh Mohankumar
6f2e447ec3 chore: remove fortmatic key (#4435)
chore: remove unused fortmatic key
2022-08-22 16:12:55 -04:00
Kaylee George
cf831fbcea refactor: removes flyoutDropShadow, adds shallowShadow (#4437)
flyout drop shadow
2022-08-22 12:58:58 -07:00
lynn
bcd4c1c182 feat: only track usdc, weth, native token balances (#4424)
* init

* fix unit test

* extract log token logic into custom hook
2022-08-22 15:31:28 -04:00
Kaylee George
d954026cea feat: add token details and token row table query (#4419)
* add query

* revert styles

* more style

* rename

* restructure

* fix

* more

* network

* uppercase symbol

* rm unused

* fix

* check nan

* add token row query

* small change

* nan?
2022-08-22 11:52:24 -07:00
Vignesh Mohankumar
2c2dad1415 build: enforce node/npm versions (#4434)
* build: enforce node/npm versions

* enforce yarn usage
2022-08-22 13:55:48 -04:00
Kaylee George
d42ed88845 fix: fix various selected states on Explore filters and update theme colors (#4433)
* fixed

* update more
2022-08-22 10:51:59 -07:00
Kaylee George
e12c00e980 fix: time selector updated to align with price chart (#4425)
* fix time

* displays
2022-08-22 09:37:49 -07:00
Jack Short
c25971e5d2 feat: collection asset cards (#4422)
* removing differentiating mobile and desktop collections

* feat: asset cards

* changed card to module + addressed other comments

* todo
2022-08-22 12:15:17 -04:00
Charles Bachmeier
293e56758c feat: Placeholder NFT Details and NFT Sell Pages (#4431)
* add placeholder pages for nft sell and nft details

* feature flag link in navbar dropdown

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-22 07:53:11 -07:00
tainguyen-kms
a6b17f0437 fix: Fix unresponsive image in vote page (#4416)
* Fix unresponsive image scale in vote page

* Create renderer function for Image
2022-08-19 23:19:05 -04:00
cartcrom
140d59b898 fix: updated schema (#4423)
updated schema
2022-08-19 17:40:58 -04:00
cartcrom
85742c5785 feat: data api connection (#4396)
* split relay into two environments, refactored schema grabbing, implemented api call for token price graph
2022-08-19 15:31:10 -04:00
aballerr
9b07d8ce64 feat: Wallet v1 transactions part 1 (#4398)
* Adding in tx history for 3 transactions: Swap, Add Liquidity, Remove Liquidty




Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.fios-router.home>
Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.local>
2022-08-19 14:01:34 -04:00
Charles Bachmeier
b1b9da1b17 feat: enable NFT search results (#4413)
* enable NFT search results

* update usememo deps

* simplify flag trending token logic

* respond to comments

* lowercase bool

* rename flag

* improve truncation

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-19 09:58:26 -07:00
Vignesh Mohankumar
ffe670923e feat: remove fortmatic (#4167)
* rm fortmatic (wip for test)

* remove isChainAllowed

* handle unexpected connector

* clear on catch

* Revert "remove isChainAllowed"

This reverts commit d505cac39a446cb2c273016d03896469ba39eb60.

* fix to actually use ALLOWED_CHAIN_IDS

* fix
2022-08-19 12:06:14 -04:00
Charles Bachmeier
21649967aa refactor: rename phase1flag to nftflag (#4414)
* rename phase1flag to nftflag

* add new flag file

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-19 08:41:54 -07:00
lynn
3f40f60c1c fix: fix add liquidity select tokens alignment (#4403)
* init

* only remove this component in add liquidity screen
2022-08-18 23:30:15 -04:00
lynn
176c275a06 feat: Web 640 eng transaction states redesign (#4389)
* init

* pending and failed states

* simplify

* init

* modals

* fix drop shadow logic

* fixes for kaylee comments
2022-08-18 22:49:39 -04:00
Charles Bachmeier
ae2b4b1668 fix: fix skeleton hover state bug (#4409)
* fix skeleton hover state bug

* corretc hover color

* add transition

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-18 16:10:14 -07:00
Kaylee George
a27f8e2937 feat: add no information available state for token details (#4407)
* skeleton

* fix

* fix layout

* gap
2022-08-18 15:02:44 -07:00
Charles Bachmeier
818b1c84b0 feat: add NFTs tab to navbar (#4408)
add NFT tab to navbar

Co-authored-by: Charlie <charlie@uniswap.org>
2022-08-18 14:40:52 -07:00
Vignesh Mohankumar
75eceaa5e1 fix: Revert "feat: fix padding" (#4406)
Revert "feat: fix padding (#4400)"

This reverts commit 96c23af99c.
2022-08-18 17:36:32 -04:00
Charles Bachmeier
c6b4cc8e01 feat: add phase0 searchbar (#4377)
* feat: add phase0 searchbar

* exhaustive deps

* use router Link'

* use correct navigate for tokens

* useLocation

* add util function for organizing search results

* fix mobile navbar link

* remove exhausted depedencies

* split suggestion rows to their own file

* add new file

* use pathname instead of hash

* use imageholder classname

* fallback update

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-08-18 14:19:03 -07:00
Jack Short
819302b51f feat: adding collection stats to collection page (#4391)
* feat: adding collection stats

* removing debounced callback

* addressing comments

* updating marquee and updating isMobile hook

* adding bool to useIsMobile
2022-08-18 16:10:22 -04:00
Kaylee George
c53d7fcc32 fix: fix Explore search bar styling (#4405)
* fix search

* fix responsive

* fix width
2022-08-18 13:06:09 -07:00
lynn
3de2e65530 feat: fix hover color on vote page items (#4404)
init
2022-08-18 15:05:27 -04:00
Kaylee George
c5319b6bea fix: move favorites to right and fix header highlight (#4402)
* change favorite style

* more

* fix header

* fix styling

* small fix
2022-08-18 11:14:43 -07:00
github-actions[bot]
801ddc0886 chore(i18n): new Crowdin translations (#4395)
chore(i18n): synchronize translations from crowdin [skip ci]

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2022-08-18 11:06:14 -07:00
aballerr
dfd9196aa7 feat: Wallet p0 (#4368)
* P0 Wallet

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.fios-router.home>
2022-08-18 13:56:15 -04:00
lynn
c4362297f5 feat: Safety label speedbump: fix copy (#4401)
init
2022-08-18 13:17:22 -04:00
lynn
96c23af99c feat: fix padding (#4400)
fix padding
2022-08-18 12:13:20 -04:00
lynn
6a29dacdeb feat: fix explore and pools titles to match designs. (#4399)
init
2022-08-18 11:46:39 -04:00
lynn
9ddad80f2a feat: fix favorite tokens design (#4397)
fix favorites
2022-08-18 08:24:07 -07:00
Kaylee George
1944fe4029 fix: width of widget and network balances on token details (#4392)
* fix width

* nits

* width var

* nit

* px fix

Co-authored-by: Vignesh Mohankumar <me@vig.xyz>
2022-08-17 19:02:24 -04:00
lynn
9921736102 fix: add missing colon to end of drop shadow color (#4394)
init
2022-08-17 18:43:14 -04:00
lynn
11aa641dbc feat: wallet connect redesign (#4381)
* init

* pending and failed states

* simplify

* fixes in respond to fred nits

* update overlay
2022-08-17 18:15:53 -04:00
Kaylee George
2f3290592b feat: add L2 network label to Explore token row (#4361)
* initial

* add L2 badge

* meh

* png updates

* fix icons

* naming

* nits

* case

* rename

* rm
2022-08-17 17:35:25 -04:00
github-actions[bot]
7b3fe73474 chore(i18n): new Crowdin translations (#4378)
chore(i18n): synchronize translations from crowdin [skip ci]

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2022-08-17 13:27:37 -07:00
Kaylee George
4237354bb7 chore: rename Explore directory to Tokens (#4388)
* rename

* move file
2022-08-17 15:18:26 -04:00
Jack Short
f7354c9842 refactor: removes BodyWrapper padding (#4375)
* fix: removing bodywrapper padding for phase1

* reverting to previous version and adjusting padding across pages appropriately

* adjusting padding on add liquidity page

* prettier changes

* missed semicolon
2022-08-17 14:35:47 -04:00
Charles Bachmeier
1636786af8 feat: add the phase0 chain switcher (#4376)
* feat: add phase0 chain switcher

* update styles

* add chain switcher files

* remove unneeded eslint disable

* add Celo and remove unneeded null check

* remove old comment

* fix mobile routing

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-08-17 11:24:56 -07:00
aballerr
de0a716f41 chore: Usetheme hook fix (#4387)
* fixing hook


Co-authored-by: Alex Ball <alexball@UNISWAP-MAC-038.fios-router.home>
2022-08-17 17:53:46 +00:00
Zach Pomerantz
9f108c406b chore: clean up theme usage (#4335)
* chore: clean up DefaultTheme usage

* chore: simplify useTheme usage

* chore: consolidate multi-line imports
2022-08-17 16:55:58 +00:00
Vignesh Mohankumar
5346d13674 chore: rename flag explore -> tokens (#4386) 2022-08-17 16:43:21 +00:00
Charles Bachmeier
d054079eeb feat: add routing functionality to navbar (#4374)
* feat: add routingfunctionality to navbar

* update colors

* rename and pass strings directly

* rename symbol

* rename props

* better symbol name for mobile link

* more isPoolActive

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-08-17 16:31:30 +00:00
Vignesh Mohankumar
fe6324f84d feat: remove v2, v3 swap router (#4372)
* remove v3 router

* rm v2

* unused

* remove anytrade

* unused

* rm shared

* remove optimized trade

* celo fix
2022-08-17 16:05:16 +00:00
Vignesh Mohankumar
4a70eb5956 fix: rename /explore to /tokens (#4385)
* fix: rename /explore to /tokens

* name

* tokens

* oops
2022-08-17 16:05:01 +00:00
Vignesh Mohankumar
1a7b86d155 chore: remove unused exports (#4380) 2022-08-17 11:45:45 -04:00
Vignesh Mohankumar
f66f8c4d59 fix: undo polygon auto-slippage changes (#4379) 2022-08-17 11:37:54 -04:00
Jack Short
1a9c3c3632 feat: add a feature flagged blank collections page (#4371) 2022-08-17 10:42:27 -04:00
cartcrom
91f4892b0c feat: integrate relay (#4320)
* setup relay compiler
* refactored to use polling interval, fixed PR comments
* fixes, readded uninitialized state for liquidity chart
* updated cypress test
* reorganized graphql files into src/graphql
2022-08-16 20:01:12 -04:00
cartcrom
d6d0a98afe fix: chart design fixes & style updates (#4341)
* removed ticks outside of hover
* simplifying copyhelper
* finished implementing fred's feedback
* addressed PR comments
* fixed more of fred's feedback
2022-08-16 19:59:02 -04:00
Kaylee George
8efc5af2bc fix: update feature flag modal design & add headers (#4370)
* initial

* progress

* sike no progress

* design updates

* fix header

* remove colon

* add flag
2022-08-16 19:10:56 +00:00
Zach Pomerantz
104b62f4d8 feat: send web vitals (#4366) 2022-08-16 11:26:15 -07:00
Charles Bachmeier
8e9dbe31fa feat: add a feature flagged blank navbar (#4365)
* add some initial infra for blank navbar

* add blank navbar

* add new files

* use web3status

* remove unused mobile flag

* remove colors

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-08-16 17:46:50 +00:00
Jordan Frankfurt
cf0afa01c8 feat(widget): light and dark themes (#4367)
feat(widget): light and dark themes:
2022-08-16 12:20:23 -04:00
Vignesh Mohankumar
c5b67ac60b refactor: deprecate theme.none (#4362) 2022-08-16 09:05:43 -07:00
Charles Bachmeier
110c6fc08f feat: add in common nft components (#4363)
* add in common genie components

* update import and run linter

* better event type handling

* rotate 360

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-08-16 05:38:27 -07:00
Vignesh Mohankumar
f349ecdd3c chore: remove selectedWalletBackfilled (#4283)
* remove selectedWalletBackfilled

* FIX
2022-08-15 15:39:16 -07:00
lynn
57fb481da9 chore: update amplitude version (#4358)
* update amplitude version

* fix amplitude analytics index file to work with new version

* remove extraneous comment
2022-08-15 18:02:02 -04:00
Charles Bachmeier
5871e0afe1 feat: add navbar feature flag and small style update (#4364)
add navbar feature flag and small style update

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-08-15 21:34:25 +00:00
Jordan Frankfurt
281879ea98 chore: dont-send-test-data-to-test-amplitude (#4360)
* chore: dont-send-test-data-to-test-amplitude

* chore: dont-send-test-data-to-test-amplitude
2022-08-15 15:37:05 -05:00
Zach Pomerantz
b623380dd0 feat: show widget in token details (#4337)
* build: install widgets

* feat: show widget in token details

* basic integration props

* ts fix and update widget to 2.1.1

* url map

* yarn-deduplicate --strategy=highest

Co-authored-by: Jordan Frankfurt <jordanwfrankfurt@gmail.com>
2022-08-15 15:12:59 -05:00
Vignesh Mohankumar
7645094df6 refactor: move useSyncChainQuery to NetworkSelector (#4353) 2022-08-15 12:06:18 -07:00
Vignesh Mohankumar
733b1885ff fix: await selectChain before closing modal (#4354) 2022-08-15 12:05:55 -07:00
Vignesh Mohankumar
7adbb1e0af fix: use tokenSafety flag in Modal (#4359) 2022-08-15 18:59:30 +00:00
Jordan Frankfurt
6d5967c981 chore: add test key to .env (#4357)
add test key to .env
2022-08-15 14:29:30 -04:00
lynn
b15f2a2bb6 feat: fail gracefully when amplitude api key is not present (#4355)
init
2022-08-15 18:00:37 +00:00
Vignesh Mohankumar
3cc0a41e50 refactor: split ChainId useEffects (#4348)
* split out useOnSelectChain, useSyncChainQuery

* use chain query sync

* lint

* rename

* move variables
2022-08-15 10:20:26 -07:00
Noah Zinsmeister
4abdca9fdd fix: improve calldata formatting (#4352)
improve calldata formatting
2022-08-15 12:33:23 -04:00
lynn
99ef9366d6 feat: amplitude production sdk changes (#4312)
* init

* error change

* use isProduction vs isDevelopment to include vercel
2022-08-15 12:24:31 -04:00
github-actions[bot]
235ee5dff9 chore(i18n): new Crowdin translations (#4321)
chore(i18n): synchronize translations from crowdin [skip ci]

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2022-08-15 11:20:31 -04:00
lynn
20f25803d4 feat: Add favorite tokens from localstorage to /explore top tokens data query (#4351)
* init

* move to explore page level

* remove extraneous useTopTokens hook replaced by useExplorePageQuery
2022-08-15 11:13:36 -04:00
Vignesh Mohankumar
09380698fa refactor: split phase0 flag into redesign, explore, tokenSafety (#4347)
* changes so far

* more changes

* lint

* remove Phase0:
2022-08-15 10:09:26 -04:00
lynn
1d96961f25 feat: token selector design update (#4333)
* init

* selected base currency button

* add check icon

* theme background module change

* hover changes

* theme none

* additional padding

* hover default color from phil + feature flag

* checkmark style fixes
2022-08-12 17:47:36 +00:00
Vignesh Mohankumar
b38241c675 chore: remove @amplitude/experiment-js-client (#4338) 2022-08-11 18:55:16 -04:00
Eric Zhong
1dbd3240a3 feat: Add protcol.MIXED to protocols (#4334)
Add protcol.MIXED to protocols
2022-08-11 17:13:49 -04:00
Eric Zhong
47e6c0891e feat: Add support for mixed routes in the interface (#4181)
* Expand typing to match new QuoteResponse from routing api

* lint autofix

* Expand InterfaceTrade class to match router-sdk and allow mixedroutes

* Add new routing-api poolInRoute logic for client side trade

* eslint fix ==

* Add custom mxiedProtocolBadge and add into badgeDiagram

* Bump router-sdk to published version, and install latest local SOR

* git checkout main yarn.lock && yarn && npx yarn-deduplicate

* Bump SOR to 2.9.2

* bump SOR to 2.9.2

* Update yarn.lock

* revert slice.ts

* Add guesstimate logic for mixedRoutes

* Oops wrong pool import lol

* Add beta url + expand protocols array

* Add forceMixedRoutes for testing

* Fix cyrpress build issue: no-loop-func

* Change to prod url and remove testing param

* remove protocol flag

* Revisions: getRouteProtocol helper, fix gas acc for mixed route

* revert protocols array abck

* Remove :Protocol
2022-08-11 16:40:55 -04:00
Kaylee George
a6e35ed70f fix: fix naming in pricechart (#4332)
fix
2022-08-11 19:50:19 +00:00
Kaylee George
f570c3fa06 fix: update time option menu for token details and colors to match theme file (#4322)
* fix time options and colors

* fix line height

* color change
2022-08-11 19:35:34 +00:00
Vignesh Mohankumar
50556a295f test: skip fetchTokenList tests (#4330)
skip token list tests
2022-08-11 19:00:44 +00:00
cartcrom
acdca350a6 refactor: removing duplicate AccountDetails code (#4329)
fixed redundant code
2022-08-11 14:03:46 -04:00
Vignesh Mohankumar
fe55c7ae7a fix: increase Polygon auto-slippage min (#4327)
* fix: increase Polygon auto-slippage min

* comment

* update percent
2022-08-11 16:15:02 +00:00
Charles Bachmeier
8dbc91ee6b feat: Add utility code for NFT Features (#4256)
* import nft utilities

* re-add featureflag provider

* add back in useCurrencyBalanceString fn

* remove static assets for separate pr

* remove resolutions, swap dev and regular dependencies, respond to comments

* remove currently unused dependencies and resynth .lock

* build: update lockfile

* build: update lockfile

* remove env check

* useCurrencyBalanceString as fn

* remove supported_Wallets until wallet component merged in

* make Atoms an interface

* update abis

* remove outdated comment

* update usedebounce hook

* remove useDarkMode

* remove useLazyEffect

* remove getEtherscan helper fn

* remove useLastWallet

* remove useWindowDimensions

* refactor hooks

* move hooks from nft to general folder

* add walletBalanceInterface and remove wrongNetwork hook

* remove empty obj

* remove ethers imports

* fixed comparison

* same line eslint ignore

* gtag removed

* revert

* revert

* build: update lockfile

* remove walletinfo interface

* remove newline

* remove tslinst exception from isMobile

* remove hiding linter warnings

* remove unused util

* fix linter warnings

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
Co-authored-by: Zach Pomerantz <zzmp@uniswap.org>
2022-08-10 16:38:23 -07:00
lynn
783f197463 feat: polish mobile explore table (#4295)
* test init

* breakpoint at 540

* fix nav link

* polishes

* respond to kaylee comments

* fix spacings

* ensure up to 8 digits shown for price on all size screens as per fred guidance
2022-08-10 18:06:11 -04:00
Vignesh Mohankumar
4b7c9782b5 test: fix swap test's select token copy (#4324) 2022-08-10 17:45:28 -04:00
Enzo Ferey
f109bfbb6a refactor: removes unused useFastForwardBlockNumber (#4297)
* Remove unused code

* Remove useFastForwardBlockNumber hook.

* Remove fastForward function.
2022-08-10 21:01:18 +00:00
Vignesh Mohankumar
baf00f203a feat: use filterTimeAtom for PriceChart (#4323)
* feat: use filterTimeAtom

* comment
2022-08-10 16:47:28 -04:00
github-actions[bot]
1309b1f11b chore(i18n): new Crowdin translations (#4290)
chore(i18n): synchronize translations from crowdin [skip ci]

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2022-08-10 12:35:18 -07:00
Vignesh Mohankumar
a146c93285 fix: update TokenTable loading row count (#4319) 2022-08-10 15:26:36 -04:00
Kaylee George
53cccef570 fix: change background color on Explore table (#4318)
change background color
2022-08-10 19:16:04 +00:00
cartcrom
b26c2bbc98 feat: added token sparklines to explore page (#4307)
* added sparklines, fixed overlay issue
* refactored, made LineChart generic
* memoized line and sparkline charts, used theme z-index
2022-08-10 15:15:41 -04:00
Callil Capuozzo
4b5246394b feat: update Swap styles, update theme colors (#4294)
* toggle

* fixed position

* im bad at spelling

* rm button

* fix

* initial

* fix

* styles

* iteration

* minor updates

* additions

* updates

* rm file

* color update

* updates

* start feature flag

* more flagging

* FLAGZ

* even more flagging

* flagbergasted

* more

* minor updates

* updates

* lets go

* merge

* merge fix

* merge fixes

* theme

* Merge remote-tracking branch 'origin/kg/explore-colorChanges2' into swap_and_colors

* Fix merge conflicts

* themeUpdates

* Update colors based on Phil's latest

* Add new default gradients

* toggle

* fixed position

* im bad at spelling

* rm button

* initial

* fix

* styles

* iteration

* minor updates

* additions

* updates

* rm file

* color update

* updates

* start feature flag

* more flagging

* FLAGZ

* even more flagging

* flagbergasted

* more

* minor updates

* updates

* lets go

* Merge remote-tracking branch 'origin/kg/explore-colorChanges2' into swap_and_colors

* merge

* Fix merge conflicts

* merge fixes

* theme

* themeUpdates

* Update colors based on Phil's latest

* Add new default gradients

* update swap index

* fix merge bugs

* Tweak swap

* update from main

* Fix merge issues and color bug

* Update index.test.tsx.snap

* Remove un-used constants

* updates

* font

* add space

* style

* style

* style

* hover state

* color fixes

* meh

* Update index.tsx

* fix conflict

Co-authored-by: Kaylee George <62825936+kayleegeorge@users.noreply.github.com>
2022-08-10 19:03:30 +00:00
David Walsh
18b93613cd fix: Ensure proper cursor for network dropdown (#4302) 2022-08-10 12:05:02 -04:00
cartcrom
1f78c236a9 fix: phaseflagging token import modals (#4317)
added phase flag check to conditionally render old vs new token import modal
2022-08-10 11:57:13 -04:00
Charles Bachmeier
09035643c3 ci: add .vercel to gitignore (#4315)
add .vercel to gitignore

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-08-09 17:05:04 -07:00
cartcrom
97be3bcd05 fix: token selector spacing (#4314)
* fixed issue
* updated snapshot
2022-08-09 18:02:54 -04:00
Charles Bachmeier
a6de430cf3 feat: Phase 1 flag (#4310)
* add phase 1 feature flag

* update label text

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
2022-08-09 14:52:21 -07:00
cartcrom
b8b44a6eb2 fix: token safety icon not under phase0 flag (#4311)
* fixed issue
* updated snapshot
2022-08-09 13:28:55 -04:00
lynn
1d21eebcd3 feat: Web 714 additional swap submitted event properties (block number, route properties) (#4305)
* init commit

* remove absolute value in date calc

* all the events are now logged properly plus changed native token address to NATIVE

* add documentation line

* remove unnecessary prop

* init

* add approve token event

* fix build

* add route event properties

* fix build

* respond to vm comments

* respond to vm comments

* temp

* init

* add blockNumber

* remove console logs
2022-08-09 10:57:35 -04:00
750 changed files with 58515 additions and 23857 deletions

7
.env
View File

@@ -1,2 +1,7 @@
REACT_APP_INFURA_KEY="4bf032f2d38a4ed6bb975b80d6340847"
REACT_APP_FORTMATIC_KEY="pk_live_357F77728B8EB880"
REACT_APP_AMPLITUDE_PROXY_URL="https://api.uniswap.org/v1/amplitude-proxy"
REACT_APP_AWS_API_REGION="us-east-2"
REACT_APP_AWS_API_ENDPOINT="https://beta.api.uniswap.org/v1/graphql"
REACT_APP_TEMP_API_URL="https://temp.api.uniswap.org/v1"
REACT_APP_SENTRY_DSN="https://a3c62e400b8748b5a8d007150e2f38b7@o1037921.ingest.sentry.io/4504255148851200"
ESLINT_NO_DEV_ERRORS=true

View File

@@ -1,5 +1,7 @@
REACT_APP_AMPLITUDE_KEY="1c694b28cd089acc2c386d518f93a775"
REACT_APP_AMPLITUDE_PROXY_URL="https://api.uniswap.org/v1/amplitude-proxy"
REACT_APP_INFURA_KEY="099fc58e0de9451d80b18d7c74caa7c1"
REACT_APP_FORTMATIC_KEY="pk_live_F937DF033A1666BF"
REACT_APP_GOOGLE_ANALYTICS_ID="G-KDP9B6W4H8"
REACT_APP_FIREBASE_KEY="AIzaSyBcZWwTcTJHj_R6ipZcrJkXdq05PuX0Rs0"
REACT_APP_AWS_API_ENDPOINT="https://api.uniswap.org/v1/graphql"
THE_GRAPH_SCHEMA_ENDPOINT="https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3"

2
.eslintignore Normal file
View File

@@ -0,0 +1,2 @@
*.config.ts
*.d.ts

View File

@@ -11,6 +11,14 @@
"settings": {
"react": {
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"ignorePatterns": [
@@ -18,7 +26,6 @@
"src/abis/types",
"src/locales/**/*.js",
"src/locales/**/en-US.po",
"src/state/data/generated.ts",
"node_modules",
"coverage",
"build",
@@ -39,10 +46,12 @@
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
"plugin:prettier/recommended",
"plugin:import/typescript"
],
"plugins": ["simple-import-sort", "unused-imports"],
"plugins": ["import", "simple-import-sort", "unused-imports"],
"rules": {
"import/no-unused-modules": [2, { "unusedExports": true }],
"unused-imports/no-unused-imports": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
@@ -53,6 +62,7 @@
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-curly-brace-presence": ["error", { "props": "never", "children": "never" }],
"object-shorthand": ["error", "always"],
"no-restricted-imports": [
"error",
@@ -82,6 +92,18 @@
}
]
}
],
"@typescript-eslint/no-restricted-imports": [
"error",
{
"paths": [
{
"name": "@ethersproject/providers",
"message": "Please only use Providers instantiated in constants/providers to improve traceability.",
"allowTypeImports": true
}
]
}
]
}
}

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
@uniswap/web

View File

@@ -6,5 +6,6 @@ updates:
schedule:
interval: 'daily'
allow:
- dependency-name: '@uniswap/token-lists'
- dependency-name: '@uniswap/default-token-list'
- dependency-name: '@uniswap/token-lists'
- dependency-name: '@uniswap/widgets'

View File

@@ -71,30 +71,6 @@ jobs:
with:
cidv0: ${{ steps.pinata.outputs.hash }}
- uses: actions/cache@v3
id: cypress-cache
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('node_modules/cypress') }}
- if: steps.cypress-cache.outputs.cache-hit != 'true'
run: yarn cypress install
- uses: cypress-io/github-action@v4
with:
install: false
browser: chrome
config-file: cypress.release.config.ts
config: baseUrl=https://cloudflare-ipfs.com/ipfs/${{ steps.pinata.outputs.hash }}
- name: Update DNS with new IPFS hash
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
RECORD_DOMAIN: 'uniswap.org'
RECORD_NAME: '_dnslink.app'
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848
with:
cid: ${{ steps.pinata.outputs.hash }}
- name: Release
uses: actions/create-release@v1.1.0
env:
@@ -120,3 +96,28 @@ jobs:
- [ipfs://${{ steps.upload.outputs.hash }}/](ipfs://${{ steps.pinata.outputs.hash }}/)
${{ needs.tag.outputs.changelog }}
- name: Setup node@16 (required by Cloudflare Pages)
uses: actions/setup-node@v3
with:
node-version: 16
- name: Update Cloudflare Pages deployment
uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: build
githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Upload source maps to Sentry
uses: getsentry/action-release@bd5f874fcda966ba48139b0140fb3ec0cb3aabdd
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
sourcemaps: './build/static/js'
url_prefix: '/static/js'

27
.github/workflows/revert.yaml vendored Normal file
View File

@@ -0,0 +1,27 @@
name: Revert
on:
# manual trigger
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: yarn prepare
- run: yarn build
- name: Setup node@16 (required by Cloudflare Pages)
uses: actions/setup-node@v3
with:
node-version: 16
- name: Update Cloudflare Pages deployment
uses: cloudflare/pages-action@364c7ca09a4b57837c5967871d64a2c31adb8c0d
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: build
githubToken: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -5,8 +5,6 @@ on:
branches:
- main
pull_request:
branches:
- main
# manual trigger
workflow_dispatch:
@@ -23,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
- run: npx yarn-deduplicate --strategy=highest --list --fail
- run: yarn yarn-deduplicate --strategy=highest --list --fail
unit-tests:
runs-on: ubuntu-latest

7
.gitignore vendored
View File

@@ -1,12 +1,16 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# generated contract types
/src/types/v3
/src/abis/types
/src/locales/**/*.js
/src/locales/**/en-US.po
/src/locales/**/pseudo.po
/src/state/data/generated.ts
# generated graphql types
__generated__/
schema.graphql
# dependencies
/node_modules
@@ -39,3 +43,4 @@ package-lock.json
cypress/videos
cypress/screenshots
.vercel

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
engine-strict = true

2
.nvmrc
View File

@@ -1 +1 @@
14
14.20.0

View File

@@ -1 +1 @@
/src/state/data/generated.ts
/src/schema/schema.graphql

25
.snyk Normal file
View File

@@ -0,0 +1,25 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.25.0
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JS-OPENZEPPELINCONTRACTS-2964946:
- '*':
reason: None Given
expires: 2099-01-01T00:00:00.000Z
created: 2022-12-08T16:25:57.347Z
SNYK-JS-OPENZEPPELINCONTRACTS-2958047:
- '*':
reason: None Given
expires: 2099-01-01T00:00:00.000Z
created: 2022-12-08T16:26:09.720Z
SNYK-JS-OPENZEPPELINCONTRACTS-2958050:
- '*':
reason: None Given
expires: 2099-01-01T00:00:00.000Z
created: 2022-12-08T16:26:17.702Z
SNYK-JS-OPENZEPPELINCONTRACTS-2965580:
- '*':
reason: None Given
expires: 2099-01-01T00:00:00.000Z
created: 2022-12-08T16:26:34.283Z
patch: {}

View File

@@ -30,7 +30,7 @@ or visit [app.uniswap.org](https://app.uniswap.org).
Check out `useUnsupportedTokenList()` in [src/state/lists/hooks.ts](./src/state/lists/hooks.ts) for blocking tokens in your instance of the interface.
You can block an entire list of tokens by passing in a tokenlist like [here](./src/constants/lists.ts) or you can block specific tokens by adding them to [unsupported.tokenlist.json](./src/constants/tokenLists/unsupported.tokenlist.json).
You can block an entire list of tokens by passing in a tokenlist like [here](./src/constants/lists.ts)
## Contributions

View File

@@ -1,11 +1,6 @@
overrideExisting: true
schema: 'https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3'
documents: 'src/**/!(*.d).{ts,tsx}'
generates:
./src/state/data/generated.ts:
./src/graphql/thegraph/schema/schema.graphql:
plugins:
- typescript
- typescript-operations
- typescript-rtk-query:
importBaseApiFrom: './slice'
exportHooks: true
- schema-ast

37
craco.config.cjs Normal file
View File

@@ -0,0 +1,37 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const { VanillaExtractPlugin } = require('@vanilla-extract/webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const { DefinePlugin } = require('webpack')
const commitHash = require('child_process').execSync('git rev-parse HEAD')
module.exports = {
babel: {
plugins: ['@vanilla-extract/babel-plugin'],
},
webpack: {
plugins: [
new VanillaExtractPlugin(),
new DefinePlugin({
'process.env.REACT_APP_GIT_COMMIT_HASH': JSON.stringify(commitHash.toString()),
}),
],
configure: (webpackConfig) => {
const instanceOfMiniCssExtractPlugin = webpackConfig.plugins.find(
(plugin) => plugin instanceof MiniCssExtractPlugin
)
if (instanceOfMiniCssExtractPlugin !== undefined) instanceOfMiniCssExtractPlugin.options.ignoreOrder = true
// We're currently on Webpack 4.x that doesn't support the `exports` field in package.json.
// See https://github.com/webpack/webpack/issues/9509.
//
// In case you need to add more modules, make sure to remap them to the correct path.
//
// Map @uniswap/conedison to its dist folder.
// This is required because conedison uses * to redirect all imports to its dist.
webpackConfig.resolve.alias['@uniswap/conedison'] = '@uniswap/conedison/dist'
return webpackConfig
},
},
}

View File

@@ -3,7 +3,7 @@ import { defineConfig } from 'cypress'
export default defineConfig({
projectId: 'yp82ef',
videoUploadOnPasses: false,
defaultCommandTimeout: 10000,
defaultCommandTimeout: 24000, // 2x average block time
chromeWebSecurity: false,
e2e: {
setupNodeEvents(on, config) {

View File

@@ -21,24 +21,24 @@ describe('Add Liquidity', () => {
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('not.contain.text', 'ETH')
})
it('token not in storage is loaded', () => {
it.skip('token not in storage is loaded', () => {
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL')
cy.get('#add-liquidity-input-tokenb .token-symbol-container').should('contain.text', 'MKR')
})
it('single token can be selected', () => {
it.skip('single token can be selected', () => {
cy.visit('/add/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'SKL')
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.get('#add-liquidity-input-tokena .token-symbol-container').should('contain.text', 'MKR')
})
it('loads fee tier distribution', () => {
it.skip('loads fee tier distribution', () => {
cy.fixture('feeTierDistribution.json').then((feeTierDistribution) => {
cy.intercept('POST', '/subgraphs/name/uniswap/uniswap-v3', (req: CyHttpMessages.IncomingHttpRequest) => {
if (hasQuery(req, 'feeTierDistribution')) {
req.alias = 'feeTierDistributionQuery'
if (hasQuery(req, 'FeeTierDistributionQuery')) {
req.alias = 'FeeTierDistributionQuery'
req.reply({
body: {
@@ -55,7 +55,7 @@ describe('Add Liquidity', () => {
cy.visit('/add/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85/0xc778417E063141139Fce010982780140Aa0cD5Ab')
cy.wait('@feeTierDistributionQuery')
cy.wait('@FeeTierDistributionQuery')
cy.get('#add-liquidity-selected-fee .selected-fee-label').should('contain.text', '0.3% fee tier')
cy.get('#add-liquidity-selected-fee .selected-fee-percentage').should('contain.text', '40%')

View File

@@ -5,10 +5,6 @@ describe('Landing Page', () => {
cy.screenshot()
})
it('redirects to url /swap', () => {
cy.url().should('include', '/swap')
})
it('allows navigation to pool', () => {
cy.get('#pool-nav-link').click()
cy.url().should('include', '/pool')

View File

@@ -2,7 +2,7 @@
describe('Link', () => {
it('should update route', () => {
cy.visit('/')
cy.get('[data-cy="pool-nav-link"]').click()
cy.contains('Pool').click()
cy.get('[data-cy="join-pool-button"]').should('exist')
})
})

View File

@@ -1,11 +0,0 @@
describe('Lists', () => {
beforeEach(() => {
cy.visit('/swap')
})
// @TODO check if default lists are active when we have them
it('change list', () => {
cy.get('#swap-currency-output .open-currency-select-button').click()
cy.get('.list-token-manage-button').click()
})
})

64
cypress/e2e/nfts.test.ts Normal file
View File

@@ -0,0 +1,64 @@
import { getTestSelector } from '../utils'
const COLLECTION_ADDRESS = '0xbd3531da5cf5857e7cfaa92426877b022e612cf8'
describe('Testing nfts', () => {
before(() => {
cy.visit('/')
})
it('should load nft leaderboard', () => {
cy.get(getTestSelector('nft-nav')).first().click()
cy.get(getTestSelector('nft-nav')).first().should('exist')
cy.get(getTestSelector('nft-nav')).first().click()
cy.get(getTestSelector('nft-trending-collection')).its('length').should('be.gte', 25)
})
it('should load pudgy penguin collection page', () => {
cy.visit(`/#/nfts/collection/${COLLECTION_ADDRESS}`)
cy.get(getTestSelector('nft-collection-asset')).should('exist')
cy.get(getTestSelector('nft-collection-filter-buy-now')).should('not.exist')
cy.get(getTestSelector('nft-filter')).first().click()
cy.get(getTestSelector('nft-collection-filter-buy-now')).should('exist')
})
it('should be able to open bag and open sweep', () => {
cy.get(getTestSelector('nft-sweep-button')).first().click()
cy.get(getTestSelector('nft-empty-bag')).should('exist')
cy.get(getTestSelector('nft-sweep-slider')).should('exist')
})
it('should be able to navigate to activity', () => {
cy.get(getTestSelector('nft-activity')).first().click()
cy.get(getTestSelector('nft-activity-row')).should('exist')
})
it('should go to the details page', () => {
cy.visit(`/#/nfts/collection/${COLLECTION_ADDRESS}`)
cy.get(getTestSelector('nft-filter')).first().click()
cy.get(getTestSelector('nft-collection-filter-buy-now')).click()
cy.get(getTestSelector('nft-details-link')).first().click()
cy.get(getTestSelector('nft-details-traits')).should('exist')
cy.get(getTestSelector('nft-details-activity')).should('exist')
cy.get(getTestSelector('nft-details-description')).should('exist')
cy.get(getTestSelector('nft-details-asset-details')).should('exist')
})
it('should toggle buy now on details page', () => {
cy.get(getTestSelector('nft-details-description-text')).should('exist')
cy.get(getTestSelector('nft-details-description')).click()
cy.get(getTestSelector('nft-details-description-text')).should('not.exist')
cy.get(getTestSelector('nft-details-toggle-bag')).eq(1).click()
cy.get(getTestSelector('nft-bag')).should('exist')
})
it('should go view my nfts', () => {
cy.get(getTestSelector('web3-status-connected')).click()
cy.get(getTestSelector('nft-view-self-nfts')).click()
cy.get(getTestSelector('nft-explore-nfts-button')).should('exist')
cy.get(getTestSelector('nft-no-nfts-selected')).should('exist')
cy.get(getTestSelector('nft-bag-close-icon')).click()
cy.get(getTestSelector('nft-explore-nfts-button')).click()
cy.get(getTestSelector('nft-welcome-modal')).should('exist')
})
})

View File

@@ -3,8 +3,8 @@ describe('Redirect', () => {
cy.visit('/create-proposal')
cy.url().should('match', /\/vote\/create-proposal/)
})
it('should redirect to /swap when visiting nonexist url', () => {
it('should redirect to /not-found when visiting nonexist url', () => {
cy.visit('/none-exist-url')
cy.url().should('match', /\/swap/)
cy.url().should('match', /\/not-found/)
})
})

View File

@@ -22,10 +22,4 @@ describe('Remove Liquidity', () => {
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'WETH')
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'WETH')
})
it('token not in storage is loaded', () => {
cy.visit('/remove/v2/0xb290b2f9f8f108d03ff2af3ac5c8de6de31cdf6d/0xF9bA5210F91D0474bd1e1DcDAeC4C58E359AaD85')
cy.get('#remove-liquidity-tokena-symbol').should('contain.text', 'SKL')
cy.get('#remove-liquidity-tokenb-symbol').should('contain.text', 'MKR')
})
})

View File

@@ -7,7 +7,7 @@ describe('Swap', () => {
cy.get('#swap-currency-input .token-amount-input').should('have.value', '')
cy.get('#swap-currency-input .token-symbol-container').should('contain.text', 'ETH')
cy.get('#swap-currency-output .token-amount-input').should('not.have.value')
cy.get('#swap-currency-output .token-symbol-container').should('contain.text', 'Select a token')
cy.get('#swap-currency-output .token-symbol-container').should('contain.text', 'Select token')
})
it('can enter an amount into input', () => {

20
cypress/e2e/token.test.ts Normal file
View File

@@ -0,0 +1,20 @@
import { getTestSelector, getTestSelectorStartsWith } from '../utils'
describe('Testing tokens on uniswap page', () => {
before(() => {
cy.visit('/')
})
it('should load token leaderboard', () => {
cy.visit('/tokens/ethereum')
cy.get(getTestSelectorStartsWith('token-table')).its('length').should('be.gte', 25)
})
it('should load go to ethereum token and return to token list page', () => {
cy.visit('/tokens/ethereum')
cy.get(getTestSelector('token-table-row-Ether')).click()
cy.get(getTestSelector('token-details-stats')).should('exist')
cy.get(getTestSelector('token-details-return-button')).click()
cy.get(getTestSelectorStartsWith('token-table')).its('length').should('be.gte', 25)
})
})

View File

@@ -0,0 +1,51 @@
import { getTestSelector } from '../utils'
describe('Wallet Dropdown', () => {
before(() => {
cy.visit('/pool')
})
it('should change the theme', () => {
cy.get(getTestSelector('web3-status-connected')).click()
cy.get(getTestSelector('wallet-select-theme')).click()
cy.get(getTestSelector('wallet-select-theme')).contains('Light theme').should('exist')
})
it('should select a language', () => {
cy.get(getTestSelector('wallet-select-language')).click()
cy.get(getTestSelector('wallet-language-item')).contains('Afrikaans').click({ force: true })
cy.get(getTestSelector('wallet-header')).should('contain', 'Taal')
cy.get(getTestSelector('wallet-language-item')).contains('English').click({ force: true })
cy.get(getTestSelector('wallet-header')).should('contain', 'Language')
cy.get(getTestSelector('wallet-back')).click()
})
it('should be able to view transactions', () => {
cy.get(getTestSelector('wallet-transactions')).click()
cy.get(getTestSelector('wallet-empty-transaction-text')).should('exist')
cy.get(getTestSelector('wallet-back')).click()
})
it('should change the theme when not connected', () => {
cy.get(getTestSelector('wallet-disconnect')).click()
cy.get(getTestSelector('wallet-select-theme')).click()
cy.get(getTestSelector('wallet-select-theme')).contains('Dark theme').should('exist')
cy.get(getTestSelector('wallet-select-theme')).click()
cy.get(getTestSelector('wallet-select-theme')).contains('Light theme').should('exist')
})
it('should select a language when not connected', () => {
cy.get(getTestSelector('wallet-select-language')).click()
cy.get(getTestSelector('wallet-language-item')).contains('Afrikaans').click({ force: true })
cy.get(getTestSelector('wallet-header')).should('contain', 'Taal')
cy.get(getTestSelector('wallet-language-item')).contains('English').click({ force: true })
cy.get(getTestSelector('wallet-header')).should('contain', 'Language')
cy.get(getTestSelector('wallet-back')).click()
})
it('should open the wallet connect modal from the drop down when not connected', () => {
cy.get(getTestSelector('wallet-connect-wallet')).click()
cy.get(getTestSelector('wallet-modal')).should('exist')
cy.get(getTestSelector('wallet-modal-close')).click()
})
})

View File

@@ -1,30 +0,0 @@
import { TEST_ADDRESS_NEVER_USE_SHORTENED } from '../support/ethereum'
describe('Wallet', () => {
before(() => {
cy.visit('/swap')
})
it('displays account details', () => {
cy.get('[data-testid=web3-status-connected]').contains(TEST_ADDRESS_NEVER_USE_SHORTENED).click()
})
it('displays account view in wallet modal', () => {
cy.get('[data-testid=web3-account-identifier-row]').contains(TEST_ADDRESS_NEVER_USE_SHORTENED)
})
it('changes back to the options grid', () => {
cy.contains('Change').click()
cy.get('[data-testid=option-grid]').should('exist')
})
it('selects injected wallet option', () => {
cy.contains('Injected').click()
cy.get('[data-testid=web3-account-identifier-row]').contains(TEST_ADDRESS_NEVER_USE_SHORTENED)
})
it('shows connect buttons after disconnect', () => {
cy.contains('Disconnect').click()
cy.get('[data-testid=option-grid]').should('exist')
})
})

View File

@@ -9,6 +9,8 @@
import { injected } from './ethereum'
import assert = require('assert')
import { FeatureFlag } from '../../src/featureFlags/flags/featureFlags'
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
@@ -17,6 +19,7 @@ declare global {
}
interface VisitOptions {
serviceWorker?: true
featureFlags?: Array<FeatureFlag>
}
}
}
@@ -31,10 +34,23 @@ Cypress.Commands.overwrite(
cy.intercept('/service-worker.js', options?.serviceWorker ? undefined : { statusCode: 404 }).then(() => {
original({
...options,
url: (url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url) + '?chain=rinkeby',
url: (url.startsWith('/') && url.length > 2 && !url.startsWith('/#') ? `/#${url}` : url) + '?chain=goerli',
onBeforeLoad(win) {
options?.onBeforeLoad?.(win)
win.localStorage.clear()
win.localStorage.setItem('redux_localstorage_simple_user', '{"selectedWallet":"INJECTED"}')
if (options?.featureFlags) {
const featureFlags = options.featureFlags.reduce(
(flags, flag) => ({
...flags,
[flag]: 'enabled',
}),
{}
)
win.localStorage.setItem('featureFlags', JSON.stringify(featureFlags))
}
win.ethereum = injected
},
})
@@ -49,6 +65,17 @@ beforeEach(() => {
res.headers['origin'] = 'http://localhost:3000'
res.continue()
})
// Graphql security policies are based on Origin headers.
// These are stripped by cypress because chromeWebSecurity === false; this adds them back in.
cy.intercept('https://api.uniswap.org/v1/graphql', (res) => {
res.headers['origin'] = 'https://app.uniswap.org'
res.continue()
})
cy.intercept('https://beta.api.uniswap.org/v1/graphql', (res) => {
res.headers['origin'] = 'https://app.uniswap.org'
res.continue()
})
})
Cypress.on('uncaught:exception', (_err, _runnable) => {

View File

@@ -3,6 +3,7 @@
*/
import { Eip1193Bridge } from '@ethersproject/experimental/lib/eip1193-bridge'
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
import { JsonRpcProvider } from '@ethersproject/providers'
import { Wallet } from '@ethersproject/wallet'
@@ -11,17 +12,12 @@ import { Wallet } from '@ethersproject/wallet'
const TEST_PRIVATE_KEY = '0xe580410d7c37d26c6ad1a837bbae46bc27f9066a466fb3a66e770523b4666d19'
// address of the above key
export const TEST_ADDRESS_NEVER_USE = new Wallet(TEST_PRIVATE_KEY).address
const TEST_ADDRESS_NEVER_USE = new Wallet(TEST_PRIVATE_KEY).address
export const TEST_ADDRESS_NEVER_USE_SHORTENED = `${TEST_ADDRESS_NEVER_USE.substr(
0,
6
)}...${TEST_ADDRESS_NEVER_USE.substr(-4, 4)}`
const provider = new JsonRpcProvider('https://rinkeby.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847', 4)
const provider = new JsonRpcProvider('https://goerli.infura.io/v3/4bf032f2d38a4ed6bb975b80d6340847', 4)
const signer = new Wallet(TEST_PRIVATE_KEY, provider)
export const injected = new (class extends Eip1193Bridge {
chainId = 4
chainId = /* GOERLI= */ 5
async sendAsync(...args: any[]) {
console.debug('sendAsync called', ...args)

3
cypress/utils/index.ts Normal file
View File

@@ -0,0 +1,3 @@
export const getTestSelector = (selectorId: string) => `[data-testid=${selectorId}]`
export const getTestSelectorStartsWith = (selectorId: string) => `[data-testid^=${selectorId}]`

22
fetch-schema.js Normal file
View File

@@ -0,0 +1,22 @@
/* eslint-disable */
require('dotenv').config({ path: '.env.production' })
const { exec } = require('child_process')
const dataConfig = require('./relay.config')
const thegraphConfig = require('./relay_thegraph.config')
/* eslint-enable */
function fetchSchema(url, outputFile) {
exec(
`get-graphql-schema --h Origin=https://app.uniswap.org ${url} | tee ${outputFile}.temp`,
(error, stdout, stderr) => {
if (error || stderr) {
console.log(`Failed to fetch schema from ${url}`)
} else if (stdout) {
exec(`mv ${outputFile}.temp ${outputFile}`)
}
}
)
}
fetchSchema(process.env.THE_GRAPH_SCHEMA_ENDPOINT, thegraphConfig.schema)
fetchSchema(process.env.REACT_APP_AWS_API_ENDPOINT, dataConfig.schema)

View File

@@ -8,19 +8,24 @@
"contracts:compile:abi": "typechain --target ethers-v5 --out-dir src/abis/types \"./src/abis/**/*.json\"",
"contracts:compile:v3": "typechain --target ethers-v5 --out-dir src/types/v3 \"./node_modules/@uniswap/**/artifacts/contracts/**/*[!dbg].json\"",
"contracts:compile": "yarn contracts:compile:abi && yarn contracts:compile:v3",
"graphql:generate": "graphql-codegen --config codegen.yml",
"relay": "relay-compiler relay.config.js",
"relay-thegraph": "relay-compiler relay_thegraph.config.js",
"graphql:fetch": "node fetch-schema.js",
"graphql:generate": "yarn relay && yarn relay-thegraph",
"prei18n:extract": "node prei18n-extract.js",
"i18n:extract": "lingui extract --locale en-US",
"i18n:compile": "yarn i18n:extract && lingui compile",
"i18n:pseudo": "lingui extract --locale pseudo && lingui compile",
"prepare": "yarn contracts:compile && yarn graphql:generate && yarn i18n:compile",
"start": "react-scripts start",
"build": "react-scripts build",
"prepare": "yarn contracts:compile && yarn graphql:fetch && yarn graphql:generate && yarn i18n:compile",
"start": "craco start",
"build": "craco build",
"serve": "serve build -l 3000",
"deduplicate": "yarn-deduplicate --strategy=highest",
"lint": "yarn eslint .",
"test": "react-scripts test --coverage",
"test": "craco test --coverage",
"cypress:open": "cypress open --browser chrome --e2e",
"cypress:run": "cypress run --browser chrome --e2e"
"cypress:run": "cypress run --browser chrome --e2e",
"postinstall": "patch-package"
},
"jest": {
"collectCoverageFrom": [
@@ -55,11 +60,8 @@
]
},
"devDependencies": {
"@craco/craco": "6.4.3",
"@ethersproject/experimental": "^5.4.0",
"@graphql-codegen/cli": "1.21.5",
"@graphql-codegen/typescript": "1.22.3",
"@graphql-codegen/typescript-operations": "^1.18.2",
"@graphql-codegen/typescript-rtk-query": "^1.1.1",
"@lingui/cli": "^3.9.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.1",
@@ -79,90 +81,115 @@
"@types/react-dom": "^18.0.6",
"@types/react-redux": "^7.1.24",
"@types/react-router-dom": "^5.3.3",
"@types/react-table": "^7.7.12",
"@types/react-virtualized-auto-sizer": "^1.0.0",
"@types/react-window": "^1.8.2",
"@types/rebass": "^4.0.7",
"@types/styled-components": "^5.1.25",
"@types/testing-library__cypress": "^5.0.5",
"@types/ua-parser-js": "^0.7.35",
"@types/uuid": "^8.3.4",
"@types/wcag-contrast": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^4",
"@typescript-eslint/parser": "^4",
"@vanilla-extract/babel-plugin": "^1.1.7",
"@vanilla-extract/webpack-plugin": "^2.1.11",
"babel-plugin-relay": "^14.1.0",
"cypress": "^10.3.1",
"env-cmd": "^10.1.0",
"eslint": "^7.11.0",
"eslint-config-prettier": "^6.11.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-better-styled-components": "^1.1.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.0",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"jest-styled-components": "^7.0.8",
"ms.macro": "^2.0.0",
"patch-package": "^6.4.7",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.7.1",
"react-scripts": "^4.0.3",
"relay-compiler": "^14.1.0",
"serve": "^11.3.2",
"typechain": "^5.0.0",
"typescript": "^4.4.3"
"typescript": "^4.4.3",
"yarn-deduplicate": "^6.0.0"
},
"dependencies": {
"@amplitude/analytics-browser": "^0.5.1",
"@amplitude/experiment-js-client": "^1.5.4",
"@coinbase/wallet-sdk": "^3.3.0",
"@fontsource/ibm-plex-mono": "^4.5.1",
"@fontsource/inter": "^4.5.1",
"@lingui/core": "^3.14.0",
"@lingui/macro": "^3.14.0",
"@lingui/react": "^3.14.0",
"@looksrare/sdk": "^0.10.2",
"@metamask/jazzicon": "^2.0.0",
"@opensea/seaport-js": "^1.0.2",
"@popperjs/core": "^2.4.4",
"@reach/dialog": "^0.10.3",
"@reach/portal": "^0.10.3",
"@react-hook/window-scroll": "^1.3.0",
"@reduxjs/toolkit": "^1.6.1",
"@sentry/react": "7.20.1",
"@types/react-relay": "^13.0.2",
"@types/react-window-infinite-loader": "^1.0.6",
"@uniswap/analytics": "1.2.0",
"@uniswap/analytics-events": "1.3.1",
"@uniswap/conedison": "^1.1.0",
"@uniswap/governance": "^1.0.2",
"@uniswap/liquidity-staker": "^1.0.2",
"@uniswap/merkle-distributor": "1.0.1",
"@uniswap/redux-multicall": "^1.1.5",
"@uniswap/router-sdk": "^1.0.6",
"@uniswap/permit2-sdk": "1.2.0",
"@uniswap/redux-multicall": "^1.1.8",
"@uniswap/router-sdk": "^1.3.0",
"@uniswap/sdk-core": "^3.0.1",
"@uniswap/smart-order-router": "^2.8.2",
"@uniswap/smart-order-router": "^2.10.0",
"@uniswap/token-lists": "^1.0.0-beta.30",
"@uniswap/universal-router-sdk": "1.3.0",
"@uniswap/v2-core": "1.0.0",
"@uniswap/v2-periphery": "^1.1.0-beta.0",
"@uniswap/v2-sdk": "^3.0.1",
"@uniswap/v3-core": "1.0.0",
"@uniswap/v3-periphery": "^1.1.1",
"@uniswap/v3-sdk": "^3.9.0",
"@uniswap/widgets": "2.22.11",
"@vanilla-extract/css": "^1.7.2",
"@vanilla-extract/css-utils": "^0.1.2",
"@vanilla-extract/dynamic": "^2.0.2",
"@vanilla-extract/sprinkles": "^1.4.1",
"@visx/axis": "^2.12.2",
"@visx/event": "^2.6.0",
"@visx/glyph": "^2.10.0",
"@visx/group": "^2.10.0",
"@visx/react-spring": "^2.12.2",
"@visx/responsive": "^2.10.0",
"@visx/shape": "^2.11.1",
"@walletconnect/ethereum-provider": "1.7.1",
"@web3-react/coinbase-wallet": "^8.0.34-beta.0",
"@web3-react/core": "^8.0.35-beta.0",
"@web3-react/eip1193": "^8.0.26-beta.0",
"@web3-react/empty": "^8.0.20-beta.0",
"@web3-react/gnosis-safe": "^8.0.6-beta.0",
"@web3-react/metamask": "^8.0.28-beta.0",
"@web3-react/network": "^8.0.27-beta.0",
"@web3-react/types": "^8.0.20-beta.0",
"@web3-react/url": "^8.0.25-beta.0",
"@web3-react/walletconnect": "^8.0.35-beta.0",
"ajv": "^6.12.3",
"@walletconnect/ethereum-provider": "^1.8.0",
"@web3-react/coinbase-wallet": "8.0.34-beta.0",
"@web3-react/core": "8.0.35-beta.0",
"@web3-react/eip1193": "8.0.26-beta.0",
"@web3-react/empty": "8.0.20-beta.0",
"@web3-react/gnosis-safe": "8.0.7-beta.0",
"@web3-react/metamask": "8.0.28-beta.0",
"@web3-react/network": "8.0.27-beta.0",
"@web3-react/types": "8.0.20-beta.0",
"@web3-react/url": "8.0.25-beta.0",
"@web3-react/walletconnect": "8.0.36-beta.0",
"array.prototype.flat": "^1.2.4",
"array.prototype.flatmap": "^1.2.4",
"cids": "^1.0.0",
"clsx": "^1.1.1",
"copy-to-clipboard": "^3.2.0",
"d3": "^7.6.1",
"d3-curve-circlecorners": "^0.1.6",
"ethers": "^5.1.4",
"firebase": "^9.1.3",
"fortmatic": "^2.4.0",
"graphql": "^15.5.0",
"focus-visible": "^5.2.0",
"get-graphql-schema": "^2.1.2",
"graphql": "^16.5.0",
"graphql-request": "^3.4.0",
"immer": "^9.0.6",
"inter-ui": "^3.13.1",
@@ -177,20 +204,26 @@
"polyfill-object.fromentries": "^1.0.1",
"popper-max-size-modifier": "^0.2.0",
"qs": "^6.9.4",
"rc-slider": "^10.0.1",
"react": "^18.2.0",
"react-confetti": "^6.0.0",
"react-dom": "^18.2.0",
"react-feather": "^2.0.8",
"react-ga4": "^1.4.1",
"react-infinite-scroll-component": "^6.1.0",
"react-is": "^17.0.2",
"react-markdown": "^4.3.1",
"react-popper": "^2.2.3",
"react-query": "^3.39.1",
"react-redux": "^8.0.2",
"react-relay": "^14.1.0",
"react-relay-network-modern": "^6.2.1",
"react-router-dom": "^6.3.0",
"react-spring": "^8.0.27",
"react-spring": "^9.5.5",
"react-table": "^7.8.0",
"react-use-gesture": "^6.0.14",
"react-virtualized-auto-sizer": "^1.0.2",
"react-window": "^1.8.5",
"react-window-infinite-loader": "^1.0.8",
"rebass": "^4.0.7",
"redux": "^4.1.2",
"redux-localstorage-simple": "^2.3.1",
@@ -200,11 +233,19 @@
"ua-parser-js": "^0.7.28",
"use-count-up": "^2.2.5",
"use-resize-observer": "^9.0.2",
"uuid": "^8.3.2",
"video-extensions": "^1.2.0",
"wcag-contrast": "^3.0.0",
"web-vitals": "^2.1.0",
"workbox-core": "^6.1.0",
"workbox-navigation-preload": "^6.1.0",
"workbox-precaching": "^6.1.0",
"workbox-routing": "^6.1.0"
"workbox-routing": "^6.1.0",
"zustand": "^4.0.0-rc.1"
},
"engines": {
"npm": "please-use-yarn",
"node": "14",
"yarn": ">=1.22"
}
}

View File

@@ -0,0 +1,22 @@
diff --git a/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs.dev.js b/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs.dev.js
index 6e40061..10283a2 100644
--- a/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs.dev.js
+++ b/node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs.dev.js
@@ -177,11 +177,13 @@ function generateIdentifier(debugId) {
var fileScopeHash = hash__default["default"](packageName ? "".concat(packageName).concat(filePath) : filePath);
var identifier = "".concat(fileScopeHash).concat(refCount);
- if (adapter_dist_vanillaExtractCssAdapter.getIdentOption() === 'debug') {
- var devPrefix = getDevPrefix(debugId);
+ if (process.env.VANILLA_EXTRACT_DEV_PREFIX) {
+ if (adapter_dist_vanillaExtractCssAdapter.getIdentOption() === 'debug') {
+ var devPrefix = getDevPrefix(debugId);
- if (devPrefix) {
- identifier = "".concat(devPrefix, "__").concat(identifier);
+ if (devPrefix) {
+ identifier = "".concat(devPrefix, "__").concat(identifier);
+ }
}
}

View File

@@ -1,5 +1,5 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const exec = require('child_process').exec
const { exec } = require('child_process')
const isWindows = process.platform === 'win32' || /^(msys|cygwin)$/.test(process.env.OSTYPE)
if (isWindows) {

View File

@@ -15,8 +15,11 @@
<link rel="apple-touch-icon" sizes="512x512" href="%PUBLIC_URL%/images/512x512_App_Icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#ff007a" />
<meta name="fortmatic-site-verification" content="j93LgcVZk79qcgyo" />
<meta name="theme-color" content="#FC72FF" />
<meta
http-equiv="Content-Security-Policy"
content="script-src 'self' https://www.google-analytics.com https://www.googletagmanager.com 'unsafe-inline'"
/>
<!--
manifest.json provides metadata used when the app is installed as a PWA.
@@ -71,10 +74,10 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
font-feature-settings: 'ss01' on, 'ss02' on, 'cv01' on, 'cv03' on;
}
#background-radial-gradient {
background: linear-gradient(180deg, #202738 0%, #070816 100%);
position: fixed;
top: 0;
left: 0;
@@ -82,12 +85,13 @@
pointer-events: none;
width: 200vw;
height: 200vh;
background: radial-gradient(50% 50% at 50% 50%, #fc077d10 0%, rgba(255, 255, 255, 0) 100%);
transform: translate(-50vw, -100vh);
z-index: -1;
}
html {
html,
body,
#root {
min-height: 100%;
}
@@ -96,6 +100,7 @@
background-color: #212429;
}
}
@media (prefers-color-scheme: light) {
html {
background-color: #f7f8fa;
@@ -103,26 +108,15 @@
}
</style>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<!-- The root is the container of the app -->
<div id="root">
<!-- Triggers the font to load immediately and then is replaced by the app -->
<div>&emsp;</div>
</div>
<div id="background-radial-gradient"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

View File

@@ -2,7 +2,10 @@
"background_color": "#fff",
"display": "standalone",
"homepage_url": "https://app.uniswap.org",
"providedBy": { "name": "Uniswap", "url": "https://uniswap.org" },
"providedBy": {
"name": "Uniswap",
"url": "https://uniswap.org"
},
"icons": [
{
"src": "./images/192x192_App_Icon.png",
@@ -23,5 +26,5 @@
"iconPath": "./images/256x256_App_Icon_Pink.svg",
"short_name": "Uniswap",
"start_url": ".",
"theme_color": "#ff007a"
}
"theme_color": "#FC72FF"
}

View File

@@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.64864 2L1 7.65256L10.5 17.1487L20 7.65256L14.3514 2H6.64864ZM6.13513 5.59458C8.5352 3.18398 12.4648 3.18396 14.8649 5.59456L16.9189 7.64866L14.8649 9.70272C12.4648 12.1133 8.5352 12.1133 6.13513 9.70274L4.08109 7.64866L6.13513 5.59458ZM7.54702 7.64848C7.54702 9.27987 8.86966 10.6012 10.4997 10.6012C12.1298 10.6012 13.4524 9.27987 13.4524 7.64848C13.4524 6.01708 12.1298 4.69576 10.4997 4.69576C8.86966 4.69576 7.54702 6.01708 7.54702 7.64848ZM10.4997 8.93225C9.791 8.93225 9.21593 8.35778 9.21593 7.64848C9.21593 6.93917 9.791 6.3647 10.4997 6.3647C11.2084 6.3647 11.7835 6.93917 11.7835 7.64848C11.7835 8.35778 11.2084 8.93225 10.4997 8.93225Z" fill="#5D6785"/>
</svg>

After

Width:  |  Height:  |  Size: 820 B

View File

@@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 1C5.0302 1 1 5.0302 1 10C1 14.9698 5.0302 19 10 19C14.9698 19 19 14.9698 19 10C19 5.0302 14.9716 1 10 1ZM5.4406 10.3024L5.4784 10.2412L7.8202 6.5782C7.8544 6.526 7.9354 6.5314 7.9606 6.589C8.3512 7.4656 8.6896 8.5564 8.5312 9.235C8.4646 9.514 8.2792 9.892 8.0704 10.2412C8.0434 10.2916 8.0146 10.342 7.9822 10.3906C7.9678 10.4122 7.9426 10.4248 7.9156 10.4248H5.509C5.4442 10.4248 5.4064 10.3546 5.4406 10.3024ZM15.8752 11.5624C15.8752 11.5966 15.8554 11.6254 15.8266 11.638C15.6448 11.7154 15.0238 12.0016 14.7664 12.3598C14.1076 13.276 13.6054 14.5864 12.4804 14.5864H7.7896C6.1264 14.5864 4.78 13.2346 4.78 11.566V11.512C4.78 11.4688 4.816 11.4328 4.861 11.4328H7.4746C7.5268 11.4328 7.5646 11.4796 7.561 11.5318C7.5412 11.701 7.5736 11.8756 7.6546 12.034C7.8094 12.349 8.1316 12.5452 8.479 12.5452H9.7732V11.5354H8.4934C8.4286 11.5354 8.389 11.4598 8.4268 11.4058C8.4412 11.3842 8.4556 11.3626 8.4736 11.3374C8.5942 11.1646 8.767 10.8982 8.9398 10.594C9.0568 10.3888 9.1702 10.1692 9.262 9.9496C9.28 9.91 9.2944 9.8686 9.3106 9.829C9.3358 9.7588 9.361 9.6922 9.379 9.6274C9.397 9.5716 9.4132 9.514 9.4276 9.46C9.4708 9.2728 9.4888 9.0748 9.4888 8.8696C9.4888 8.7886 9.4852 8.704 9.478 8.6248C9.4744 8.5366 9.4636 8.4484 9.4528 8.3602C9.4456 8.2828 9.4312 8.2054 9.4168 8.1262C9.397 8.0092 9.3718 7.8922 9.343 7.7752L9.3322 7.7302C9.3106 7.6492 9.2908 7.5736 9.2656 7.4926C9.1918 7.2406 9.109 6.994 9.019 6.7636C8.9866 6.6718 8.9506 6.5836 8.9128 6.4972C8.8588 6.364 8.803 6.2434 8.7526 6.13C8.7256 6.0778 8.704 6.031 8.6824 5.9824C8.6572 5.9284 8.632 5.8744 8.605 5.8222C8.587 5.7826 8.5654 5.7448 8.551 5.7088L8.3926 5.4172C8.371 5.3776 8.407 5.329 8.4502 5.3416L9.4402 5.6098H9.4438C9.4456 5.6098 9.4456 5.6098 9.4474 5.6098L9.577 5.6476L9.721 5.6872L9.7732 5.7016V5.1148C9.7732 4.8304 10 4.6 10.2826 4.6C10.423 4.6 10.5508 4.6576 10.6408 4.7512C10.7326 4.8448 10.7902 4.9726 10.7902 5.1148V5.9878L10.8964 6.0166C10.9036 6.0202 10.9126 6.0238 10.9198 6.0292C10.945 6.0472 10.9828 6.076 11.0296 6.112C11.0674 6.1408 11.107 6.1768 11.1538 6.2146C11.2492 6.292 11.3644 6.391 11.4886 6.5044C11.521 6.5332 11.5534 6.562 11.584 6.5926C11.7442 6.742 11.9242 6.9166 12.097 7.111C12.1456 7.1668 12.1924 7.2208 12.241 7.2802C12.2878 7.3396 12.34 7.3972 12.3832 7.4548C12.4426 7.5322 12.5038 7.6132 12.5596 7.6978C12.5848 7.7374 12.6154 7.7788 12.6388 7.8184C12.7108 7.9246 12.772 8.0344 12.8314 8.1442C12.8566 8.1946 12.8818 8.2504 12.9034 8.3044C12.97 8.452 13.0222 8.6014 13.0546 8.7526C13.0654 8.785 13.0726 8.8192 13.0762 8.8516V8.8588C13.087 8.902 13.0906 8.9488 13.0942 8.9974C13.1086 9.1504 13.1014 9.3052 13.069 9.46C13.0546 9.5248 13.0366 9.586 13.015 9.6526C12.9916 9.7156 12.97 9.7804 12.9412 9.8434C12.8854 9.9712 12.8206 10.1008 12.7432 10.2196C12.718 10.2646 12.6874 10.3114 12.6586 10.3564C12.6262 10.4032 12.592 10.4482 12.5632 10.4914C12.5218 10.5472 12.4786 10.6048 12.4336 10.657C12.394 10.711 12.3544 10.765 12.3094 10.8136C12.2482 10.8874 12.1888 10.9558 12.1258 11.0224C12.0898 11.0656 12.0502 11.1106 12.0088 11.1502C11.9692 11.1952 11.9278 11.2348 11.8918 11.2708C11.8288 11.3338 11.7784 11.3806 11.7352 11.422L11.6326 11.5138C11.6182 11.5282 11.5984 11.5354 11.5786 11.5354H10.7902V12.5452H11.782C12.0034 12.5452 12.214 12.4678 12.385 12.322C12.4426 12.2716 12.6964 12.052 12.997 11.7208C13.0078 11.7082 13.0204 11.701 13.0348 11.6974L15.7726 10.9054C15.8248 10.891 15.8752 10.9288 15.8752 10.9828V11.5624Z" fill="#5D6785"/>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,6 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 14.4C0 6.4471 6.4471 0 14.4 0H33.6C41.5529 0 48 6.4471 48 14.4V33.6C48 41.5529 41.5529 48 33.6 48H14.4C6.4471 48 0 41.5529 0 33.6V14.4Z" fill="#B9B9FF"/>
<path d="M9.29999 15H12L15.3 24L12 33H9.29999L12.6 24L9.29999 15Z" fill="#121212"/>
<path d="M23.5727 33.192C22.1807 33.192 21.0367 32.872 20.1407 32.232C19.2607 31.592 18.8207 30.72 18.8207 29.616H21.2447C21.2447 30.112 21.4607 30.496 21.8927 30.768C22.3407 31.024 22.9167 31.152 23.6207 31.152H24.6287C25.4607 31.152 26.0767 30.992 26.4767 30.672C26.8767 30.336 27.0767 29.896 27.0767 29.352C27.0767 28.808 26.8847 28.384 26.5007 28.08C26.1167 27.776 25.5727 27.56 24.8687 27.432L23.0687 27.168C20.4447 26.752 19.1327 25.48 19.1327 23.352C19.1327 22.136 19.5327 21.208 20.3327 20.568C21.1327 19.928 22.2767 19.608 23.7647 19.608H24.6767C26.0527 19.608 27.1567 19.92 27.9887 20.544C28.8207 21.152 29.2367 21.96 29.2367 22.968H26.8127C26.8127 22.568 26.6127 22.248 26.2127 22.008C25.8287 21.768 25.3007 21.648 24.6287 21.648H23.7167C22.9807 21.648 22.4207 21.8 22.0367 22.104C21.6527 22.392 21.4607 22.808 21.4607 23.352C21.4607 24.28 22.1167 24.848 23.4287 25.056L25.2287 25.344C26.6687 25.568 27.7247 25.992 28.3967 26.616C29.0687 27.224 29.4047 28.104 29.4047 29.256C29.4047 30.488 28.9967 31.456 28.1807 32.16C27.3807 32.848 26.1807 33.192 24.5807 33.192H23.5727Z" fill="#121212"/>
<path d="M38.7 15H36L32.7 24L36 33H38.7L35.4 24L38.7 15Z" fill="#121212"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@@ -0,0 +1,5 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17.146 4.52803C15.767 3.18049 13.8805 2.35 11.8 2.35C7.57502 2.35 4.15 5.77502 4.15 10C4.15 14.225 7.57502 17.65 11.8 17.65C13.8805 17.65 15.767 16.8195 17.146 15.472C15.501 17.617 12.912 19 10 19C5.02944 19 1 14.9706 1 10C1 5.02944 5.02944 1 10 1C12.912 1 15.501 2.38301 17.146 4.52803Z" fill="#5D6785"/>
<path d="M6.08317 14.3776C7.18644 15.4556 8.69563 16.12 10.36 16.12C13.74 16.12 16.48 13.38 16.48 10C16.48 6.62002 13.74 3.88 10.36 3.88C8.69563 3.88 7.18644 4.54439 6.08317 5.62243C7.39916 3.90641 9.47037 2.8 11.8 2.8C15.7765 2.8 19 6.02355 19 10C19 13.9764 15.7764 17.2 11.8 17.2C9.47037 17.2 7.39916 16.0936 6.08317 14.3776Z" fill="#5D6785"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.4 10C15.4 12.9823 12.9823 15.4 10 15.4C7.01766 15.4 4.6 12.9823 4.6 10C4.6 7.01766 7.01766 4.6 10 4.6C12.9823 4.6 15.4 7.01766 15.4 10ZM13.6 10C13.6 11.9882 11.9882 13.6 10 13.6C8.01177 13.6 6.4 11.9882 6.4 10C6.4 8.01178 8.01177 6.4 10 6.4C11.9882 6.4 13.6 8.01178 13.6 10Z" fill="#5D6785"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

6
relay.config.js Normal file
View File

@@ -0,0 +1,6 @@
module.exports = {
src: './src',
language: 'typescript',
schema: './src/graphql/data/schema.graphql',
exclude: ['**/node_modules/**', '**/__mocks__/**', '**/__generated__/**', '**/thegraph/**'],
}

9
relay_thegraph.config.js Normal file
View File

@@ -0,0 +1,9 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const defaultConfig = require('./relay.config')
module.exports = {
src: defaultConfig.src,
language: defaultConfig.language,
schema: './src/graphql/thegraph/schema.graphql',
exclude: ['**/node_modules/**', '**/__mocks__/**', '**/__generated__/**', '**/data/**'],
}

View File

@@ -1,15 +1,143 @@
[
{
"constant": true,
"inputs": [
{
"internalType": "string",
"name": "uri_",
"type": "string"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "ids",
"type": "uint256[]"
},
{
"indexed": false,
"internalType": "uint256[]",
"name": "values",
"type": "uint256[]"
}
],
"name": "TransferBatch",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "TransferSingle",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "value",
"type": "string"
},
{
"indexed": true,
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "URI",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "_id",
"name": "id",
"type": "uint256"
}
],
@@ -21,16 +149,165 @@
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address[]",
"name": "accounts",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "ids",
"type": "uint256[]"
}
],
"name": "balanceOfBatch",
"outputs": [
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"name": "isApprovedForAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "ids",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "amounts",
"type": "uint256[]"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "safeBatchTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "safeTransferFrom",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "setApprovalForAll",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_id",
"name": "",
"type": "uint256"
}
],
@@ -42,7 +319,6 @@
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}

View File

@@ -1,5 +1,320 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "punkContract",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "approved",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "operator",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "ApprovalForAll",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Paused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "proxy",
"type": "address"
}
],
"name": "ProxyRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Unpaused",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "baseURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "punkIndex",
"type": "uint256"
}
],
"name": "burn",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "getApproved",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "operator",
"type": "address"
}
],
"name": "isApprovedForAll",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "punkIndex",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
@@ -15,10 +330,263 @@
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "pause",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "paused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"name": "proxyInfo",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "punkContract",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "registerProxy",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "safeTransferFrom",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_data",
"type": "bytes"
}
],
"name": "safeTransferFrom",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "bool",
"name": "approved",
"type": "bool"
}
],
"name": "setApprovalForAll",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "string",
"name": "baseUri",
"type": "string"
}
],
"name": "setBaseURI",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "tokenByIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "tokenOfOwnerByIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "uint256",
@@ -34,7 +602,72 @@
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [],
"name": "unpause",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
]

View File

@@ -0,0 +1,218 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "token_",
"type": "address"
},
{
"internalType": "bytes32",
"name": "merkleRoot_",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "endTime_",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AlreadyClaimed",
"type": "error"
},
{
"inputs": [],
"name": "ClaimWindowFinished",
"type": "error"
},
{
"inputs": [],
"name": "EndTimeInPast",
"type": "error"
},
{
"inputs": [],
"name": "InvalidProof",
"type": "error"
},
{
"inputs": [],
"name": "NoWithdrawDuringClaim",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "index",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Claimed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
},
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "bytes32[]",
"name": "merkleProof",
"type": "bytes32[]"
}
],
"name": "claim",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "endTime",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "isClaimed",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "merkleRoot",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "token",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "withdraw",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 KiB

4
src/assets/svg/eye.svg Normal file
View File

@@ -0,0 +1,4 @@
<svg width="54" height="40" viewBox="0 0 54 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.3335 19.9997C1.3335 19.9997 10.6668 1.33301 27.0002 1.33301C43.3335 1.33301 52.6668 19.9997 52.6668 19.9997C52.6668 19.9997 43.3335 38.6663 27.0002 38.6663C10.6668 38.6663 1.3335 19.9997 1.3335 19.9997Z" stroke="#98A1C0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M27.0002 26.9997C30.8662 26.9997 34.0002 23.8657 34.0002 19.9997C34.0002 16.1337 30.8662 12.9997 27.0002 12.9997C23.1342 12.9997 20.0002 16.1337 20.0002 19.9997C20.0002 23.8657 23.1342 26.9997 27.0002 26.9997Z" stroke="#98A1C0" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 705 B

3
src/assets/svg/share.svg Normal file
View File

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="#fff">
<path stroke-linecap="round" stroke-linejoin="round" d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4m14-7-5-5-5 5m5-5v12"/>
</svg>

After

Width:  |  Height:  |  Size: 257 B

186
src/assets/svg/socks.svg Normal file
View File

@@ -0,0 +1,186 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" viewBox="0 0 20 20">
<g filter="url(#a)">
<path fill="url(#b)" d="M17.654 4.868c0-.69-.56-1.25-1.25-1.25h-2.932c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.741 1.873c-.898.999-1.115 2.687-.058 3.748 1.013 1.017 2.918.988 3.87 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.158v-7.55Z"/>
<path fill="url(#c)" d="M17.654 4.868c0-.69-.56-1.25-1.25-1.25h-2.932c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.741 1.873c-.898.999-1.115 2.687-.058 3.748 1.013 1.017 2.918.988 3.87 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.158v-7.55Z"/>
<path fill="url(#d)" d="M17.654 4.868c0-.69-.56-1.25-1.25-1.25h-2.932c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.741 1.873c-.898.999-1.115 2.687-.058 3.748 1.013 1.017 2.918.988 3.87 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.158v-7.55Z"/>
<path fill="url(#e)" d="M17.654 4.868c0-.69-.56-1.25-1.25-1.25h-2.932c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.741 1.873c-.898.999-1.115 2.687-.058 3.748 1.013 1.017 2.918.988 3.87 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.158v-7.55Z"/>
<path fill="url(#f)" d="M17.654 4.868c0-.69-.56-1.25-1.25-1.25h-2.932c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.741 1.873c-.898.999-1.115 2.687-.058 3.748 1.013 1.017 2.918.988 3.87 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.158v-7.55Z"/>
</g>
<g filter="url(#g)">
<path fill="url(#h)" d="M10.954 2.602c0-.69-.56-1.25-1.25-1.25H6.773c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.742 1.873c-.898 1-1.115 2.687-.058 3.748 1.014 1.018 2.919.988 3.871 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.157V2.602Z"/>
<path fill="url(#i)" d="M10.954 2.602c0-.69-.56-1.25-1.25-1.25H6.773c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.742 1.873c-.898 1-1.115 2.687-.058 3.748 1.014 1.018 2.919.988 3.871 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.157V2.602Z"/>
<path fill="url(#j)" d="M10.954 2.602c0-.69-.56-1.25-1.25-1.25H6.773c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.742 1.873c-.898 1-1.115 2.687-.058 3.748 1.014 1.018 2.919.988 3.871 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.157V2.602Z"/>
<path fill="url(#k)" d="M10.954 2.602c0-.69-.56-1.25-1.25-1.25H6.773c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.742 1.873c-.898 1-1.115 2.687-.058 3.748 1.014 1.018 2.919.988 3.871 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.157V2.602Z"/>
<path fill="url(#l)" d="M10.954 2.602c0-.69-.56-1.25-1.25-1.25H6.773c-.69 0-1.25.56-1.25 1.25v5.704a2.5 2.5 0 0 1-.67 1.703l-1.742 1.873c-.898 1-1.115 2.687-.058 3.748 1.014 1.018 2.919.988 3.871 0l3.167-3.32a3.125 3.125 0 0 0 .864-2.157V2.602Z"/>
</g>
<path fill="url(#m)" d="M17.654 5.776h-5.431v.673h5.431v-.673Z"/>
<path fill="url(#n)" d="M17.654 5.776h-5.431v.673h5.431v-.673Z"/>
<path fill="url(#o)" d="M10.955 3.51H5.523v.674h5.432V3.51Z"/>
<path fill="url(#p)" d="M10.955 3.51H5.523v.674h5.432V3.51Z"/>
<path fill="url(#q)" d="M17.606 4.523c.031.11.048.225.048.345v.328h-5.431v-.328c0-.12.016-.236.048-.345h5.335Z"/>
<path fill="url(#r)" d="M17.606 4.523c.031.11.048.225.048.345v.328h-5.431v-.328c0-.12.016-.236.048-.345h5.335Z"/>
<path fill="url(#s)" d="M10.907 2.257c.031.11.048.225.048.345v.329H5.523v-.329c0-.12.017-.235.049-.345h5.335Z"/>
<path fill="url(#t)" d="M10.907 2.257c.031.11.048.225.048.345v.329H5.523v-.329c0-.12.017-.235.049-.345h5.335Z"/>
<g filter="url(#u)">
<path fill="url(#v)" d="M17.654 12.236h-3.116a.173.173 0 0 0-.176.17c0 1.255.904 2.3 2.096 2.518l.332-.349a3.125 3.125 0 0 0 .864-2.157v-.182Z"/>
</g>
<g filter="url(#w)">
<path fill="url(#x)" d="M10.955 9.97H7.839a.173.173 0 0 0-.176.17c0 1.255.903 2.3 2.096 2.518l.332-.349a3.125 3.125 0 0 0 .864-2.156V9.97Z"/>
</g>
<g filter="url(#y)">
<path fill="url(#z)" d="M13.243 18.21v-.05a3.424 3.424 0 0 0-3.856-3.397c-.511.986-.496 2.268.366 3.133.892.895 2.474.98 3.49.314Z"/>
</g>
<g filter="url(#A)">
<path fill="url(#B)" d="M6.544 15.944v-.05a3.424 3.424 0 0 0-3.857-3.396c-.51.985-.495 2.267.366 3.132.892.896 2.475.98 3.49.314Z"/>
</g>
<defs>
<linearGradient id="b" x1="17.248" x2="13.193" y1="4.4" y2="16.827" gradientUnits="userSpaceOnUse">
<stop stop-color="#FDF2FF"/>
<stop offset="1" stop-color="#FFECFB"/>
</linearGradient>
<linearGradient id="c" x1="17.654" x2="15.615" y1="11.854" y2="11.854" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCCF1"/>
<stop offset="1" stop-color="#FFC5EF" stop-opacity="0"/>
</linearGradient>
<linearGradient id="f" x1="14.99" x2="13.818" y1="16.932" y2="15.721" gradientUnits="userSpaceOnUse">
<stop offset=".209" stop-color="#EDB0DF"/>
<stop offset="1" stop-color="#ECAAED" stop-opacity="0"/>
</linearGradient>
<linearGradient id="h" x1="10.549" x2="6.493" y1="2.134" y2="14.562" gradientUnits="userSpaceOnUse">
<stop stop-color="#FDF2FF"/>
<stop offset="1" stop-color="#FFECFB"/>
</linearGradient>
<linearGradient id="i" x1="10.954" x2="8.915" y1="9.588" y2="9.588" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFCCF1"/>
<stop offset="1" stop-color="#FFC5EF" stop-opacity="0"/>
</linearGradient>
<linearGradient id="l" x1="8.29" x2="7.119" y1="14.666" y2="13.456" gradientUnits="userSpaceOnUse">
<stop offset=".209" stop-color="#EDB0DF"/>
<stop offset="1" stop-color="#ECAAED" stop-opacity="0"/>
</linearGradient>
<linearGradient id="m" x1="12.773" x2="16.915" y1="6.449" y2="6.449" gradientUnits="userSpaceOnUse">
<stop stop-color="#E95FDB"/>
<stop offset="1" stop-color="#FF46CB"/>
</linearGradient>
<linearGradient id="n" x1="12.223" x2="12.793" y1="6.449" y2="6.449" gradientUnits="userSpaceOnUse">
<stop stop-color="#9F4977"/>
<stop offset="1" stop-color="#CA5284" stop-opacity="0"/>
</linearGradient>
<linearGradient id="o" x1="6.074" x2="10.216" y1="4.184" y2="4.184" gradientUnits="userSpaceOnUse">
<stop stop-color="#E95FDB"/>
<stop offset="1" stop-color="#FF46CB"/>
</linearGradient>
<linearGradient id="p" x1="5.523" x2="6.094" y1="4.184" y2="4.184" gradientUnits="userSpaceOnUse">
<stop stop-color="#9F4977"/>
<stop offset="1" stop-color="#CA5284" stop-opacity="0"/>
</linearGradient>
<linearGradient id="q" x1="12.773" x2="16.915" y1="5.196" y2="5.196" gradientUnits="userSpaceOnUse">
<stop stop-color="#E95FDB"/>
<stop offset="1" stop-color="#FF46CB"/>
</linearGradient>
<linearGradient id="r" x1="12.223" x2="12.793" y1="5.196" y2="5.196" gradientUnits="userSpaceOnUse">
<stop stop-color="#9F4977"/>
<stop offset="1" stop-color="#CA5284" stop-opacity="0"/>
</linearGradient>
<linearGradient id="s" x1="6.074" x2="10.216" y1="2.931" y2="2.931" gradientUnits="userSpaceOnUse">
<stop stop-color="#E95FDB"/>
<stop offset="1" stop-color="#FF46CB"/>
</linearGradient>
<linearGradient id="t" x1="5.523" x2="6.094" y1="2.931" y2="2.931" gradientUnits="userSpaceOnUse">
<stop stop-color="#9F4977"/>
<stop offset="1" stop-color="#CA5284" stop-opacity="0"/>
</linearGradient>
<radialGradient id="d" cx="0" cy="0" r="1" gradientTransform="matrix(2.8125 0 0 6.01563 12.02 8.026)" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFD1F5"/>
<stop offset="1" stop-color="#FECAFF" stop-opacity="0"/>
</radialGradient>
<radialGradient id="e" cx="0" cy="0" r="1" gradientTransform="matrix(1.54348 -1.53472 2.30642 2.31958 11.806 16.12)" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFC0FC"/>
<stop offset="1" stop-color="#FFBCFC" stop-opacity="0"/>
</radialGradient>
<radialGradient id="j" cx="0" cy="0" r="1" gradientTransform="matrix(2.8125 0 0 6.01563 5.322 5.76)" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFD1F5"/>
<stop offset="1" stop-color="#FECAFF" stop-opacity="0"/>
</radialGradient>
<radialGradient id="k" cx="0" cy="0" r="1" gradientTransform="matrix(1.54347 -1.53473 2.30643 2.31957 5.107 13.854)" gradientUnits="userSpaceOnUse">
<stop stop-color="#FFC0FC"/>
<stop offset="1" stop-color="#FFBCFC" stop-opacity="0"/>
</radialGradient>
<radialGradient id="v" cx="0" cy="0" r="1" gradientTransform="matrix(-.42911 2.50572 -2.20218 -.37713 16.437 12.236)" gradientUnits="userSpaceOnUse">
<stop offset=".147" stop-color="#FF52CF"/>
<stop offset="1" stop-color="#FB3FFF"/>
</radialGradient>
<radialGradient id="x" cx="0" cy="0" r="1" gradientTransform="matrix(-.42911 2.50572 -2.20218 -.37713 9.738 9.97)" gradientUnits="userSpaceOnUse">
<stop offset=".147" stop-color="#FF52CF"/>
<stop offset="1" stop-color="#FB3FFF"/>
</radialGradient>
<radialGradient id="z" cx="0" cy="0" r="1" gradientTransform="rotate(167.471 5.464 9.437) scale(4.54024 4.83245)" gradientUnits="userSpaceOnUse">
<stop offset=".268" stop-color="#FF4EE3"/>
<stop offset=".92" stop-color="#D12396"/>
</radialGradient>
<radialGradient id="B" cx="0" cy="0" r="1" gradientTransform="rotate(167.471 2.239 7.937) scale(4.54024 4.83245)" gradientUnits="userSpaceOnUse">
<stop offset=".268" stop-color="#FF4EE3"/>
<stop offset=".92" stop-color="#D12396"/>
</radialGradient>
<filter id="a" width="8.808" height="15.23" x="9.045" y="3.418" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dx=".2" dy="-.2"/>
<feGaussianBlur stdDeviation=".3"/>
<feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/>
<feColorMatrix values="0 0 0 0 0.522043 0 0 0 0 0.119948 0 0 0 0 0.5875 0 0 0 1 0"/>
<feBlend in2="shape" result="effect1_innerShadow_6126_86420"/>
</filter>
<filter id="g" width="8.808" height="15.23" x="2.346" y="1.152" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dx=".2" dy="-.2"/>
<feGaussianBlur stdDeviation=".3"/>
<feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/>
<feColorMatrix values="0 0 0 0 0.545098 0 0 0 0 0.219608 0 0 0 0 0.512549 0 0 0 1 0"/>
<feBlend in2="shape" result="effect1_innerShadow_6126_86420"/>
</filter>
<filter id="u" width="3.541" height="2.688" x="14.112" y="12.236" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dx="-.25"/>
<feGaussianBlur stdDeviation=".25"/>
<feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/>
<feColorMatrix values="0 0 0 0 0.976471 0 0 0 0 0.145098 0 0 0 0 0.743686 0 0 0 1 0"/>
<feBlend in2="shape" result="effect1_innerShadow_6126_86420"/>
</filter>
<filter id="w" width="3.541" height="2.688" x="7.413" y="9.97" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dx="-.25"/>
<feGaussianBlur stdDeviation=".25"/>
<feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/>
<feColorMatrix values="0 0 0 0 0.976471 0 0 0 0 0.145098 0 0 0 0 0.743686 0 0 0 1 0"/>
<feBlend in2="shape" result="effect1_innerShadow_6126_86420"/>
</filter>
<filter id="y" width="4.448" height="4.112" x="9.045" y="14.536" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dx=".25" dy="-.2"/>
<feGaussianBlur stdDeviation=".25"/>
<feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/>
<feColorMatrix values="0 0 0 0 0.906118 0 0 0 0 0.329412 0 0 0 0 1 0 0 0 1 0"/>
<feBlend in2="shape" result="effect1_innerShadow_6126_86420"/>
</filter>
<filter id="A" width="4.448" height="4.112" x="2.346" y="12.27" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"/>
<feOffset dx=".25" dy="-.2"/>
<feGaussianBlur stdDeviation=".25"/>
<feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"/>
<feColorMatrix values="0 0 0 0 0.906118 0 0 0 0 0.329412 0 0 0 0 1 0 0 0 1 0"/>
<feBlend in2="shape" result="effect1_innerShadow_6126_86420"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -0,0 +1,3 @@
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.80333 4.8863C7.51044 5.17919 7.51044 5.65406 7.80333 5.94696C8.09622 6.23985 8.5711 6.23985 8.86399 5.94696L7.80333 4.8863ZM12.0837 1.66663L12.614 1.1363C12.3211 0.843403 11.8462 0.843403 11.5533 1.1363L12.0837 1.66663ZM15.3033 5.94696C15.5962 6.23985 16.0711 6.23985 16.364 5.94696C16.6569 5.65406 16.6569 5.17919 16.364 4.8863L15.3033 5.94696ZM11.3337 9.99996C11.3337 10.4142 11.6694 10.75 12.0837 10.75C12.4979 10.75 12.8337 10.4142 12.8337 9.99996H11.3337ZM12.1973 15.1136C12.4902 14.8207 12.4902 14.3459 12.1973 14.053C11.9044 13.7601 11.4296 13.7601 11.1367 14.053L12.1973 15.1136ZM7.91699 18.3333L7.38666 18.8636C7.52731 19.0043 7.71808 19.0833 7.91699 19.0833C8.1159 19.0833 8.30667 19.0043 8.44732 18.8636L7.91699 18.3333ZM4.69732 14.053C4.40443 13.7601 3.92956 13.7601 3.63666 14.053C3.34377 14.3459 3.34377 14.8207 3.63666 15.1136L4.69732 14.053ZM8.66699 10.8333C8.66699 10.4191 8.33121 10.0833 7.91699 10.0833C7.50278 10.0833 7.16699 10.4191 7.16699 10.8333H8.66699ZM8.86399 5.94696L12.614 2.19696L11.5533 1.1363L7.80333 4.8863L8.86399 5.94696ZM11.5533 2.19696L15.3033 5.94696L16.364 4.8863L12.614 1.1363L11.5533 2.19696ZM11.3337 1.66663V9.99996H12.8337V1.66663H11.3337ZM11.1367 14.053L7.38666 17.803L8.44732 18.8636L12.1973 15.1136L11.1367 14.053ZM8.44732 17.803L4.69732 14.053L3.63666 15.1136L7.38666 18.8636L8.44732 17.803ZM8.66699 18.3333L8.66699 10.8333H7.16699L7.16699 18.3333H8.66699Z" fill="currentColor"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,4 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.24453 18.0887C3.24331 19.0467 3.47372 19.7558 3.93576 20.2158C4.39658 20.6771 5.09574 20.904 6.03326 20.8967H8.11975C8.20693 20.8934 8.29386 20.9079 8.37521 20.9395C8.45656 20.9711 8.53062 21.019 8.5928 21.0802L10.0779 22.5484C10.7527 23.2226 11.4139 23.5578 12.0617 23.5541C12.7096 23.5504 13.3709 23.2152 14.0456 22.5484L15.5124 21.0802C15.5767 21.0182 15.6529 20.97 15.7365 20.9385C15.82 20.9069 15.9091 20.8927 15.9982 20.8967H18.0719C19.0192 20.8979 19.7251 20.6673 20.1896 20.2048C20.6541 19.7423 20.8864 19.0333 20.8864 18.0777V16.0021C20.8816 15.8222 20.9474 15.6476 21.0697 15.5157L22.5365 14.0475C23.2198 13.3758 23.559 12.7145 23.5541 12.0636C23.5492 11.4127 23.21 10.7508 22.5365 10.0779L21.0697 8.6097C20.9471 8.47802 20.8812 8.30329 20.8864 8.12336V6.04769C20.8851 5.09092 20.6547 4.3819 20.1951 3.92064C19.7355 3.45939 19.0278 3.22875 18.0719 3.22875H15.9982C15.9091 3.23242 15.8201 3.21807 15.7366 3.18653C15.6532 3.155 15.5769 3.10694 15.5124 3.04523L14.0456 1.57703C13.3709 0.902883 12.7096 0.567648 12.0617 0.571319C11.4139 0.574989 10.7527 0.910224 10.0779 1.57703L8.5928 3.04523C8.53043 3.10622 8.45638 3.15393 8.37508 3.18547C8.29377 3.21701 8.20689 3.23173 8.11975 3.22875H6.03326C5.08718 3.22998 4.38373 3.45877 3.92291 3.91513C3.4621 4.3715 3.23168 5.08235 3.23168 6.04769V8.12887C3.23683 8.3088 3.17096 8.48352 3.04833 8.6152L1.58154 10.0834C0.908042 10.7551 0.571289 11.417 0.571289 12.0691C0.571289 12.7213 0.912332 13.3844 1.59439 14.0585L3.06118 15.5267C3.18346 15.6586 3.24928 15.8332 3.24453 16.0131V18.0887Z" fill="#4C82FB"/>
<path d="M3.24453 18.0887C3.24331 19.0467 3.47372 19.7558 3.93576 20.2158C4.39658 20.6771 5.09574 20.904 6.03326 20.8967H8.11975C8.20693 20.8934 8.29386 20.9079 8.37521 20.9395C8.45656 20.9711 8.53062 21.019 8.5928 21.0802L10.0779 22.5484C10.7527 23.2226 11.4139 23.5578 12.0617 23.5541C12.7096 23.5504 13.3709 23.2152 14.0456 22.5484L15.5124 21.0802C15.5767 21.0182 15.6529 20.97 15.7365 20.9385C15.82 20.9069 15.9091 20.8927 15.9982 20.8967H18.0719C19.0192 20.8979 19.7251 20.6673 20.1896 20.2048C20.6541 19.7423 20.8864 19.0333 20.8864 18.0777V16.0021C20.8816 15.8222 20.9474 15.6476 21.0697 15.5157L22.5365 14.0475C23.2198 13.3758 23.559 12.7145 23.5541 12.0636C23.5492 11.4127 23.21 10.7508 22.5365 10.0779L21.0697 8.6097C20.9471 8.47802 20.8812 8.30329 20.8864 8.12336V6.04769C20.8851 5.09092 20.6547 4.3819 20.1951 3.92064C19.7355 3.45939 19.0278 3.22875 18.0719 3.22875H15.9982C15.9091 3.23242 15.8201 3.21807 15.7366 3.18653C15.6532 3.155 15.5769 3.10694 15.5124 3.04523L14.0456 1.57703C13.3709 0.902883 12.7096 0.567648 12.0617 0.571319C11.4139 0.574989 10.7527 0.910224 10.0779 1.57703L8.5928 3.04523C8.53043 3.10622 8.45638 3.15393 8.37508 3.18547C8.29377 3.21701 8.20689 3.23173 8.11975 3.22875H6.03326C5.08718 3.22998 4.38373 3.45877 3.92291 3.91513C3.4621 4.3715 3.23168 5.08235 3.23168 6.04769V8.12887C3.23683 8.3088 3.17096 8.48352 3.04833 8.6152L1.58154 10.0834C0.908042 10.7551 0.571289 11.417 0.571289 12.0691C0.571289 12.7213 0.912332 13.3844 1.59439 14.0585L3.06118 15.5267C3.18346 15.6586 3.24928 15.8332 3.24453 16.0131V18.0887Z" fill="currentColor"/>
<path d="M11.996 15.9909C11.7795 16.3208 11.4599 16.5064 11.0887 16.5064C10.7072 16.5064 10.4083 16.3517 10.1299 15.9909L7.69677 13.0216C7.5215 12.8051 7.42871 12.5783 7.42871 12.3309C7.42871 11.8154 7.82049 11.4133 8.32567 11.4133C8.63497 11.4133 8.8824 11.5267 9.12984 11.8463L11.0475 14.2897L15.1199 7.75329C15.3364 7.40275 15.6147 7.23779 15.924 7.23779C16.4086 7.23779 16.8622 7.57802 16.8622 8.0832C16.8622 8.32033 16.7385 8.56777 16.6045 8.78427L11.996 15.9909Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#99A1BD" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 300 B

View File

@@ -1,64 +0,0 @@
import { Trans } from '@lingui/macro'
import useCopyClipboard from 'hooks/useCopyClipboard'
import React, { useCallback } from 'react'
import { CheckCircle, Copy } from 'react-feather'
import styled from 'styled-components/macro'
import { LinkStyledButton } from 'theme'
const CopyIcon = styled(LinkStyledButton)`
color: ${({ color, theme }) => color || theme.accentAction};
flex-shrink: 0;
display: flex;
text-decoration: none;
:hover,
:active,
:focus {
text-decoration: none;
color: ${({ color, theme }) => color || theme.accentAction};
}
`
const StyledText = styled.span`
margin-left: 0.25rem;
${({ theme }) => theme.flexRowNoWrap};
align-items: center;
`
const Copied = ({ iconSize }: { iconSize?: number }) => (
<StyledText>
<CheckCircle size={iconSize ?? '16'} />
<StyledText>
<Trans>Copied</Trans>
</StyledText>
</StyledText>
)
const Icon = ({ iconSize }: { iconSize?: number }) => (
<StyledText>
<Copy size={iconSize ?? '16'} />
</StyledText>
)
interface BaseProps {
toCopy: string
color?: string
iconSize?: number
iconPosition?: 'left' | 'right'
}
export type CopyHelperProps = BaseProps & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof BaseProps>
export default function CopyHelper({ color, toCopy, children, iconSize, iconPosition }: CopyHelperProps) {
const [isCopied, setCopied] = useCopyClipboard()
const copy = useCallback(() => {
setCopied(toCopy)
}, [toCopy, setCopied])
return (
<CopyIcon onClick={copy} color={color}>
{iconPosition === 'left' ? isCopied ? <Copied iconSize={iconSize} /> : <Icon iconSize={iconSize} /> : null}
{iconPosition === 'left' && <>&nbsp;</>}
{isCopied ? '' : children}
{iconPosition === 'right' && <>&nbsp;</>}
{iconPosition === 'right' ? isCopied ? <Copied iconSize={iconSize} /> : <Icon iconSize={iconSize} /> : null}
</CopyIcon>
)
}

View File

@@ -27,12 +27,12 @@ const TransactionState = styled(ExternalLink)<{ pending: boolean; success?: bool
padding: 0.25rem 0rem;
font-weight: 500;
font-size: 0.825rem;
color: ${({ theme }) => theme.deprecated_primary1};
color: ${({ theme }) => theme.accentAction};
`
const IconWrapper = styled.div<{ pending: boolean; success?: boolean }>`
color: ${({ pending, success, theme }) =>
pending ? theme.deprecated_primary1 : success ? theme.deprecated_green1 : theme.deprecated_red1};
pending ? theme.accentAction : success ? theme.accentSuccess : theme.accentFailure};
`
export default function Transaction({ hash }: { hash: string }) {

View File

@@ -75,7 +75,7 @@ function ClaimSummary({ info: { recipient, uniAmountRaw } }: { info: ClaimTransa
const { ENSName } = useENSName()
return typeof uniAmountRaw === 'string' ? (
<Trans>
Claim <FormattedCurrencyAmount rawAmount={uniAmountRaw} symbol={'UNI'} decimals={18} sigFigs={4} /> for{' '}
Claim <FormattedCurrencyAmount rawAmount={uniAmountRaw} symbol="UNI" decimals={18} sigFigs={4} /> for{' '}
{ENSName ?? recipient}
</Trans>
) : (

View File

@@ -1,19 +1,18 @@
import { Trans } from '@lingui/macro'
import { useWeb3React } from '@web3-react/core'
import CopyHelper from 'components/AccountDetails/Copy'
import { getConnection, getConnectionName, getIsCoinbaseWallet, getIsMetaMask } from 'connection/utils'
import { Context, useCallback, useContext } from 'react'
import { useCallback } from 'react'
import { ExternalLink as LinkIcon } from 'react-feather'
import { useAppDispatch } from 'state/hooks'
import { updateSelectedWallet } from 'state/user/reducer'
import { removeConnectedWallet } from 'state/wallets/reducer'
import { DefaultTheme } from 'styled-components/macro'
import styled, { ThemeContext } from 'styled-components/macro'
import styled, { useTheme } from 'styled-components/macro'
import { flexColumnNoWrap, flexRowNoWrap } from 'theme/styles'
import { isMobile } from 'utils/userAgent'
import { ReactComponent as Close } from '../../assets/images/x.svg'
import { clearAllTransactions } from '../../state/transactions/reducer'
import { ExternalLink, LinkStyledButton, ThemedText } from '../../theme'
import { CopyHelper, ExternalLink, LinkStyledButton, ThemedText } from '../../theme'
import { shortenAddress } from '../../utils'
import { ExplorerDataType, getExplorerLink } from '../../utils/getExplorerLink'
import { ButtonSecondary } from '../Button'
@@ -22,11 +21,11 @@ import { AutoRow } from '../Row'
import Transaction from './Transaction'
const HeaderRow = styled.div`
${({ theme }) => theme.flexRowNoWrap};
${flexRowNoWrap};
padding: 1rem 1rem;
font-weight: 500;
color: ${(props) => (props.color === 'blue' ? ({ theme }) => theme.deprecated_primary1 : 'inherit')};
${({ theme }) => theme.mediaWidth.upToMedium`
color: ${(props) => (props.color === 'blue' ? ({ theme }) => theme.accentAction : 'inherit')};
${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`
padding: 1rem;
`};
`
@@ -62,21 +61,21 @@ const InfoCard = styled.div`
`
const AccountGroupingRow = styled.div`
${({ theme }) => theme.flexRowNoWrap};
${flexColumnNoWrap};
justify-content: space-between;
align-items: center;
font-weight: 400;
color: ${({ theme }) => theme.deprecated_text1};
color: ${({ theme }) => theme.textPrimary};
div {
${({ theme }) => theme.flexRowNoWrap}
${flexColumnNoWrap};
align-items: center;
}
`
const AccountSection = styled.div`
padding: 0rem 1rem;
${({ theme }) => theme.mediaWidth.upToMedium`padding: 0rem 1rem 1.5rem 1rem;`};
${({ theme }) => theme.deprecated_mediaWidth.deprecated_upToMedium`padding: 0rem 1rem 1.5rem 1rem;`};
`
const YourAccount = styled.div`
@@ -92,18 +91,18 @@ const YourAccount = styled.div`
`
const LowerSection = styled.div`
${({ theme }) => theme.flexColumnNoWrap}
${flexColumnNoWrap};
padding: 1.5rem;
flex-grow: 1;
overflow: auto;
background-color: ${({ theme }) => theme.deprecated_bg2};
background-color: ${({ theme }) => theme.backgroundInteractive};
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;
h5 {
margin: 0;
font-weight: 400;
color: ${({ theme }) => theme.deprecated_text3};
color: ${({ theme }) => theme.textTertiary};
}
`
@@ -129,14 +128,15 @@ const AccountControl = styled.div`
}
`
const AddressLink = styled(ExternalLink)<{ hasENS: boolean; isENS: boolean }>`
font-size: 0.825rem;
color: ${({ theme }) => theme.deprecated_text3};
const AddressLink = styled(ExternalLink)`
color: ${({ theme }) => theme.textTertiary};
margin-left: 1rem;
font-size: 0.825rem;
display: flex;
gap: 6px;
text-decoration: none !important;
:hover {
color: ${({ theme }) => theme.deprecated_text2};
color: ${({ theme }) => theme.textSecondary};
}
`
@@ -146,7 +146,7 @@ const CloseIcon = styled.div`
top: 14px;
&:hover {
cursor: pointer;
opacity: 0.6;
opacity: ${({ theme }) => theme.opacity.hover};
}
`
@@ -160,11 +160,11 @@ const WalletName = styled.div`
width: initial;
font-size: 0.825rem;
font-weight: 500;
color: ${({ theme }) => theme.deprecated_text3};
color: ${({ theme }) => theme.textTertiary};
`
const TransactionListWrapper = styled.div`
${({ theme }) => theme.flexColumnNoWrap};
${flexColumnNoWrap};
`
const WalletAction = styled(ButtonSecondary)`
@@ -207,7 +207,7 @@ export default function AccountDetails({
const { chainId, account, connector } = useWeb3React()
const connectionType = getConnection(connector).type
const theme = useContext(ThemeContext as Context<DefaultTheme>)
const theme = useTheme()
const dispatch = useAppDispatch()
const isMetaMask = getIsMetaMask()
@@ -281,59 +281,21 @@ export default function AccountDetails({
</AccountControl>
</AccountGroupingRow>
<AccountGroupingRow>
{ENSName ? (
<>
<AccountControl>
<div>
{account && (
<CopyHelper toCopy={account} iconPosition="left">
<span style={{ marginLeft: '4px' }}>
<Trans>Copy Address</Trans>
</span>
</CopyHelper>
)}
{chainId && account && (
<AddressLink
hasENS={!!ENSName}
isENS={true}
href={getExplorerLink(chainId, ENSName, ExplorerDataType.ADDRESS)}
>
<LinkIcon size={16} />
<span style={{ marginLeft: '4px' }}>
<Trans>View on Explorer</Trans>
</span>
</AddressLink>
)}
</div>
</AccountControl>
</>
) : (
<>
<AccountControl>
<div>
{account && (
<CopyHelper toCopy={account} iconPosition="left">
<span style={{ marginLeft: '4px' }}>
<Trans>Copy Address</Trans>
</span>
</CopyHelper>
)}
{chainId && account && (
<AddressLink
hasENS={!!ENSName}
isENS={false}
href={getExplorerLink(chainId, account, ExplorerDataType.ADDRESS)}
>
<LinkIcon size={16} />
<span style={{ marginLeft: '4px' }}>
<Trans>View on Explorer</Trans>
</span>
</AddressLink>
)}
</div>
</AccountControl>
</>
)}
<AccountControl>
<div>
{account && (
<CopyHelper toCopy={account} gap={6} iconSize={16} fontSize={14}>
<Trans>Copy Address</Trans>
</CopyHelper>
)}
{chainId && account && (
<AddressLink href={getExplorerLink(chainId, ENSName ?? account, ExplorerDataType.ADDRESS)}>
<LinkIcon size={16} />
<Trans>View on Explorer</Trans>
</AddressLink>
)}
</div>
</AccountControl>
</AccountGroupingRow>
</InfoCard>
</YourAccount>
@@ -341,7 +303,7 @@ export default function AccountDetails({
</UpperSection>
{!!pendingTransactions.length || !!confirmedTransactions.length ? (
<LowerSection>
<AutoRow mb={'1rem'} style={{ justifyContent: 'space-between' }}>
<AutoRow mb="1rem" style={{ justifyContent: 'space-between' }}>
<ThemedText.DeprecatedBody>
<Trans>Recent Transactions</Trans>
</ThemedText.DeprecatedBody>
@@ -354,7 +316,7 @@ export default function AccountDetails({
</LowerSection>
) : (
<LowerSection>
<ThemedText.DeprecatedBody color={theme.deprecated_text1}>
<ThemedText.DeprecatedBody color={theme.textPrimary}>
<Trans>Your transactions will appear here...</Trans>
</ThemedText.DeprecatedBody>
</LowerSection>

View File

@@ -0,0 +1,88 @@
import { useWeb3React } from '@web3-react/core'
import { UNI_ADDRESS } from 'constants/addresses'
import { TransactionInfo, TransactionType } from 'state/transactions/types'
import styled, { css } from 'styled-components/macro'
import { nativeOnChain } from '../../constants/tokens'
import { useCurrency } from '../../hooks/Tokens'
import CurrencyLogo from '../Logo/CurrencyLogo'
const CurrencyWrap = styled.div`
position: relative;
width: 36px;
height: 36px;
`
const CurrencyWrapStyles = css`
position: absolute;
height: 24px;
`
const CurrencyLogoWrap = styled.span<{ isCentered: boolean }>`
${CurrencyWrapStyles};
left: ${({ isCentered }) => (isCentered ? '50%' : '0')};
top: ${({ isCentered }) => (isCentered ? '50%' : '0')};
transform: ${({ isCentered }) => isCentered && 'translate(-50%, -50%)'};
`
const CurrencyLogoWrapTwo = styled.span`
${CurrencyWrapStyles};
bottom: 0px;
right: 0px;
`
interface CurrencyPair {
currencyId0: string | undefined
currencyId1: string | undefined
}
const getCurrency = ({ info, chainId }: { info: TransactionInfo; chainId: number | undefined }): CurrencyPair => {
switch (info.type) {
case TransactionType.ADD_LIQUIDITY_V3_POOL:
case TransactionType.REMOVE_LIQUIDITY_V3:
case TransactionType.CREATE_V3_POOL:
const { baseCurrencyId, quoteCurrencyId } = info
return { currencyId0: baseCurrencyId, currencyId1: quoteCurrencyId }
case TransactionType.SWAP:
const { inputCurrencyId, outputCurrencyId } = info
return { currencyId0: inputCurrencyId, currencyId1: outputCurrencyId }
case TransactionType.WRAP:
const { unwrapped } = info
const native = info.chainId ? nativeOnChain(info.chainId) : undefined
const base = 'ETH'
const wrappedCurrency = native?.wrapped.address ?? 'WETH'
return { currencyId0: unwrapped ? wrappedCurrency : base, currencyId1: unwrapped ? base : wrappedCurrency }
case TransactionType.COLLECT_FEES:
const { currencyId0, currencyId1 } = info
return { currencyId0, currencyId1 }
case TransactionType.APPROVAL:
return { currencyId0: info.tokenAddress, currencyId1: undefined }
case TransactionType.CLAIM:
const uniAddress = chainId ? UNI_ADDRESS[chainId] : undefined
return { currencyId0: uniAddress, currencyId1: undefined }
default:
return { currencyId0: undefined, currencyId1: undefined }
}
}
const LogoView = ({ info }: { info: TransactionInfo }) => {
const { chainId } = useWeb3React()
const { currencyId0, currencyId1 } = getCurrency({ info, chainId })
const currency0 = useCurrency(currencyId0)
const currency1 = useCurrency(currencyId1)
const isCentered = !(currency0 && currency1)
return (
<CurrencyWrap>
<CurrencyLogoWrap isCentered={isCentered}>
<CurrencyLogo size="24px" currency={currency0} />
</CurrencyLogoWrap>
{!isCentered && (
<CurrencyLogoWrapTwo>
<CurrencyLogo size="24px" currency={currency1} />
</CurrencyLogoWrapTwo>
)}
</CurrencyWrap>
)
}
export default LogoView

View File

@@ -0,0 +1,336 @@
import { Trans } from '@lingui/macro'
import { Fraction, TradeType } from '@uniswap/sdk-core'
import JSBI from 'jsbi'
import {
AddLiquidityV3PoolTransactionInfo,
ApproveTransactionInfo,
ClaimTransactionInfo,
CollectFeesTransactionInfo,
ExactInputSwapTransactionInfo,
ExactOutputSwapTransactionInfo,
RemoveLiquidityV3TransactionInfo,
TransactionInfo,
TransactionType,
WrapTransactionInfo,
} from 'state/transactions/types'
import styled from 'styled-components/macro'
import { nativeOnChain } from '../../constants/tokens'
import { useCurrency, useToken } from '../../hooks/Tokens'
import useENSName from '../../hooks/useENSName'
import { shortenAddress } from '../../utils'
import { TransactionState } from './index'
const HighlightText = styled.span`
color: ${({ theme }) => theme.textPrimary};
font-weight: 600;
`
const BodyWrap = styled.div`
line-height: 20px;
`
interface ActionProps {
pending: JSX.Element
success: JSX.Element
failed: JSX.Element
transactionState: TransactionState
}
const Action = ({ pending, success, failed, transactionState }: ActionProps) => {
switch (transactionState) {
case TransactionState.Failed:
return failed
case TransactionState.Success:
return success
default:
return pending
}
}
const formatAmount = (amountRaw: string, decimals: number, sigFigs: number): string =>
new Fraction(amountRaw, JSBI.exponentiate(JSBI.BigInt(10), JSBI.BigInt(decimals))).toSignificant(sigFigs)
const FailedText = ({ transactionState }: { transactionState: TransactionState }) =>
transactionState === TransactionState.Failed ? <Trans>failed</Trans> : <span />
const FormattedCurrencyAmount = ({
rawAmount,
currencyId,
}: {
rawAmount: string
currencyId: string
sigFigs: number
}) => {
const currency = useCurrency(currencyId)
return currency ? (
<HighlightText>
{formatAmount(rawAmount, currency.decimals, /* sigFigs= */ 6)} {currency.symbol}
</HighlightText>
) : null
}
const getRawAmounts = (
info: ExactInputSwapTransactionInfo | ExactOutputSwapTransactionInfo
): { rawAmountFrom: string; rawAmountTo: string } => {
return info.tradeType === TradeType.EXACT_INPUT
? { rawAmountFrom: info.inputCurrencyAmountRaw, rawAmountTo: info.expectedOutputCurrencyAmountRaw }
: { rawAmountFrom: info.expectedInputCurrencyAmountRaw, rawAmountTo: info.outputCurrencyAmountRaw }
}
const SwapSummary = ({
info,
transactionState,
}: {
info: ExactInputSwapTransactionInfo | ExactOutputSwapTransactionInfo
transactionState: TransactionState
}) => {
const actionProps = {
transactionState,
pending: <Trans>Swapping</Trans>,
success: <Trans>Swapped</Trans>,
failed: <Trans>Swap</Trans>,
}
const { rawAmountFrom, rawAmountTo } = getRawAmounts(info)
return (
<BodyWrap>
<Action {...actionProps} />{' '}
<FormattedCurrencyAmount rawAmount={rawAmountFrom} currencyId={info.inputCurrencyId} sigFigs={2} />{' '}
<Trans>for </Trans>{' '}
<FormattedCurrencyAmount rawAmount={rawAmountTo} currencyId={info.outputCurrencyId} sigFigs={2} />{' '}
<FailedText transactionState={transactionState} />
</BodyWrap>
)
}
const AddLiquidityV3PoolSummary = ({
info,
transactionState,
}: {
info: AddLiquidityV3PoolTransactionInfo
transactionState: TransactionState
}) => {
const { createPool, quoteCurrencyId, baseCurrencyId } = info
const actionProps = {
transactionState,
pending: <Trans>Adding</Trans>,
success: <Trans>Added</Trans>,
failed: <Trans>Add</Trans>,
}
return (
<BodyWrap>
{createPool ? (
<CreateV3PoolSummary info={info} transactionState={transactionState} />
) : (
<>
<Action {...actionProps} />{' '}
<FormattedCurrencyAmount rawAmount={info.expectedAmountBaseRaw} currencyId={baseCurrencyId} sigFigs={2} />{' '}
<Trans>and</Trans>{' '}
<FormattedCurrencyAmount rawAmount={info.expectedAmountQuoteRaw} currencyId={quoteCurrencyId} sigFigs={2} />
</>
)}{' '}
<FailedText transactionState={transactionState} />
</BodyWrap>
)
}
const RemoveLiquidityV3Summary = ({
info: { baseCurrencyId, quoteCurrencyId, expectedAmountBaseRaw, expectedAmountQuoteRaw },
transactionState,
}: {
info: RemoveLiquidityV3TransactionInfo
transactionState: TransactionState
}) => {
const actionProps = {
transactionState,
pending: <Trans>Removing</Trans>,
success: <Trans>Removed</Trans>,
failed: <Trans>Remove</Trans>,
}
return (
<BodyWrap>
<Action {...actionProps} />{' '}
<FormattedCurrencyAmount rawAmount={expectedAmountBaseRaw} currencyId={baseCurrencyId} sigFigs={2} />{' '}
<Trans>and</Trans>{' '}
<FormattedCurrencyAmount rawAmount={expectedAmountQuoteRaw} currencyId={quoteCurrencyId} sigFigs={2} />{' '}
<FailedText transactionState={transactionState} />
</BodyWrap>
)
}
const CreateV3PoolSummary = ({
info: { baseCurrencyId, quoteCurrencyId },
transactionState,
}: {
info: AddLiquidityV3PoolTransactionInfo
transactionState: TransactionState
}) => {
const baseCurrency = useCurrency(baseCurrencyId)
const quoteCurrency = useCurrency(quoteCurrencyId)
const actionProps = {
transactionState,
pending: <Trans>Creating</Trans>,
success: <Trans>Created</Trans>,
failed: <Trans>Create</Trans>,
}
return (
<BodyWrap>
<Action {...actionProps} />{' '}
<HighlightText>
{baseCurrency?.symbol}/{quoteCurrency?.symbol}{' '}
</HighlightText>
<Trans>Pool</Trans> <FailedText transactionState={transactionState} />
</BodyWrap>
)
}
const CollectFeesSummary = ({
info,
transactionState,
}: {
info: CollectFeesTransactionInfo
transactionState: TransactionState
}) => {
const { currencyId0, expectedCurrencyOwed0 = '0', expectedCurrencyOwed1 = '0', currencyId1 } = info
const actionProps = {
transactionState,
pending: <Trans>Collecting</Trans>,
success: <Trans>Collected</Trans>,
failed: <Trans>Collect</Trans>,
}
return (
<BodyWrap>
<Action {...actionProps} />{' '}
<FormattedCurrencyAmount rawAmount={expectedCurrencyOwed0} currencyId={currencyId0} sigFigs={2} />{' '}
<Trans>and</Trans>{' '}
<FormattedCurrencyAmount rawAmount={expectedCurrencyOwed1} currencyId={currencyId1} sigFigs={2} />{' '}
<Trans>fees</Trans> <FailedText transactionState={transactionState} />
</BodyWrap>
)
}
const ApprovalSummary = ({
info,
transactionState,
}: {
info: ApproveTransactionInfo
transactionState: TransactionState
}) => {
const token = useToken(info.tokenAddress)
const actionProps = {
transactionState,
pending: <Trans>Approving</Trans>,
success: <Trans>Approved</Trans>,
failed: <Trans>Approve</Trans>,
}
return (
<BodyWrap>
<Action {...actionProps} /> <HighlightText>{token?.symbol}</HighlightText>{' '}
<FailedText transactionState={transactionState} />
</BodyWrap>
)
}
const ClaimSummary = ({
info: { recipient, uniAmountRaw },
transactionState,
}: {
info: ClaimTransactionInfo
transactionState: TransactionState
}) => {
const { ENSName } = useENSName()
const actionProps = {
transactionState,
pending: <Trans>Claiming</Trans>,
success: <Trans>Claimed</Trans>,
failed: <Trans>Claim</Trans>,
}
return (
<BodyWrap>
{uniAmountRaw && (
<>
<Action {...actionProps} />{' '}
<HighlightText>
{formatAmount(uniAmountRaw, 18, 4)}
UNI{' '}
</HighlightText>{' '}
<Trans>for</Trans> <HighlightText>{ENSName ?? shortenAddress(recipient)}</HighlightText>
</>
)}{' '}
<FailedText transactionState={transactionState} />
</BodyWrap>
)
}
const WrapSummary = ({
info: { chainId, currencyAmountRaw, unwrapped },
transactionState,
}: {
info: WrapTransactionInfo
transactionState: TransactionState
}) => {
const native = chainId ? nativeOnChain(chainId) : undefined
const from = unwrapped ? native?.wrapped.symbol ?? 'WETH' : native?.symbol ?? 'ETH'
const to = unwrapped ? native?.symbol ?? 'ETH' : native?.wrapped.symbol ?? 'WETH'
const amount = formatAmount(currencyAmountRaw, 18, 6)
const actionProps = unwrapped
? {
transactionState,
pending: <Trans>Unwrapping</Trans>,
success: <Trans>Unwrapped</Trans>,
failed: <Trans>Unwrap</Trans>,
}
: {
transactionState,
pending: <Trans>Wrapping</Trans>,
success: <Trans>Wrapped</Trans>,
failed: <Trans>Wrap</Trans>,
}
return (
<BodyWrap>
<Action {...actionProps} />{' '}
<HighlightText>
{amount} {from}
</HighlightText>{' '}
<Trans>to</Trans>{' '}
<HighlightText>
{amount} {to}
</HighlightText>{' '}
<FailedText transactionState={transactionState} />
</BodyWrap>
)
}
const TransactionBody = ({ info, transactionState }: { info: TransactionInfo; transactionState: TransactionState }) => {
switch (info.type) {
case TransactionType.SWAP:
return <SwapSummary info={info} transactionState={transactionState} />
case TransactionType.ADD_LIQUIDITY_V3_POOL:
return <AddLiquidityV3PoolSummary info={info} transactionState={transactionState} />
case TransactionType.REMOVE_LIQUIDITY_V3:
return <RemoveLiquidityV3Summary info={info} transactionState={transactionState} />
case TransactionType.WRAP:
return <WrapSummary info={info} transactionState={transactionState} />
case TransactionType.COLLECT_FEES:
return <CollectFeesSummary info={info} transactionState={transactionState} />
case TransactionType.APPROVAL:
return <ApprovalSummary info={info} transactionState={transactionState} />
case TransactionType.CLAIM:
return <ClaimSummary info={info} transactionState={transactionState} />
default:
return <span />
}
}
export default TransactionBody

View File

@@ -0,0 +1,98 @@
import { useWeb3React } from '@web3-react/core'
import { getChainInfoOrDefault } from 'constants/chainInfo'
import { SupportedChainId } from 'constants/chains'
import { useMemo } from 'react'
import { AlertTriangle, CheckCircle } from 'react-feather'
import styled from 'styled-components/macro'
import { ExternalLink } from 'theme'
import { colors } from 'theme/colors'
import { TransactionDetails } from '../../state/transactions/types'
import Loader from '../Loader'
import LogoView from './LogoView'
import TransactionBody from './TransactionBody'
export enum TransactionState {
Pending,
Success,
Failed,
}
const Grid = styled(ExternalLink)<{ isLastTransactionInList?: boolean }>`
cursor: pointer;
display: grid;
grid-template-columns: 44px auto 24px;
width: 100%;
text-decoration: none;
border-bottom: ${({ theme, isLastTransactionInList }) =>
isLastTransactionInList ? 'none' : `1px solid ${theme.backgroundOutline}`};
padding: 12px;
&:hover {
background-color: ${({ theme }) => theme.backgroundModule};
transition: 250ms background-color ease;
}
`
const TextContainer = styled.span`
font-size: 14px;
margin-top: auto;
margin-bottom: auto;
color: ${({ theme }) => theme.textTertiary};
`
const IconStyleWrap = styled.span`
margin-top: auto;
margin-bottom: auto;
margin-left: auto;
height: 16px;
`
export const TransactionSummary = ({
transactionDetails,
isLastTransactionInList = false,
}: {
transactionDetails: TransactionDetails
isLastTransactionInList?: boolean
}) => {
const { chainId = 1 } = useWeb3React()
const tx = transactionDetails
const { explorer } = getChainInfoOrDefault(chainId ? chainId : SupportedChainId.MAINNET)
const { info, receipt, hash } = tx
const transactionState = useMemo(() => {
const pending = !receipt
const success = !pending && tx && (receipt?.status === 1 || typeof receipt?.status === 'undefined')
const transactionState = pending
? TransactionState.Pending
: success
? TransactionState.Success
: TransactionState.Failed
return transactionState
}, [receipt, tx])
const link = `${explorer}tx/${hash}`
return chainId ? (
<Grid href={link} target="_blank" isLastTransactionInList={isLastTransactionInList}>
<LogoView info={info} />
<TextContainer as="span">
<TransactionBody info={info} transactionState={transactionState} />
</TextContainer>
{transactionState === TransactionState.Pending ? (
<IconStyleWrap>
<Loader />
</IconStyleWrap>
) : transactionState === TransactionState.Success ? (
<IconStyleWrap>
<CheckCircle color={colors.green200} size="16px" />
</IconStyleWrap>
) : (
<IconStyleWrap>
<AlertTriangle color={colors.gold200} size="16px" />
</IconStyleWrap>
)}
</Grid>
) : null
}

View File

@@ -2,8 +2,9 @@ import { Trans } from '@lingui/macro'
// eslint-disable-next-line no-restricted-imports
import { t } from '@lingui/macro'
import { useWeb3React } from '@web3-react/core'
import { ChangeEvent, Context, ReactNode, useCallback, useContext } from 'react'
import styled, { DefaultTheme, ThemeContext } from 'styled-components/macro'
import { ChangeEvent, ReactNode, useCallback } from 'react'
import styled, { useTheme } from 'styled-components/macro'
import { flexColumnNoWrap } from 'theme/styles'
import useENS from '../../hooks/useENS'
import { ExternalLink, ThemedText } from '../../theme'
@@ -12,7 +13,7 @@ import { AutoColumn } from '../Column'
import { RowBetween } from '../Row'
const InputPanel = styled.div`
${({ theme }) => theme.flexColumnNoWrap}
${flexColumnNoWrap};
position: relative;
border-radius: 1.25rem;
background-color: ${({ theme }) => theme.deprecated_bg1};
@@ -25,7 +26,7 @@ const ContainerRow = styled.div<{ error: boolean }>`
justify-content: center;
align-items: center;
border-radius: 1.25rem;
border: 1px solid ${({ error, theme }) => (error ? theme.deprecated_red1 : theme.deprecated_bg2)};
border: 1px solid ${({ error, theme }) => (error ? theme.accentFailure : theme.backgroundInteractive)};
transition: border-color 300ms ${({ error }) => (error ? 'step-end' : 'step-start')},
color 500ms ${({ error }) => (error ? 'step-end' : 'step-start')};
background-color: ${({ theme }) => theme.deprecated_bg1};
@@ -44,7 +45,7 @@ const Input = styled.input<{ error?: boolean }>`
width: 0;
background-color: ${({ theme }) => theme.deprecated_bg1};
transition: color 300ms ${({ error }) => (error ? 'step-end' : 'step-start')};
color: ${({ error, theme }) => (error ? theme.deprecated_red1 : theme.deprecated_text1)};
color: ${({ error, theme }) => (error ? theme.accentFailure : theme.textPrimary)};
overflow: hidden;
text-overflow: ellipsis;
font-weight: 500;
@@ -87,7 +88,7 @@ export default function AddressInputPanel({
onChange: (value: string) => void
}) {
const { chainId } = useWeb3React()
const theme = useContext(ThemeContext as Context<DefaultTheme>)
const theme = useTheme()
const { address, loading, name } = useENS(value)
@@ -108,7 +109,7 @@ export default function AddressInputPanel({
<InputContainer>
<AutoColumn gap="md">
<RowBetween>
<ThemedText.DeprecatedBlack color={theme.deprecated_text2} fontWeight={500} fontSize={14}>
<ThemedText.DeprecatedBlack color={theme.textSecondary} fontWeight={500} fontSize={14}>
{label ?? <Trans>Recipient</Trans>}
</ThemedText.DeprecatedBlack>
{address && chainId && (

View File

@@ -0,0 +1,335 @@
import { BigNumber } from '@ethersproject/bignumber'
import type { TransactionResponse } from '@ethersproject/providers'
import { useWeb3React } from '@web3-react/core'
import uniswapNftAirdropClaim from 'abis/uniswap-nft-airdrop-claim.json'
import airdropBackgroundv2 from 'assets/images/airdopBackground.png'
import { ButtonEmphasis, ButtonSize, ThemeButton } from 'components/Button'
import { OpacityHoverState } from 'components/Common'
import Loader from 'components/Loader'
import { UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS } from 'constants/addresses'
import { useContract } from 'hooks/useContract'
import { ChevronRightIcon } from 'nft/components/icons'
import { useIsNftClaimAvailable } from 'nft/hooks/useIsNftClaimAvailable'
import { CollectionRewardsFetcher } from 'nft/queries/genie/GetAirdorpMerkle'
import { Airdrop, Rewards } from 'nft/types/airdrop'
import { useEffect, useState } from 'react'
import { AlertTriangle } from 'react-feather'
import { useModalIsOpen, useToggleModal } from 'state/application/hooks'
import { ApplicationModal } from 'state/application/reducer'
import styled from 'styled-components/macro'
import { CloseIcon, ThemedText } from 'theme'
import Modal from '../Modal'
const ModalWrap = styled.div`
display: flex;
flex-direction: column;
`
const Body = styled.div`
padding: 28px 20px 20px 20px;
`
const ClaimButton = styled(ThemeButton)`
width: 100%;
background-color: ${({ theme }) => theme.accentAction};
border-radius: 12px;
color: ${({ theme }) => theme.white};
`
const Line = styled.div`
height: 1px;
width: 100%;
background-color: ${({ theme }) => theme.white};
opacity: 0.24;
margin-top: 12px;
margin-bottom: 12px;
`
const LinkWrap = styled.a`
text-decoration: none;
${OpacityHoverState}
`
const ImageContainer = styled.div`
position: relative;
width: 100%;
`
const StyledImage = styled.img`
width: 100%;
height: 170px;
`
const USDCLabel = styled.div`
font-weight: 700;
font-size: 36px;
line-height: 44px;
margin-top: 8px;
color: white;
`
const TextContainer = styled.div`
position: absolute;
left: 16px;
top: 16px;
right: 16px;
`
const RewardsDetailsContainer = styled.div`
display: flex;
width: 100%;
justify-content: space-between;
`
const CurrencyText = styled.span`
color: white;
font-weight: 500;
font-size: 12px;
line-height: 14.5px;
`
const ClaimContainer = styled.div`
display: flex;
flex-direction: column;
text-align: center;
height: 380px;
padding: 60px 28px;
padding-bottom: 20px;
`
const SuccessText = styled.div`
font-weight: 400;
font-size: 16px;
line-height: 24px;
margin-top: 24px;
margin-bottom: 8px;
`
const EtherscanLink = styled.a`
text-decoration: none;
${OpacityHoverState}
`
const CloseButton = styled(ThemeButton)`
max-width: 68px;
margin-top: auto;
margin-left: auto;
margin-right: auto;
`
const SyledCloseIcon = styled(CloseIcon)`
float: right;
height: 24px;
${OpacityHoverState}
`
const Error = styled.div`
display: flex;
color: ${({ theme }) => theme.accentCritical};
font-weight: 500;
line-height: 24px;
border-radius: 16px;
padding: 12px 20px;
font-size: 14px;
align-items: center;
gap: 12px;
`
const ReactLinkWrap = styled.div`
margin-bottom: 40px;
`
const RewardsText = styled.span`
font-size: 12px;
line-height: 16px;
color: ${({ theme }) => theme.white};
&:first-child {
margin-bottom: 8px;
}
`
const RewardsInformationText = styled.span`
display: inline-block;
font-size: 14px;
line-height: 20px;
color: ${({ theme }) => theme.textPrimary};
margin-bottom: 28px;
`
const MainHeader = styled.span`
font-weight: 600;
font-size: 16px;
line-height: 20px;
color: ${({ theme }) => theme.white};
`
const EtherscanLinkWrap = styled.div`
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
`
enum RewardAmounts {
tradingRewardAmount = 300,
holderRewardAmount = 1000,
combinedAmount = 1300,
}
const AirdropModal = () => {
const { account, provider } = useWeb3React()
const [claim, setClaim] = useState<Rewards>()
const [isClaimed, setIsClaimed] = useState(false)
const [hash, setHash] = useState('')
const [error, setError] = useState(false)
const setIsClaimAvailable = useIsNftClaimAvailable((state) => state.setIsClaimAvailable)
const [isSubmitting, setIsSubmitting] = useState(false)
const [totalAmount, setTotalAmount] = useState(0)
const isOpen = useModalIsOpen(ApplicationModal.UNISWAP_NFT_AIRDROP_CLAIM)
const usdcAirdropToggle = useToggleModal(ApplicationModal.UNISWAP_NFT_AIRDROP_CLAIM)
const contract = useContract(UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS, uniswapNftAirdropClaim)
const displayError = () => {
setIsSubmitting(false)
setError(true)
setTimeout(() => {
setError(false)
}, 5000)
}
useEffect(() => {
if (account && provider && contract) {
;(async () => {
try {
const { data } = await CollectionRewardsFetcher(account)
const claim = data.find((claim) => claim?.rewardType === Airdrop.GENIE_UNISWAP_USDC_AIRDROP)
if (!claim) return
const [isClaimed] = await contract.connect(provider).functions.isClaimed(claim?.index)
if (claim && isClaimed === false) {
const usdAmount = BigNumber.from(claim.amount).div(10 ** 6)
setClaim(claim)
setTotalAmount(usdAmount.toNumber())
setIsClaimAvailable(true)
}
} catch (err) {
displayError()
}
})()
}
}, [account, contract, provider, setIsClaimAvailable])
const makeClaim = async () => {
try {
if (contract && claim && claim.amount && claim.merkleProof && provider) {
setIsSubmitting(true)
const response: TransactionResponse = await contract
.connect(provider?.getSigner())
.functions.claim(claim.index, account, claim?.amount, claim?.merkleProof)
await response.wait()
setHash(response.hash)
setIsSubmitting(false)
setIsClaimed(true)
setIsClaimAvailable(false)
}
} catch (err) {
setIsSubmitting(false)
displayError()
}
}
return (
<>
<Modal hideBorder isOpen={isOpen} onDismiss={usdcAirdropToggle} maxHeight={90} maxWidth={400}>
<ModalWrap>
{isClaimed ? (
<ClaimContainer>
<ThemedText.HeadlineSmall>Congratulations!</ThemedText.HeadlineSmall>
<SuccessText>
You have successfully claimed {totalAmount} USDC. Thank you for supporting Genie.xyz.
</SuccessText>
<EtherscanLink href={`https://etherscan.io/tx/${hash}`} target="_blank">
<ThemedText.Link>
<EtherscanLinkWrap>
<span>Etherscan</span>
<ChevronRightIcon />
</EtherscanLinkWrap>
</ThemedText.Link>
</EtherscanLink>
<CloseButton size={ButtonSize.medium} emphasis={ButtonEmphasis.medium} onClick={usdcAirdropToggle}>
Close
</CloseButton>
</ClaimContainer>
) : (
<>
<ImageContainer>
<TextContainer>
<SyledCloseIcon onClick={usdcAirdropToggle} stroke="white" />
<MainHeader>Uniswap NFT Airdrop</MainHeader>
<USDCLabel>{totalAmount} USDC</USDCLabel>
<Line />
<RewardsDetailsContainer>
<RewardsText>Trading rewards</RewardsText>{' '}
<CurrencyText>
{totalAmount === RewardAmounts.tradingRewardAmount || totalAmount === RewardAmounts.combinedAmount
? `${RewardAmounts.tradingRewardAmount} USDC`
: '0'}
</CurrencyText>
</RewardsDetailsContainer>
<RewardsDetailsContainer>
<RewardsText>Genie NFT holder rewards</RewardsText>{' '}
<CurrencyText>
{totalAmount !== RewardAmounts.tradingRewardAmount
? `${RewardAmounts.holderRewardAmount} USDC`
: '0'}
</CurrencyText>
</RewardsDetailsContainer>
</TextContainer>
<StyledImage src={airdropBackgroundv2} />
</ImageContainer>
<Body>
<RewardsInformationText>
As a long time supporter of Genie, youve been awarded {totalAmount} USDC tokens.
</RewardsInformationText>
<ReactLinkWrap>
<LinkWrap href="https://uniswap.org/blog/uniswap-nft-aggregator-announcement" target="_blank">
<ThemedText.Link>Read more about Uniswap NFT.</ThemedText.Link>
</LinkWrap>
</ReactLinkWrap>
{error && (
<Error>
<AlertTriangle />
Claim USDC failed. Please try again later
</Error>
)}
<ClaimButton
onClick={makeClaim}
size={ButtonSize.medium}
emphasis={ButtonEmphasis.medium}
disabled={isSubmitting}
>
{isSubmitting && <Loader stroke="white" />}
<span>Claim{isSubmitting && 'ing'} USDC</span>
</ClaimButton>
</Body>
</>
)}
</ModalWrap>
</Modal>
</>
)
}
export default AirdropModal

View File

@@ -1,57 +0,0 @@
import { createContext, memo, PropsWithChildren, useContext, useEffect, useMemo } from 'react'
import { sendAnalyticsEvent } from '.'
import { ElementName, EventName, ModalName, PageName, SectionName } from './constants'
export interface ITraceContext {
// Highest order context: eg Swap or Explore.
page?: PageName
// Enclosed section name. For contexts with modals, refers to the
// section of the page from which the user triggered the modal.
section?: SectionName
modal?: ModalName
// Element name mostly used to identify events sources
// Does not need to be unique given the higher order page and section.
element?: ElementName
}
export const TraceContext = createContext<ITraceContext>({})
type TraceProps = {
shouldLogImpression?: boolean // whether to log impression on mount
name?: EventName
properties?: Record<string, unknown>
} & ITraceContext
/**
* Sends an analytics event on mount (if shouldLogImpression is set),
* and propagates the context to child traces.
*/
export const Trace = memo(
({ shouldLogImpression, name, children, page, section, element, properties }: PropsWithChildren<TraceProps>) => {
const parentTrace = useContext(TraceContext)
const combinedProps = useMemo(
() => ({
...parentTrace,
...Object.fromEntries(Object.entries({ page, section, element }).filter(([_, v]) => v !== undefined)),
}),
[element, parentTrace, page, section]
)
useEffect(() => {
if (shouldLogImpression) {
sendAnalyticsEvent(name ?? EventName.PAGE_VIEWED, { ...combinedProps, ...properties })
}
// Impressions should only be logged on mount.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
return <TraceContext.Provider value={combinedProps}>{children}</TraceContext.Provider>
}
)
Trace.displayName = 'Trace'

View File

@@ -1,75 +0,0 @@
import { Children, cloneElement, isValidElement, memo, PropsWithChildren, SyntheticEvent } from 'react'
import { sendAnalyticsEvent } from '.'
import { Event, EventName } from './constants'
import { ITraceContext, Trace, TraceContext } from './Trace'
type TraceEventProps = {
events: Event[]
name: EventName
properties?: Record<string, unknown>
shouldLogImpression?: boolean
} & ITraceContext
/**
* Analytics instrumentation component that wraps event callbacks with logging logic.
*
* @example
* <TraceEvent events={[Event.onClick]} element={ElementName.SWAP_BUTTON}>
* <Button onClick={() => console.log('clicked')}>Click me</Button>
* </TraceEvent>
*/
export const TraceEvent = memo((props: PropsWithChildren<TraceEventProps>) => {
const { shouldLogImpression, name, properties, events, children, ...traceProps } = props
return (
<Trace {...traceProps}>
<TraceContext.Consumer>
{(traceContext) =>
Children.map(children, (child) => {
if (!isValidElement(child)) {
return child
}
// For each child, augment event handlers defined in `events` with event tracing.
return cloneElement(
child,
getEventHandlers(child, traceContext, events, name, properties, shouldLogImpression)
)
})
}
</TraceContext.Consumer>
</Trace>
)
})
TraceEvent.displayName = 'TraceEvent'
/**
* Given a set of child element and event props, returns a spreadable
* object of the event handlers augmented with analytics logging.
*/
function getEventHandlers(
child: React.ReactElement,
traceContext: ITraceContext,
events: Event[],
name: EventName,
properties?: Record<string, unknown>,
shouldLogImpression = true
) {
const eventHandlers: Partial<Record<Event, (e: SyntheticEvent<Element, Event>) => void>> = {}
for (const event of events) {
eventHandlers[event] = (eventHandlerArgs: unknown) => {
// call child event handler with original arguments, must be in array
const args = Array.isArray(eventHandlerArgs) ? eventHandlerArgs : [eventHandlerArgs]
child.props[event]?.apply(child, args)
// augment handler with analytics logging
if (shouldLogImpression) sendAnalyticsEvent(name, { ...traceContext, ...properties, action: event })
}
}
// return a spreadable event handler object
return eventHandlers
}

View File

@@ -1,132 +0,0 @@
/**
* Event names that can occur in this application.
*
* Subject to change as new features are added and new events are defined
* and logged.
*/
export enum EventName {
APP_LOADED = 'Application Loaded',
APPROVE_TOKEN_TXN_SUBMITTED = 'Approve Token Transaction Submitted',
CONNECT_WALLET_BUTTON_CLICKED = 'Connect Wallet Button Clicked',
EXPLORE_TOKEN_ROW_CLICKED = 'Explore Token Row Clicked',
PAGE_VIEWED = 'Page Viewed',
SWAP_AUTOROUTER_VISUALIZATION_EXPANDED = 'Swap Autorouter Visualization Expanded',
SWAP_DETAILS_EXPANDED = 'Swap Details Expanded',
SWAP_MAX_TOKEN_AMOUNT_SELECTED = 'Swap Max Token Amount Selected',
SWAP_PRICE_UPDATE_ACKNOWLEDGED = 'Swap Price Update Acknowledged',
SWAP_QUOTE_RECEIVED = 'Swap Quote Received',
SWAP_SUBMITTED = 'Swap Submitted',
SWAP_TOKENS_REVERSED = 'Swap Tokens Reversed',
SWAP_TRANSACTION_COMPLETED = 'Swap Transaction Completed',
TOKEN_IMPORTED = 'Token Imported',
TOKEN_SELECTED = 'Token Selected',
TOKEN_SELECTOR_OPENED = 'Token Selector Opened',
WALLET_CONNECT_TXN_COMPLETED = 'Wallet Connect Transaction Completed',
WALLET_SELECTED = 'Wallet Selected',
WRAP_TOKEN_TXN_SUBMITTED = 'Wrap Token Transaction Submitted',
// alphabetize additional event names.
}
export enum CUSTOM_USER_PROPERTIES {
ALL_WALLET_ADDRESSES_CONNECTED = 'all_wallet_addresses_connected',
ALL_WALLET_CHAIN_IDS = 'all_wallet_chain_ids',
BROWSER = 'browser',
DARK_MODE = 'is_dark_mode',
EXPERT_MODE = 'is_expert_mode',
SCREEN_RESOLUTION_HEIGHT = 'screen_resolution_height',
SCREEN_RESOLUTION_WIDTH = 'screen_resolution_width',
WALLET_ADDRESS = 'wallet_address',
WALLET_NATIVE_CURRENCY_BALANCE_USD = 'wallet_native_currency_balance_usd',
WALLET_TOKENS_ADDRESSES = 'wallet_tokens_addresses',
WALLET_TOKENS_SYMBOLS = 'wallet_tokens_symbols',
WALLET_TYPE = 'wallet_type',
}
export enum CUSTOM_USER_PROPERTY_SUFFIXES {
WALLET_TOKEN_AMOUNT_SUFFIX = '_token_amount',
}
export enum BROWSER {
FIREFOX = 'Mozilla Firefox',
SAMSUNG = 'Samsung Internet',
OPERA = 'Opera',
INTERNET_EXPLORER = 'Microsoft Internet Explorer',
EDGE = 'Microsoft Edge (Legacy)',
EDGE_CHROMIUM = 'Microsoft Edge (Chromium)',
CHROME = 'Google Chrome or Chromium',
SAFARI = 'Apple Safari',
UNKNOWN = 'unknown',
}
export enum WALLET_CONNECTION_RESULT {
SUCCEEDED = 'Succeeded',
FAILED = 'Failed',
}
export const NATIVE_CHAIN_ID = 'NATIVE'
export enum SWAP_PRICE_UPDATE_USER_RESPONSE {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
}
/**
* Known pages in the app. Highest order context.
*/
export enum PageName {
EXPLORE_PAGE = 'explore-page',
POOL_PAGE = 'pool-page',
SWAP_PAGE = 'swap-page',
VOTE_PAGE = 'vote-page',
// alphabetize additional page names.
}
/**
* Sections. Disambiguates low-level elements that may share a name.
* eg a `back` button in a modal will have the same `element`,
* but a different `section`.
*/
export enum SectionName {
CURRENCY_INPUT_PANEL = 'swap-currency-input',
CURRENCY_OUTPUT_PANEL = 'swap-currency-output',
// alphabetize additional section names.
}
/** Known modals for analytics purposes. */
export enum ModalName {
CONFIRM_SWAP = 'confirm-swap-modal',
TOKEN_SELECTOR = 'token-selector-modal',
// alphabetize additional modal names.
}
/**
* Known element names for analytics purposes.
* Use to identify low-level components given a TraceContext
*/
export enum ElementName {
AUTOROUTER_VISUALIZATION_ROW = 'expandable-autorouter-visualization-row',
COMMON_BASES_CURRENCY_BUTTON = 'common-bases-currency-button',
CONFIRM_SWAP_BUTTON = 'confirm-swap-or-send',
CONNECT_WALLET_BUTTON = 'connect-wallet-button',
IMPORT_TOKEN_BUTTON = 'import-token-button',
MAX_TOKEN_AMOUNT_BUTTON = 'max-token-amount-button',
PRICE_UPDATE_ACCEPT_BUTTON = 'price-update-accept-button',
SWAP_BUTTON = 'swap-button',
SWAP_DETAILS_DROPDOWN = 'swap-details-dropdown',
SWAP_TOKENS_REVERSE_ARROW_BUTTON = 'swap-tokens-reverse-arrow-button',
TOKEN_SELECTOR_ROW = 'token-selector-row',
WALLET_TYPE_OPTION = 'wallet-type-option',
// alphabetize additional element names.
}
/**
* Known events that trigger callbacks.
* @example
* <TraceEvent events={[Event.onClick]} element={name}>
*/
export enum Event {
onClick = 'onClick',
onKeyPress = 'onKeyPress',
onSelect = 'onSelect',
// alphabetize additional events.
}

View File

@@ -1,92 +0,0 @@
import { Identify, identify, init, track } from '@amplitude/analytics-browser'
import { isDevelopmentEnv } from 'utils/env'
/**
* Initializes Amplitude with API key for project.
*
* Uniswap has two Amplitude projects: test and production. You must be a
* member of the organization on Amplitude to view details.
*/
export function initializeAnalytics() {
if (isDevelopmentEnv()) return
const API_KEY = process.env.REACT_APP_AMPLITUDE_KEY
if (typeof API_KEY === 'undefined') {
throw new Error(`REACT_APP_AMPLITUDE_KEY must be a defined environment variable`)
}
init(
API_KEY,
/* userId= */ undefined, // User ID should be undefined to let Amplitude default to Device ID
/* options= */ {
// See documentation: https://www.docs.developers.amplitude.com/data/sdks/javascript/#track-referrers
includeReferrer: true,
// See documentation: https://www.docs.developers.amplitude.com/data/sdks/javascript/#track-utm-parameters
includeUtm: true,
// Disable tracking of private user information by Amplitude
trackingOptions: {
ipAddress: false,
carrier: false,
city: false,
region: false,
dma: false, // designated market area
},
}
)
}
/** Sends an event to Amplitude. */
export function sendAnalyticsEvent(eventName: string, eventProperties?: Record<string, unknown>) {
if (isDevelopmentEnv()) {
console.log(`[amplitude(${eventName})]: ${JSON.stringify(eventProperties)}`)
return
}
track(eventName, eventProperties)
}
type Value = string | number | boolean | string[] | number[]
/**
* Class that exposes methods to mutate the User Model's properties in
* Amplitude that represents the current session's user.
*
* See https://help.amplitude.com/hc/en-us/articles/115002380567-User-properties-and-event-properties
* for details.
*/
class UserModel {
private log(method: string, ...parameters: unknown[]) {
console.debug(`[amplitude(Identify)]: ${method}(${parameters})`)
}
private call(mutate: (event: Identify) => Identify) {
if (isDevelopmentEnv()) {
const log = (_: Identify, method: string) => this.log.bind(this, method)
mutate(new Proxy(new Identify(), { get: log }))
return
}
identify(mutate(new Identify()))
}
set(key: string, value: Value) {
this.call((event) => event.set(key, value))
}
setOnce(key: string, value: Value) {
this.call((event) => event.setOnce(key, value))
}
add(key: string, value: number) {
this.call((event) => event.add(key, value))
}
postInsert(key: string, value: string | number) {
this.call((event) => event.postInsert(key, value))
}
remove(key: string, value: string | number) {
this.call((event) => event.remove(key, value))
}
}
export const user = new UserModel()

View File

@@ -1,23 +0,0 @@
import { Currency, CurrencyAmount, Percent, Token } from '@uniswap/sdk-core'
import { NATIVE_CHAIN_ID } from './constants'
export const getDurationUntilTimestampSeconds = (futureTimestampInSecondsSinceEpoch?: number): number | undefined => {
if (!futureTimestampInSecondsSinceEpoch) return undefined
return futureTimestampInSecondsSinceEpoch - new Date().getTime() / 1000
}
export const getDurationFromDateMilliseconds = (start: Date): number => {
return new Date().getTime() - start.getTime()
}
export const formatToDecimal = (
intialNumberObject: Percent | CurrencyAmount<Token | Currency>,
decimalPlace: number
): number => parseFloat(intialNumberObject.toFixed(decimalPlace))
export const getTokenAddress = (currency: Currency) => (currency.isNative ? NATIVE_CHAIN_ID : currency.address)
export const formatPercentInBasisPointsNumber = (percent: Percent): number => parseFloat(percent.toFixed(2)) * 100
export const formatPercentNumber = (percent: Percent): number => parseFloat(percent.toFixed(2))

View File

@@ -17,7 +17,7 @@ const BadgeText = styled.div`
`
const ActiveDot = styled.span`
background-color: ${({ theme }) => theme.deprecated_success};
background-color: ${({ theme }) => theme.accentSuccess};
border-radius: 50%;
height: 8px;
width: 8px;

View File

@@ -1,7 +1,6 @@
import { readableColor } from 'polished'
import { PropsWithChildren } from 'react'
import styled, { DefaultTheme } from 'styled-components/macro'
import { Color } from 'theme/styled'
export enum BadgeVariant {
DEFAULT = 'DEFAULT',
@@ -17,27 +16,27 @@ interface BadgeProps {
variant?: BadgeVariant
}
function pickBackgroundColor(variant: BadgeVariant | undefined, theme: DefaultTheme): Color {
function pickBackgroundColor(variant: BadgeVariant | undefined, theme: DefaultTheme): string {
switch (variant) {
case BadgeVariant.NEGATIVE:
return theme.deprecated_error
return theme.accentFailure
case BadgeVariant.POSITIVE:
return theme.deprecated_success
return theme.accentSuccess
case BadgeVariant.PRIMARY:
return theme.deprecated_primary1
return theme.accentAction
case BadgeVariant.WARNING:
return theme.deprecated_warning
return theme.accentWarning
case BadgeVariant.WARNING_OUTLINE:
return 'transparent'
default:
return theme.deprecated_bg2
return theme.backgroundInteractive
}
}
function pickBorder(variant: BadgeVariant | undefined, theme: DefaultTheme): string {
switch (variant) {
case BadgeVariant.WARNING_OUTLINE:
return `1px solid ${theme.deprecated_warning}`
return `1px solid ${theme.accentWarning}`
default:
return 'unset'
}
@@ -46,15 +45,15 @@ function pickBorder(variant: BadgeVariant | undefined, theme: DefaultTheme): str
function pickFontColor(variant: BadgeVariant | undefined, theme: DefaultTheme): string {
switch (variant) {
case BadgeVariant.NEGATIVE:
return readableColor(theme.deprecated_error)
return readableColor(theme.accentFailure)
case BadgeVariant.POSITIVE:
return readableColor(theme.deprecated_success)
return readableColor(theme.accentSuccess)
case BadgeVariant.WARNING:
return readableColor(theme.deprecated_warning)
return readableColor(theme.accentWarning)
case BadgeVariant.WARNING_OUTLINE:
return theme.deprecated_warning
return theme.accentWarning
default:
return readableColor(theme.deprecated_bg2)
return readableColor(theme.backgroundInteractive)
}
}

View File

@@ -1,51 +0,0 @@
import { Trans } from '@lingui/macro'
import { useWeb3React } from '@web3-react/core'
import { ReactNode, useMemo } from 'react'
const BLOCKED_ADDRESSES: string[] = [
'0x7Db418b5D567A4e0E8c59Ad71BE1FcE48f3E6107',
'0x72a5843cc08275C8171E582972Aa4fDa8C397B2A',
'0x7F19720A857F834887FC9A7bC0a0fBe7Fc7f8102',
'0xA7e5d5A720f06526557c513402f2e6B5fA20b008',
'0x1da5821544e25c636c1417Ba96Ade4Cf6D2f9B5A',
'0x9F4cda013E354b8fC285BF4b9A60460cEe7f7Ea9',
'0x19Aa5Fe80D33a56D56c78e82eA5E50E5d80b4Dff',
'0x2f389cE8bD8ff92De3402FFCe4691d17fC4f6535',
'0xe7aa314c77F4233C18C6CC84384A9247c0cf367B',
'0x7F367cC41522cE07553e823bf3be79A889DEbe1B',
'0xd882cFc20F52f2599D84b8e8D58C7FB62cfE344b',
'0x901bb9583b24D97e995513C6778dc6888AB6870e',
'0x8576aCC5C05D6Ce88f4e49bf65BdF0C62F91353C',
'0xC8a65Fadf0e0dDAf421F28FEAb69Bf6E2E589963',
'0x308eD4B7b49797e1A98D3818bFF6fe5385410370',
'0x67d40EE1A85bf4a4Bb7Ffae16De985e8427B',
'0x6f1ca141a28907f78ebaa64fb83a9088b02a83',
'0x6acdfba02d390b97ac2b2d42a63e85293bcc1',
'0x48549a34ae37b12f6a30566245176994e17c6',
'0x5512d943ed1f7c8a43f3435c85f7ab68b30121',
'0xC455f7fd3e0e12afd51fba5c106909934D8A0e4a',
'0x3CBdeD43EFdAf0FC77b9C55F6fC9988fCC9b757d',
'0x67d40EE1A85bf4a4Bb7Ffae16De985e8427B6b45',
'0x6F1cA141A28907F78Ebaa64fb83A9088b02A8352',
'0x6aCDFBA02D390b97Ac2b2d42A63E85293BCc160e',
'0x48549a34ae37b12f6a30566245176994e17c6b4a',
'0x5512d943ed1f7c8a43f3435c85f7ab68b30121b0',
'0xC455f7fd3e0e12afd51fba5c106909934D8A0e4a',
'0x629e7Da20197a5429d30da36E77d06CdF796b71A',
'0x7FF9cFad3877F21d41Da833E2F775dB0569eE3D9',
'0x098B716B8Aaf21512996dC57EB0615e2383E2f96',
'0xfEC8A60023265364D066a1212fDE3930F6Ae8da7',
]
export default function Blocklist({ children }: { children: ReactNode }) {
const { account } = useWeb3React()
const blocked: boolean = useMemo(() => Boolean(account && BLOCKED_ADDRESSES.indexOf(account) !== -1), [account])
if (blocked) {
return (
<div>
<Trans>Blocked address</Trans>
</div>
)
}
return <>{children}</>
}

View File

@@ -1,8 +1,7 @@
import useTheme from 'hooks/useTheme'
import { darken } from 'polished'
import { Check, ChevronDown } from 'react-feather'
import { Button as RebassButton, ButtonProps as ButtonPropsOriginal } from 'rebass/styled-components'
import styled from 'styled-components/macro'
import styled, { DefaultTheme, useTheme } from 'styled-components/macro'
import { RowBetween } from '../Row'
@@ -23,7 +22,7 @@ export const BaseButton = styled(RebassButton)<
border-radius: ${({ $borderRadius }) => $borderRadius ?? '20px'};
outline: none;
border: 1px solid transparent;
color: ${({ theme }) => theme.deprecated_text1};
color: ${({ theme }) => theme.textPrimary};
text-decoration: none;
display: flex;
justify-content: center;
@@ -52,24 +51,27 @@ export const BaseButton = styled(RebassButton)<
`
export const ButtonPrimary = styled(BaseButton)`
background-color: ${({ theme }) => theme.deprecated_primary1};
color: white;
background-color: ${({ theme }) => theme.accentAction};
font-size: 20px;
font-weight: 600;
padding: 16px;
color: ${({ theme }) => theme.accentTextLightPrimary};
&:focus {
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.05, theme.deprecated_primary1)};
background-color: ${({ theme }) => darken(0.05, theme.deprecated_primary1)};
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.05, theme.accentAction)};
background-color: ${({ theme }) => darken(0.05, theme.accentAction)};
}
&:hover {
background-color: ${({ theme }) => darken(0.05, theme.deprecated_primary1)};
background-color: ${({ theme }) => darken(0.05, theme.accentAction)};
}
&:active {
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.1, theme.deprecated_primary1)};
background-color: ${({ theme }) => darken(0.1, theme.deprecated_primary1)};
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.1, theme.accentAction)};
background-color: ${({ theme }) => darken(0.1, theme.accentAction)};
}
&:disabled {
background-color: ${({ theme, altDisabledStyle, disabled }) =>
altDisabledStyle ? (disabled ? theme.deprecated_primary1 : theme.deprecated_bg2) : theme.deprecated_bg2};
altDisabledStyle ? (disabled ? theme.accentAction : theme.backgroundInteractive) : theme.backgroundInteractive};
color: ${({ altDisabledStyle, disabled, theme }) =>
altDisabledStyle ? (disabled ? theme.deprecated_white : theme.deprecated_text2) : theme.deprecated_text2};
altDisabledStyle ? (disabled ? theme.white : theme.textSecondary) : theme.textSecondary};
cursor: auto;
box-shadow: none;
border: 1px solid transparent;
@@ -77,27 +79,35 @@ export const ButtonPrimary = styled(BaseButton)`
}
`
export const ButtonLight = styled(BaseButton)`
background-color: ${({ theme }) => theme.deprecated_primary5};
color: ${({ theme }) => theme.deprecated_primaryText1};
export const SmallButtonPrimary = styled(ButtonPrimary)`
width: auto;
font-size: 16px;
font-weight: 500;
padding: 10px 16px;
border-radius: 12px;
`
export const ButtonLight = styled(BaseButton)`
background-color: ${({ theme }) => theme.accentActionSoft};
color: ${({ theme }) => theme.accentAction};
font-size: 20px;
font-weight: 600;
&:focus {
box-shadow: 0 0 0 1pt ${({ theme, disabled }) => !disabled && darken(0.03, theme.deprecated_primary5)};
background-color: ${({ theme, disabled }) => !disabled && darken(0.03, theme.deprecated_primary5)};
box-shadow: 0 0 0 1pt ${({ theme, disabled }) => !disabled && theme.accentActionSoft};
background-color: ${({ theme, disabled }) => !disabled && theme.accentActionSoft};
}
&:hover {
background-color: ${({ theme, disabled }) => !disabled && darken(0.03, theme.deprecated_primary5)};
background-color: ${({ theme, disabled }) => !disabled && theme.accentActionSoft};
}
&:active {
box-shadow: 0 0 0 1pt ${({ theme, disabled }) => !disabled && darken(0.05, theme.deprecated_primary5)};
background-color: ${({ theme, disabled }) => !disabled && darken(0.05, theme.deprecated_primary5)};
box-shadow: 0 0 0 1pt ${({ theme, disabled }) => !disabled && theme.accentActionSoft};
background-color: ${({ theme, disabled }) => !disabled && theme.accentActionSoft};
}
:disabled {
opacity: 0.4;
:hover {
cursor: auto;
background-color: ${({ theme }) => theme.deprecated_primary5};
background-color: transparent;
box-shadow: none;
border: 1px solid transparent;
outline: none;
@@ -107,21 +117,21 @@ export const ButtonLight = styled(BaseButton)`
export const ButtonGray = styled(BaseButton)`
background-color: ${({ theme }) => theme.deprecated_bg1};
color: ${({ theme }) => theme.deprecated_text2};
color: ${({ theme }) => theme.textSecondary};
font-size: 16px;
font-weight: 500;
&:hover {
background-color: ${({ theme, disabled }) => !disabled && darken(0.05, theme.deprecated_bg2)};
background-color: ${({ theme, disabled }) => !disabled && darken(0.05, theme.backgroundInteractive)};
}
&:active {
background-color: ${({ theme, disabled }) => !disabled && darken(0.1, theme.deprecated_bg2)};
background-color: ${({ theme, disabled }) => !disabled && darken(0.1, theme.backgroundInteractive)};
}
`
export const ButtonSecondary = styled(BaseButton)`
border: 1px solid ${({ theme }) => theme.deprecated_primary4};
color: ${({ theme }) => theme.deprecated_primary1};
color: ${({ theme }) => theme.accentAction};
background-color: transparent;
font-size: 16px;
border-radius: 12px;
@@ -148,14 +158,14 @@ export const ButtonSecondary = styled(BaseButton)`
`
export const ButtonOutlined = styled(BaseButton)`
border: 1px solid ${({ theme }) => theme.deprecated_bg2};
border: 1px solid ${({ theme }) => theme.backgroundOutline};
background-color: transparent;
color: ${({ theme }) => theme.deprecated_text1};
color: ${({ theme }) => theme.textPrimary};
&:focus {
box-shadow: 0 0 0 1px ${({ theme }) => theme.deprecated_bg4};
}
&:hover {
box-shadow: 0 0 0 1px ${({ theme }) => theme.deprecated_bg4};
box-shadow: 0 0 0 1px ${({ theme }) => theme.textTertiary};
}
&:active {
box-shadow: 0 0 0 1px ${({ theme }) => theme.deprecated_bg4};
@@ -167,29 +177,28 @@ export const ButtonOutlined = styled(BaseButton)`
`
export const ButtonYellow = styled(BaseButton)`
background-color: ${({ theme }) => theme.deprecated_yellow3};
color: white;
background-color: ${({ theme }) => theme.accentWarningSoft};
color: ${({ theme }) => theme.accentWarning};
&:focus {
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.05, theme.deprecated_yellow3)};
background-color: ${({ theme }) => darken(0.05, theme.deprecated_yellow3)};
background-color: ${({ theme }) => theme.accentWarningSoft};
}
&:hover {
background-color: ${({ theme }) => darken(0.05, theme.deprecated_yellow3)};
background: ${({ theme }) => theme.stateOverlayHover};
mix-blend-mode: normal;
}
&:active {
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.1, theme.deprecated_yellow3)};
background-color: ${({ theme }) => darken(0.1, theme.deprecated_yellow3)};
background-color: ${({ theme }) => theme.accentWarningSoft};
}
&:disabled {
background-color: ${({ theme }) => theme.deprecated_yellow3};
opacity: 50%;
background-color: ${({ theme }) => theme.accentWarningSoft};
opacity: 60%;
cursor: auto;
}
`
export const ButtonEmpty = styled(BaseButton)`
background-color: transparent;
color: ${({ theme }) => theme.deprecated_primary1};
color: ${({ theme }) => theme.accentAction};
display: flex;
justify-content: center;
align-items: center;
@@ -215,11 +224,9 @@ export const ButtonText = styled(BaseButton)`
background: none;
text-decoration: none;
&:focus {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
text-decoration: underline;
}
&:hover {
// text-decoration: underline;
opacity: 0.9;
}
&:active {
@@ -233,38 +240,38 @@ export const ButtonText = styled(BaseButton)`
const ButtonConfirmedStyle = styled(BaseButton)`
background-color: ${({ theme }) => theme.deprecated_bg3};
color: ${({ theme }) => theme.deprecated_text1};
/* border: 1px solid ${({ theme }) => theme.deprecated_green1}; */
color: ${({ theme }) => theme.textPrimary};
/* border: 1px solid ${({ theme }) => theme.accentSuccess}; */
&:disabled {
opacity: 50%;
background-color: ${({ theme }) => theme.deprecated_bg2};
color: ${({ theme }) => theme.deprecated_text2};
background-color: ${({ theme }) => theme.backgroundInteractive};
color: ${({ theme }) => theme.textSecondary};
cursor: auto;
}
`
const ButtonErrorStyle = styled(BaseButton)`
background-color: ${({ theme }) => theme.deprecated_red1};
border: 1px solid ${({ theme }) => theme.deprecated_red1};
background-color: ${({ theme }) => theme.accentFailure};
border: 1px solid ${({ theme }) => theme.accentFailure};
&:focus {
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.05, theme.deprecated_red1)};
background-color: ${({ theme }) => darken(0.05, theme.deprecated_red1)};
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.05, theme.accentFailure)};
background-color: ${({ theme }) => darken(0.05, theme.accentFailure)};
}
&:hover {
background-color: ${({ theme }) => darken(0.05, theme.deprecated_red1)};
background-color: ${({ theme }) => darken(0.05, theme.accentFailure)};
}
&:active {
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.1, theme.deprecated_red1)};
background-color: ${({ theme }) => darken(0.1, theme.deprecated_red1)};
box-shadow: 0 0 0 1pt ${({ theme }) => darken(0.1, theme.accentFailure)};
background-color: ${({ theme }) => darken(0.1, theme.accentFailure)};
}
&:disabled {
opacity: 50%;
cursor: auto;
box-shadow: none;
background-color: ${({ theme }) => theme.deprecated_red1};
border: 1px solid ${({ theme }) => theme.deprecated_red1};
background-color: ${({ theme }) => theme.accentFailure};
border: 1px solid ${({ theme }) => theme.accentFailure};
}
`
@@ -312,14 +319,14 @@ export function ButtonDropdownLight({ disabled = false, children, ...rest }: { d
const ActiveOutlined = styled(ButtonOutlined)`
border: 1px solid;
border-color: ${({ theme }) => theme.deprecated_primary1};
border-color: ${({ theme }) => theme.accentAction};
`
const Circle = styled.div`
height: 17px;
width: 17px;
border-radius: 50%;
background-color: ${({ theme }) => theme.deprecated_primary1};
background-color: ${({ theme }) => theme.accentAction};
display: flex;
align-items: center;
justify-content: center;
@@ -343,23 +350,176 @@ export function ButtonRadioChecked({ active = false, children, ...rest }: { acti
if (!active) {
return (
<ButtonOutlined $borderRadius="12px" padding="12px 8px" {...rest}>
{<RowBetween>{children}</RowBetween>}
<RowBetween>{children}</RowBetween>
</ButtonOutlined>
)
} else {
return (
<ActiveOutlined {...rest} padding="12px 8px" $borderRadius="12px">
{
<RowBetween>
{children}
<CheckboxWrapper>
<Circle>
<ResponsiveCheck size={13} stroke={theme.deprecated_white} />
</Circle>
</CheckboxWrapper>
</RowBetween>
}
<RowBetween>
{children}
<CheckboxWrapper>
<Circle>
<ResponsiveCheck size={13} stroke={theme.white} />
</Circle>
</CheckboxWrapper>
</RowBetween>
</ActiveOutlined>
)
}
}
const ButtonOverlay = styled.div`
background-color: transparent;
bottom: 0;
border-radius: 16px;
height: 100%;
left: 0;
position: absolute;
right: 0;
top: 0;
transition: 150ms ease background-color;
width: 100%;
`
export enum ButtonSize {
small,
medium,
large,
}
export enum ButtonEmphasis {
high,
promotional,
highSoft,
medium,
low,
warning,
destructive,
}
interface BaseButtonProps {
size: ButtonSize
emphasis: ButtonEmphasis
}
function pickThemeButtonBackgroundColor({ theme, emphasis }: { theme: DefaultTheme; emphasis: ButtonEmphasis }) {
switch (emphasis) {
case ButtonEmphasis.high:
return theme.accentAction
case ButtonEmphasis.promotional:
return theme.accentTextLightPrimary
case ButtonEmphasis.highSoft:
return theme.accentActionSoft
case ButtonEmphasis.low:
return 'transparent'
case ButtonEmphasis.warning:
return theme.accentWarningSoft
case ButtonEmphasis.destructive:
return theme.accentCritical
case ButtonEmphasis.medium:
default:
return theme.backgroundInteractive
}
}
function pickThemeButtonFontSize({ size }: { size: ButtonSize }) {
switch (size) {
case ButtonSize.large:
return '20px'
case ButtonSize.medium:
return '16px'
case ButtonSize.small:
return '14px'
default:
return '16px'
}
}
function pickThemeButtonLineHeight({ size }: { size: ButtonSize }) {
switch (size) {
case ButtonSize.large:
return '24px'
case ButtonSize.medium:
return '20px'
case ButtonSize.small:
return '16px'
default:
return '20px'
}
}
function pickThemeButtonPadding({ size }: { size: ButtonSize }) {
switch (size) {
case ButtonSize.large:
return '16px'
case ButtonSize.medium:
return '10px 12px'
case ButtonSize.small:
return '8px'
default:
return '10px 12px'
}
}
function pickThemeButtonTextColor({ theme, emphasis }: { theme: DefaultTheme; emphasis: ButtonEmphasis }) {
switch (emphasis) {
case ButtonEmphasis.high:
case ButtonEmphasis.promotional:
return theme.accentTextLightPrimary
case ButtonEmphasis.highSoft:
return theme.accentAction
case ButtonEmphasis.low:
return theme.textSecondary
case ButtonEmphasis.warning:
return theme.accentWarning
case ButtonEmphasis.destructive:
return theme.accentTextDarkPrimary
case ButtonEmphasis.medium:
default:
return theme.textPrimary
}
}
const BaseThemeButton = styled.button<BaseButtonProps>`
align-items: center;
background-color: ${pickThemeButtonBackgroundColor};
border-radius: 16px;
border: 0;
color: ${pickThemeButtonTextColor};
cursor: pointer;
display: flex;
flex-direction: row;
font-size: ${pickThemeButtonFontSize};
font-weight: 600;
gap: 12px;
justify-content: center;
line-height: ${pickThemeButtonLineHeight};
padding: ${pickThemeButtonPadding};
position: relative;
transition: 150ms ease opacity;
:active {
${ButtonOverlay} {
background-color: ${({ theme }) => theme.stateOverlayPressed};
}
}
:disabled {
cursor: default;
opacity: 0.6;
}
:focus {
${ButtonOverlay} {
background-color: ${({ theme }) => theme.stateOverlayPressed};
}
}
:hover {
${ButtonOverlay} {
background-color: ${({ theme }) => theme.stateOverlayHover};
}
}
`
interface ThemeButtonProps extends React.ComponentPropsWithoutRef<'button'>, BaseButtonProps {}
export const ThemeButton = ({ children, ...rest }: ThemeButtonProps) => {
return (
<BaseThemeButton {...rest}>
<ButtonOverlay />
{children}
</BaseThemeButton>
)
}

View File

@@ -10,24 +10,20 @@ const Card = styled(Box)<{ width?: string; padding?: string; border?: string; $b
export default Card
export const LightCard = styled(Card)`
border: 1px solid ${({ theme }) => theme.deprecated_bg2};
border: 1px solid ${({ theme }) => theme.backgroundInteractive};
background-color: ${({ theme }) => theme.deprecated_bg1};
`
export const LightGreyCard = styled(Card)`
background-color: ${({ theme }) => theme.deprecated_bg2};
`
export const GreyCard = styled(Card)`
export const GrayCard = styled(Card)`
background-color: ${({ theme }) => theme.deprecated_bg3};
`
export const DarkGreyCard = styled(Card)`
background-color: ${({ theme }) => theme.deprecated_bg2};
export const DarkGrayCard = styled(Card)`
background-color: ${({ theme }) => theme.backgroundInteractive};
`
export const DarkCard = styled(Card)`
background-color: ${({ theme }) => theme.deprecated_bg0};
background-color: ${({ theme }) => theme.backgroundSurface};
`
export const OutlineCard = styled(Card)`
@@ -42,6 +38,6 @@ export const YellowCard = styled(Card)`
export const BlueCard = styled(Card)`
background-color: ${({ theme }) => theme.deprecated_primary5};
color: ${({ theme }) => theme.deprecated_blue2};
color: ${({ theme }) => theme.accentAction};
border-radius: 12px;
`

View File

@@ -0,0 +1,95 @@
import { Group } from '@visx/group'
import { LinePath } from '@visx/shape'
import { easeSinOut } from 'd3'
import ms from 'ms.macro'
import React from 'react'
import { useEffect, useRef, useState } from 'react'
import { animated, useSpring } from 'react-spring'
import { useTheme } from 'styled-components/macro'
import { LineChartProps } from './LineChart'
type AnimatedInLineChartProps<T> = Omit<LineChartProps<T>, 'height' | 'width' | 'children'>
const config = {
duration: ms`0.8s`,
easing: easeSinOut,
}
// code reference: https://airbnb.io/visx/lineradial
function AnimatedInLineChart<T>({
data,
getX,
getY,
marginTop,
curve,
color,
strokeWidth,
}: AnimatedInLineChartProps<T>) {
const lineRef = useRef<SVGPathElement>(null)
const [lineLength, setLineLength] = useState(0)
const [shouldAnimate, setShouldAnimate] = useState(false)
const [hasAnimatedIn, setHasAnimatedIn] = useState(false)
const spring = useSpring({
frame: shouldAnimate ? 0 : 1,
config,
onRest: () => {
setShouldAnimate(false)
setHasAnimatedIn(true)
},
})
// We need to check to see after the "invisble" line has been drawn
// what the length is to be able to animate in the line for the first time
// This will run on each render to see if there is a new line length
// eslint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => {
if (lineRef.current) {
const length = lineRef.current.getTotalLength()
if (length !== lineLength) {
setLineLength(length)
}
if (length > 0 && !shouldAnimate && !hasAnimatedIn) {
setShouldAnimate(true)
}
}
})
const theme = useTheme()
const lineColor = color ?? theme.accentAction
return (
<Group top={marginTop}>
<LinePath curve={curve} x={getX} y={getY}>
{({ path }) => {
const d = path(data) || ''
return (
<>
<animated.path
d={d}
ref={lineRef}
strokeWidth={strokeWidth}
strokeOpacity={hasAnimatedIn ? 1 : 0}
fill="none"
stroke={lineColor}
/>
{shouldAnimate && lineLength !== 0 && (
<animated.path
d={d}
strokeWidth={strokeWidth}
fill="none"
stroke={lineColor}
strokeDashoffset={spring.frame.to((v) => v * lineLength)}
strokeDasharray={lineLength}
/>
)}
</>
)
}}
</LinePath>
</Group>
)
}
export default React.memo(AnimatedInLineChart) as typeof AnimatedInLineChart

View File

@@ -0,0 +1,86 @@
import { Group } from '@visx/group'
import { LinePath } from '@visx/shape'
import { easeCubicInOut } from 'd3'
import React from 'react'
import { useEffect, useRef, useState } from 'react'
import { animated, useSpring } from 'react-spring'
import { useTheme } from 'styled-components/macro'
import { LineChartProps } from './LineChart'
type FadedInLineChartProps<T> = Omit<LineChartProps<T>, 'height' | 'width' | 'children'> & { dashed?: boolean }
const config = {
duration: 3000,
easing: easeCubicInOut,
}
// code reference: https://airbnb.io/visx/lineradial
function FadedInLineChart<T>({
data,
getX,
getY,
marginTop,
curve,
color,
strokeWidth,
dashed,
}: FadedInLineChartProps<T>) {
const lineRef = useRef<SVGPathElement>(null)
const [lineLength, setLineLength] = useState(0)
const [shouldAnimate, setShouldAnimate] = useState(false)
const [hasAnimatedIn, setHasAnimatedIn] = useState(false)
const spring = useSpring({
frame: shouldAnimate ? 0 : 1,
config,
onRest: () => {
setShouldAnimate(false)
setHasAnimatedIn(true)
},
})
// We need to check to see after the "invisble" line has been drawn
// what the length is to be able to animate in the line for the first time
// This will run on each render to see if there is a new line length
// eslint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => {
if (lineRef.current) {
const length = lineRef.current.getTotalLength()
if (length !== lineLength) {
setLineLength(length)
}
if (length > 0 && !shouldAnimate && !hasAnimatedIn) {
setShouldAnimate(true)
}
}
})
const theme = useTheme()
const lineColor = color ?? theme.accentAction
return (
<Group top={marginTop}>
<LinePath curve={curve} x={getX} y={getY}>
{({ path }) => {
const d = path(data) || ''
return (
<>
<animated.path
d={d}
ref={lineRef}
strokeWidth={strokeWidth}
strokeOpacity={hasAnimatedIn ? 1 : spring.frame.to((v) => 1 - v)}
fill="none"
stroke={lineColor}
strokeDasharray={dashed ? '4,4' : undefined}
/>
</>
)
}}
</LinePath>
</Group>
)
}
export default React.memo(FadedInLineChart) as typeof FadedInLineChart

View File

@@ -0,0 +1,51 @@
import { Group } from '@visx/group'
import { LinePath } from '@visx/shape'
import { CurveFactory } from 'd3'
import React from 'react'
import { ReactNode } from 'react'
import { useTheme } from 'styled-components/macro'
export interface LineChartProps<T> {
data: T[]
getX: (t: T) => number
getY: (t: T) => number
marginTop?: number
curve: CurveFactory
color?: string
strokeWidth: number
children?: ReactNode
width: number
height: number
}
function LineChart<T>({
data,
getX,
getY,
marginTop,
curve,
color,
strokeWidth,
width,
height,
children,
}: LineChartProps<T>) {
const theme = useTheme()
return (
<svg width={width} height={height}>
<Group top={marginTop}>
<LinePath
curve={curve}
stroke={color ?? theme.accentAction}
strokeWidth={strokeWidth}
data={data}
x={getX}
y={getY}
/>
</Group>
{children}
</svg>
)
}
export default React.memo(LineChart) as typeof LineChart

View File

@@ -1,291 +0,0 @@
import { AxisBottom, TickFormatter } from '@visx/axis'
import { localPoint } from '@visx/event'
import { EventType } from '@visx/event/lib/types'
import { GlyphCircle } from '@visx/glyph'
import { Group } from '@visx/group'
import { Line, LinePath } from '@visx/shape'
import { bisect, curveBasis, NumberValue, scaleLinear } from 'd3'
import { radius } from 'd3-curve-circlecorners'
import { useActiveLocale } from 'hooks/useActiveLocale'
import useTheme from 'hooks/useTheme'
import { TimePeriod } from 'hooks/useTopTokens'
import { useCallback, useState } from 'react'
import { ArrowDownRight, ArrowUpRight } from 'react-feather'
import styled from 'styled-components/macro'
import {
dayHourFormatter,
hourFormatter,
monthDayFormatter,
monthFormatter,
monthYearDayFormatter,
monthYearFormatter,
weekFormatter,
} from 'utils/formatChartTimes'
import data from './data.json'
const TIME_DISPLAYS: [TimePeriod, string][] = [
[TimePeriod.hour, '1H'],
[TimePeriod.day, '1D'],
[TimePeriod.week, '1W'],
[TimePeriod.month, '1M'],
[TimePeriod.year, '1Y'],
[TimePeriod.all, 'ALL'],
]
type PricePoint = { value: number; timestamp: number }
function getPriceBounds(pricePoints: PricePoint[]): [number, number] {
const prices = pricePoints.map((x) => x.value)
const min = Math.min(...prices)
const max = Math.max(...prices)
return [min, max]
}
const StyledUpArrow = styled(ArrowUpRight)`
color: ${({ theme }) => theme.accentSuccess};
`
const StyledDownArrow = styled(ArrowDownRight)`
color: ${({ theme }) => theme.accentFailure};
`
function getDelta(start: number, current: number) {
const delta = (current / start - 1) * 100
const isPositive = Math.sign(delta) > 0
const formattedDelta = delta.toFixed(2) + '%'
if (isPositive) {
return ['+' + formattedDelta, <StyledUpArrow size={16} key="arrow-up" />]
} else if (delta === 0) {
return [formattedDelta, null]
}
return [formattedDelta, <StyledDownArrow size={16} key="arrow-down" />]
}
export const ChartWrapper = styled.div`
position: relative;
overflow: visible;
`
export const ChartHeader = styled.div`
position: absolute;
`
export const TokenPrice = styled.span`
font-size: 36px;
line-height: 44px;
`
export const DeltaContainer = styled.div`
height: 16px;
display: flex;
align-items: center;
`
const ArrowCell = styled.div`
padding-left: 2px;
display: flex;
`
export const TimeOptionsContainer = styled.div`
display: flex;
justify-content: flex-end;
margin-top: 4px;
gap: 4px;
`
const TimeButton = styled.button<{ active: boolean }>`
background-color: ${({ theme, active }) => (active ? theme.accentActive : 'transparent')};
font-size: 14px;
width: 36px;
height: 36px;
border-radius: 12px;
border: none;
cursor: pointer;
color: ${({ theme }) => theme.textPrimary};
`
function getTicks(startTimestamp: number, endTimestamp: number, numTicks = 5) {
return Array.from(
{ length: numTicks },
(v, i) => endTimestamp - ((endTimestamp - startTimestamp) / (numTicks + 1)) * (i + 1)
)
}
function tickFormat(
startTimestamp: number,
endTimestamp: number,
activeTimePeriod: TimePeriod,
locale: string
): [TickFormatter<NumberValue>, (v: number) => string, number[]] {
switch (activeTimePeriod) {
case TimePeriod.hour:
return [hourFormatter(locale), dayHourFormatter(locale), getTicks(startTimestamp, endTimestamp)]
case TimePeriod.day:
return [hourFormatter(locale), dayHourFormatter(locale), getTicks(startTimestamp, endTimestamp)]
case TimePeriod.week:
return [weekFormatter(locale), dayHourFormatter(locale), getTicks(startTimestamp, endTimestamp, 6)]
case TimePeriod.month:
return [monthDayFormatter(locale), dayHourFormatter(locale), getTicks(startTimestamp, endTimestamp)]
case TimePeriod.year:
return [monthFormatter(locale), monthYearDayFormatter(locale), getTicks(startTimestamp, endTimestamp)]
case TimePeriod.all:
return [monthYearFormatter(locale), monthYearDayFormatter(locale), getTicks(startTimestamp, endTimestamp)]
}
}
const margin = { top: 86, bottom: 32, crosshair: 72 }
const timeOptionsHeight = 44
const crosshairDateOverhang = 80
interface PriceChartProps {
width: number
height: number
}
export function PriceChart({ width, height }: PriceChartProps) {
const [activeTimePeriod, setTimePeriod] = useState(TimePeriod.hour)
const locale = useActiveLocale()
const theme = useTheme()
/* TODO: Implement API calls & cache to use here */
const pricePoints = data[activeTimePeriod]
const startingPrice = pricePoints[0]
const endingPrice = pricePoints[pricePoints.length - 1]
const initialState = { pricePoint: endingPrice, xCoordinate: null }
const [selected, setSelected] = useState<{ pricePoint: PricePoint; xCoordinate: number | null }>(initialState)
const graphWidth = width + crosshairDateOverhang
const graphHeight = height - timeOptionsHeight
const graphInnerHeight = graphHeight - margin.top - margin.bottom
// Defining scales
// x scale
const timeScale = scaleLinear().domain([startingPrice.timestamp, endingPrice.timestamp]).range([0, width])
// y scale
const rdScale = scaleLinear().domain(getPriceBounds(pricePoints)).range([graphInnerHeight, 0])
const handleHover = useCallback(
(event: Element | EventType) => {
const { x } = localPoint(event) || { x: 0 }
const x0 = timeScale.invert(x) // get timestamp from the scale
const index = bisect(
pricePoints.map((x) => x.timestamp),
x0,
1
)
const d0 = pricePoints[index - 1]
const d1 = pricePoints[index]
let pricePoint = d0
const hasPreviousData = d1 && d1.timestamp
if (hasPreviousData) {
pricePoint = x0.valueOf() - d0.timestamp.valueOf() > d1.timestamp.valueOf() - x0.valueOf() ? d1 : d0
}
setSelected({ pricePoint, xCoordinate: timeScale(pricePoint.timestamp) })
},
[timeScale, pricePoints]
)
const [tickFormatter, crosshairDateFormatter, ticks] = tickFormat(
startingPrice.timestamp,
endingPrice.timestamp,
activeTimePeriod,
locale
)
const [delta, arrow] = getDelta(startingPrice.value, selected.pricePoint.value)
const crosshairEdgeMax = width * 0.97
const crosshairAtEdge = !!selected.xCoordinate && selected.xCoordinate > crosshairEdgeMax
return (
<ChartWrapper>
<ChartHeader>
<TokenPrice>${selected.pricePoint.value.toFixed(2)}</TokenPrice>
<DeltaContainer>
{delta}
<ArrowCell>{arrow}</ArrowCell>
</DeltaContainer>
</ChartHeader>
<svg width={graphWidth} height={graphHeight}>
<AxisBottom
scale={timeScale}
stroke={theme.backgroundOutline}
tickFormat={tickFormatter}
tickStroke={theme.backgroundOutline}
tickLength={4}
tickTransform={'translate(0 -5)'}
tickValues={ticks}
top={graphHeight - 1}
tickLabelProps={() => ({
fill: theme.textSecondary,
fontSize: 12,
textAnchor: 'middle',
transform: 'translate(0 -24)',
})}
/>
{selected.xCoordinate !== null && (
<g>
<text
x={selected.xCoordinate + (crosshairAtEdge ? -4 : 4)}
y={margin.crosshair + 10}
textAnchor={crosshairAtEdge ? 'end' : 'start'}
fontSize={12}
fill={theme.textSecondary}
>
{crosshairDateFormatter(selected.pricePoint.timestamp)}
</text>
<Line
from={{ x: selected.xCoordinate, y: margin.crosshair }}
to={{ x: selected.xCoordinate, y: graphHeight }}
stroke={theme.backgroundOutline}
strokeWidth={1}
pointerEvents="none"
strokeDasharray="4,4"
/>
</g>
)}
<Group top={margin.top}>
<LinePath
/* ALL chart renders poorly using circle corners; use d3 curve for ALL instead */
curve={activeTimePeriod === TimePeriod.all ? curveBasis : radius(0.25)}
stroke={theme.accentActive}
strokeWidth={2}
data={pricePoints}
x={(d: PricePoint) => timeScale(d.timestamp) ?? 0}
y={(d: PricePoint) => rdScale(d.value) ?? 0}
/>
{selected.xCoordinate !== null && (
<g>
<GlyphCircle
left={selected.xCoordinate}
top={rdScale(selected.pricePoint.value)}
size={50}
fill={theme.accentActive}
stroke={theme.backgroundOutline}
strokeWidth={2}
/>
</g>
)}
</Group>
<rect
x={0}
y={0}
width={width}
height={graphHeight}
fill={'transparent'}
onTouchStart={handleHover}
onTouchMove={handleHover}
onMouseMove={handleHover}
onMouseLeave={() => setSelected(initialState)}
/>
</svg>
<TimeOptionsContainer>
{TIME_DISPLAYS.map(([value, display]) => (
<TimeButton key={display} active={activeTimePeriod === value} onClick={() => setTimePeriod(value)}>
{display}
</TimeButton>
))}
</TimeOptionsContainer>
</ChartWrapper>
)
}
export default PriceChart

View File

@@ -0,0 +1,78 @@
import { SparkLineLoadingBubble } from 'components/Tokens/TokenTable/TokenRow'
import { curveCardinal, scaleLinear } from 'd3'
import { SparklineMap, TopToken } from 'graphql/data/TopTokens'
import { PricePoint } from 'graphql/data/util'
import { TimePeriod } from 'graphql/data/util'
import { memo } from 'react'
import styled, { useTheme } from 'styled-components/macro'
import { getPriceBounds } from '../Tokens/TokenDetails/PriceChart'
import LineChart from './LineChart'
const LoadingContainer = styled.div`
height: 100%;
display: flex;
justify-content: center;
align-items: center;
`
interface SparklineChartProps {
width: number
height: number
tokenData: TopToken
pricePercentChange: number | undefined | null
timePeriod: TimePeriod
sparklineMap: SparklineMap
}
function _SparklineChart({
width,
height,
tokenData,
pricePercentChange,
timePeriod,
sparklineMap,
}: SparklineChartProps) {
const theme = useTheme()
// for sparkline
const pricePoints = tokenData?.address ? sparklineMap[tokenData.address] : null
// Don't display if there's one or less pricepoints
if (!pricePoints || pricePoints.length <= 1) {
return (
<LoadingContainer>
<SparkLineLoadingBubble />
</LoadingContainer>
)
}
const startingPrice = pricePoints[0]
const endingPrice = pricePoints[pricePoints.length - 1]
const widthScale = scaleLinear()
.domain(
// the range of possible input values
[startingPrice.timestamp, endingPrice.timestamp]
)
.range(
// the range of possible output values that the inputs should be transformed to (see https://www.d3indepth.com/scales/ for details)
[0, 110]
)
const rdScale = scaleLinear().domain(getPriceBounds(pricePoints)).range([30, 0])
const curveTension = 0.9
return (
<LineChart
data={pricePoints}
getX={(p: PricePoint) => widthScale(p.timestamp)}
getY={(p: PricePoint) => rdScale(p.value)}
curve={curveCardinal.tension(curveTension)}
marginTop={5}
color={pricePercentChange && pricePercentChange < 0 ? theme.accentFailure : theme.accentSuccess}
strokeWidth={1.5}
width={width}
height={height}
/>
)
}
export default memo(_SparklineChart)

View File

@@ -1,9 +1,14 @@
import styled from 'styled-components/macro'
import styled, { DefaultTheme } from 'styled-components/macro'
const Column = styled.div`
type Gap = keyof DefaultTheme['grids']
export const Column = styled.div<{
gap?: Gap
}>`
display: flex;
flex-direction: column;
justify-content: flex-start;
gap: ${({ gap, theme }) => gap && theme.grids[gap]};
`
export const ColumnCenter = styled(Column)`
width: 100%;
@@ -11,12 +16,12 @@ export const ColumnCenter = styled(Column)`
`
export const AutoColumn = styled.div<{
gap?: 'sm' | 'md' | 'lg' | string
gap?: Gap | string
justify?: 'stretch' | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'space-between'
}>`
display: grid;
grid-auto-rows: auto;
grid-row-gap: ${({ gap }) => (gap === 'sm' && '8px') || (gap === 'md' && '12px') || (gap === 'lg' && '24px') || gap};
grid-row-gap: ${({ gap, theme }) => (gap && theme.grids[gap as Gap]) || gap};
justify-items: ${({ justify }) => justify && justify};
`

View File

@@ -0,0 +1,47 @@
import { css } from 'styled-components/macro'
export const ScrollBarStyles = css<{ $isHorizontalScroll?: boolean }>`
// Firefox scrollbar styling
scrollbar-width: thin;
scrollbar-color: ${({ theme }) => `${theme.backgroundOutline} transparent`};
height: 100%;
// safari and chrome scrollbar styling
::-webkit-scrollbar {
background: transparent;
// Set height for horizontal scrolls
${({ $isHorizontalScroll }) => {
return $isHorizontalScroll
? css`
height: 4px;
overflow-x: scroll;
`
: css`
width: 4px;
overflow-y: scroll;
`
}}
}
::-webkit-scrollbar-thumb {
background: ${({ theme }) => theme.backgroundOutline};
border-radius: 8px;
}
`
export const OpacityHoverState = css`
&:hover {
opacity: ${({ theme }) => theme.opacity.hover};
}
&:active {
opacity: ${({ theme }) => theme.opacity.click};
}
transition: ${({
theme: {
transition: { duration, timing },
},
}) => `opacity ${duration.medium} ${timing.ease}`};
`

View File

@@ -1,32 +0,0 @@
import ReactConfetti from 'react-confetti'
import { useWindowSize } from '../../hooks/useWindowSize'
// eslint-disable-next-line react/prop-types
export default function Confetti({ start, variant }: { start: boolean; variant?: string }) {
const { width, height } = useWindowSize()
const _variant = variant ? variant : height && width && height > 1.5 * width ? 'bottom' : variant
return start && width && height ? (
<ReactConfetti
style={{ zIndex: 1401 }}
numberOfPieces={400}
recycle={false}
run={true}
width={width}
height={height}
confettiSource={{
h: height,
w: width,
x: 0,
y: _variant === 'top' ? height * 0.25 : _variant === 'bottom' ? height * 0.75 : height * 0.5,
}}
initialVelocityX={15}
initialVelocityY={30}
gravity={0.45}
tweenDuration={100}
wind={0.05}
/>
) : null
}

View File

@@ -1,22 +1,17 @@
import { Trans } from '@lingui/macro'
import CopyHelper from 'components/AccountDetails/Copy'
import Column from 'components/Column'
import useTheme from 'hooks/useTheme'
import { AlertOctagon } from 'react-feather'
import styled from 'styled-components/macro'
import { BlockedIcon } from 'components/TokenSafety/TokenSafetyIcon'
import styled, { useTheme } from 'styled-components/macro'
import { ExternalLink, ThemedText } from 'theme'
import { CopyHelper } from '../../theme'
import Modal from '../Modal'
const ContentWrapper = styled(Column)`
align-items: center;
margin: 32px;
text-align: center;
`
const WarningIcon = styled(AlertOctagon)`
min-height: 22px;
min-width: 22px;
color: ${({ theme }) => theme.deprecated_warning};
font-size: 12px;
`
const Copy = styled(CopyHelper)`
font-size: 12px;
@@ -32,7 +27,7 @@ export default function ConnectedAccountBlocked(props: ConnectedAccountBlockedPr
return (
<Modal isOpen={props.isOpen} onDismiss={Function.prototype()}>
<ContentWrapper>
<WarningIcon />
<BlockedIcon size="22px" />
<ThemedText.DeprecatedLargeHeader lineHeight={2} marginBottom={1} marginTop={1}>
<Trans>Blocked Address</Trans>
</ThemedText.DeprecatedLargeHeader>
@@ -49,7 +44,14 @@ export default function ConnectedAccountBlocked(props: ConnectedAccountBlockedPr
<ThemedText.DeprecatedMain fontSize={12}>
<Trans>If you believe this is an error, please send an email including your address to </Trans>{' '}
</ThemedText.DeprecatedMain>
<Copy iconSize={12} toCopy="compliance@uniswap.org" color={theme.deprecated_primary1} iconPosition="right">
<Copy
toCopy="compliance@uniswap.org"
fontSize={14}
iconSize={16}
gap={6}
color={theme.accentAction}
iconPosition="right"
>
compliance@uniswap.org
</Copy>
</ContentWrapper>

View File

@@ -1,56 +1,72 @@
import { Trans } from '@lingui/macro'
// eslint-disable-next-line no-restricted-imports
import { t } from '@lingui/macro'
import { formatCurrencyAmount, formatPriceImpact, NumberType } from '@uniswap/conedison/format'
import { Currency, CurrencyAmount, Percent } from '@uniswap/sdk-core'
import HoverInlineText from 'components/HoverInlineText'
import { useMemo } from 'react'
import { LoadingBubble } from 'components/Tokens/loading'
import { MouseoverTooltip } from 'components/Tooltip'
import { useEffect, useMemo, useState } from 'react'
import styled, { useTheme } from 'styled-components/macro'
import useTheme from '../../hooks/useTheme'
import { ThemedText } from '../../theme'
import { warningSeverity } from '../../utils/prices'
import { MouseoverTooltip } from '../Tooltip'
const FiatLoadingBubble = styled(LoadingBubble)`
border-radius: 4px;
width: 4rem;
height: 1rem;
`
export function FiatValue({
fiatValue,
priceImpact,
isLoading = false,
}: {
fiatValue: CurrencyAmount<Currency> | null | undefined
priceImpact?: Percent
isLoading?: boolean
}) {
const theme = useTheme()
const [showLoadingPlaceholder, setShowLoadingPlaceholder] = useState(false)
const priceImpactColor = useMemo(() => {
if (!priceImpact) return undefined
if (priceImpact.lessThan('0')) return theme.deprecated_green1
if (priceImpact.lessThan('0')) return theme.accentSuccess
const severity = warningSeverity(priceImpact)
if (severity < 1) return theme.deprecated_text3
if (severity < 1) return theme.textTertiary
if (severity < 3) return theme.deprecated_yellow1
return theme.deprecated_red1
}, [priceImpact, theme.deprecated_green1, theme.deprecated_red1, theme.deprecated_text3, theme.deprecated_yellow1])
return theme.accentFailure
}, [priceImpact, theme.accentSuccess, theme.accentFailure, theme.textTertiary, theme.deprecated_yellow1])
const p = Number(fiatValue?.toFixed())
const visibleDecimalPlaces = p < 1.05 ? 4 : 2
useEffect(() => {
const stale = false
let timeoutId = 0
if (isLoading && !fiatValue) {
timeoutId = setTimeout(() => {
if (!stale) setShowLoadingPlaceholder(true)
}, 200) as unknown as number
} else {
setShowLoadingPlaceholder(false)
}
return () => clearTimeout(timeoutId)
}, [isLoading, fiatValue])
return (
<ThemedText.DeprecatedBody fontSize={14} color={fiatValue ? theme.deprecated_text3 : theme.deprecated_text4}>
{fiatValue ? (
<Trans>
$
<HoverInlineText
text={fiatValue?.toFixed(visibleDecimalPlaces, { groupSeparator: ',' })}
textColor={fiatValue ? theme.deprecated_text3 : theme.deprecated_text4}
/>
</Trans>
<ThemedText.DeprecatedBody fontSize={14} color={theme.textSecondary}>
{showLoadingPlaceholder ? (
<FiatLoadingBubble />
) : (
''
<div>
{fiatValue && <>{formatCurrencyAmount(fiatValue, NumberType.FiatTokenPrice)}</>}
{priceImpact && (
<span style={{ color: priceImpactColor }}>
{' '}
<MouseoverTooltip text={t`The estimated difference between the USD values of input and output amounts.`}>
(<Trans>{formatPriceImpact(priceImpact)}</Trans>)
</MouseoverTooltip>
</span>
)}
</div>
)}
{priceImpact ? (
<span style={{ color: priceImpactColor }}>
{' '}
<MouseoverTooltip text={t`The estimated difference between the USD values of input and output amounts.`}>
(<Trans>{priceImpact.multiply(-1).toSignificant(3)}%</Trans>)
</MouseoverTooltip>
</span>
) : null}
</ThemedText.DeprecatedBody>
)
}

View File

@@ -0,0 +1,365 @@
import { Trans } from '@lingui/macro'
import { TraceEvent } from '@uniswap/analytics'
import { BrowserEvent, ElementName, EventName } from '@uniswap/analytics-events'
import { Currency, CurrencyAmount, Percent, Token } from '@uniswap/sdk-core'
import { Pair } from '@uniswap/v2-sdk'
import { useWeb3React } from '@web3-react/core'
import { AutoColumn } from 'components/Column'
import { LoadingOpacityContainer, loadingOpacityMixin } from 'components/Loader/styled'
import CurrencyLogo from 'components/Logo/CurrencyLogo'
import { isSupportedChain } from 'constants/chains'
import { darken } from 'polished'
import { ReactNode, useCallback, useEffect, useState } from 'react'
import { Lock } from 'react-feather'
import styled, { useTheme } from 'styled-components/macro'
import { flexColumnNoWrap, flexRowNoWrap } from 'theme/styles'
import { formatCurrencyAmount } from 'utils/formatCurrencyAmount'
import { ReactComponent as DropDown } from '../../assets/images/dropdown.svg'
import { useCurrencyBalance } from '../../state/connection/hooks'
import { ThemedText } from '../../theme'
import { ButtonGray } from '../Button'
import DoubleCurrencyLogo from '../DoubleLogo'
import { Input as NumericalInput } from '../NumericalInput'
import { RowBetween, RowFixed } from '../Row'
import CurrencySearchModal from '../SearchModal/CurrencySearchModal'
import { FiatValue } from './FiatValue'
const InputPanel = styled.div<{ hideInput?: boolean }>`
${flexColumnNoWrap};
position: relative;
border-radius: ${({ hideInput }) => (hideInput ? '16px' : '20px')};
z-index: 1;
width: ${({ hideInput }) => (hideInput ? '100%' : 'initial')};
transition: height 1s ease;
will-change: height;
`
const FixedContainer = styled.div`
width: 100%;
height: 100%;
position: absolute;
border-radius: 20px;
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
`
const Container = styled.div<{ hideInput: boolean }>`
min-height: 44px;
border-radius: ${({ hideInput }) => (hideInput ? '16px' : '20px')};
width: ${({ hideInput }) => (hideInput ? '100%' : 'initial')};
`
const CurrencySelect = styled(ButtonGray)<{
visible: boolean
selected: boolean
hideInput?: boolean
disabled?: boolean
}>`
align-items: center;
background-color: ${({ selected, theme }) => (selected ? theme.backgroundInteractive : theme.accentAction)};
opacity: ${({ disabled }) => (!disabled ? 1 : 0.4)};
box-shadow: ${({ selected }) => (selected ? 'none' : '0px 6px 10px rgba(0, 0, 0, 0.075)')};
color: ${({ selected, theme }) => (selected ? theme.textPrimary : theme.white)};
cursor: pointer;
height: unset;
border-radius: 16px;
outline: none;
user-select: none;
border: none;
font-size: 24px;
font-weight: 400;
width: ${({ hideInput }) => (hideInput ? '100%' : 'initial')};
padding: ${({ selected }) => (selected ? '4px 8px 4px 4px' : '6px 6px 6px 8px')};
gap: 8px;
justify-content: space-between;
margin-left: ${({ hideInput }) => (hideInput ? '0' : '12px')};
&:hover,
&:active {
background-color: ${({ theme, selected }) => (selected ? theme.backgroundInteractive : theme.accentAction)};
}
&:before {
background-size: 100%;
border-radius: inherit;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: '';
}
&:hover:before {
background-color: ${({ theme }) => theme.stateOverlayHover};
}
&:active:before {
background-color: ${({ theme }) => theme.stateOverlayPressed};
}
visibility: ${({ visible }) => (visible ? 'visible' : 'hidden')};
`
const InputRow = styled.div`
${flexRowNoWrap};
align-items: center;
justify-content: space-between;
`
const LabelRow = styled.div`
${flexRowNoWrap};
align-items: center;
color: ${({ theme }) => theme.textSecondary};
font-size: 0.75rem;
line-height: 1rem;
span:hover {
cursor: pointer;
color: ${({ theme }) => darken(0.2, theme.textSecondary)};
}
`
const FiatRow = styled(LabelRow)`
justify-content: flex-end;
min-height: 20px;
padding: 8px 0px 0px 0px;
`
const Aligner = styled.span`
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
`
const StyledDropDown = styled(DropDown)<{ selected: boolean }>`
margin: 0 0.25rem 0 0.35rem;
height: 35%;
margin-left: 8px;
path {
stroke: ${({ selected, theme }) => (selected ? theme.textPrimary : theme.white)};
stroke-width: 2px;
}
`
const StyledTokenName = styled.span<{ active?: boolean }>`
${({ active }) => (active ? ' margin: 0 0.25rem 0 0.25rem;' : ' margin: 0 0.25rem 0 0.25rem;')}
font-size: 20px;
font-weight: 600;
`
const StyledBalanceMax = styled.button<{ disabled?: boolean }>`
background-color: transparent;
border: none;
color: ${({ theme }) => theme.accentAction};
cursor: pointer;
font-size: 14px;
font-weight: 600;
opacity: ${({ disabled }) => (!disabled ? 1 : 0.4)};
padding: 4px 6px;
pointer-events: ${({ disabled }) => (!disabled ? 'initial' : 'none')};
:hover {
opacity: ${({ disabled }) => (!disabled ? 0.8 : 0.4)};
}
:focus {
outline: none;
}
`
const StyledNumericalInput = styled(NumericalInput)<{ $loading: boolean }>`
${loadingOpacityMixin};
text-align: left;
font-size: 36px;
line-height: 44px;
font-variant: small-caps;
`
interface SwapCurrencyInputPanelProps {
value: string
onUserInput: (value: string) => void
onMax?: () => void
showMaxButton: boolean
label?: ReactNode
onCurrencySelect?: (currency: Currency) => void
currency?: Currency | null
hideBalance?: boolean
pair?: Pair | null
hideInput?: boolean
otherCurrency?: Currency | null
fiatValue?: CurrencyAmount<Token> | null
priceImpact?: Percent
id: string
showCommonBases?: boolean
showCurrencyAmount?: boolean
disableNonToken?: boolean
renderBalance?: (amount: CurrencyAmount<Currency>) => ReactNode
locked?: boolean
loading?: boolean
}
export default function SwapCurrencyInputPanel({
value,
onUserInput,
onMax,
showMaxButton,
onCurrencySelect,
currency,
otherCurrency,
id,
showCommonBases,
showCurrencyAmount,
disableNonToken,
renderBalance,
fiatValue,
priceImpact,
hideBalance = false,
pair = null, // used for double token logo
hideInput = false,
locked = false,
loading = false,
...rest
}: SwapCurrencyInputPanelProps) {
const [modalOpen, setModalOpen] = useState(false)
const [fiatValueIsLoading, setFiatValueIsLoading] = useState(false)
const { account, chainId } = useWeb3React()
const selectedCurrencyBalance = useCurrencyBalance(account ?? undefined, currency ?? undefined)
const theme = useTheme()
const handleDismissSearch = useCallback(() => {
setModalOpen(false)
}, [setModalOpen])
const chainAllowed = isSupportedChain(chainId)
useEffect(() => {
!!value && !fiatValue ? setFiatValueIsLoading(true) : setFiatValueIsLoading(false)
}, [fiatValueIsLoading, value, fiatValue])
return (
<InputPanel id={id} hideInput={hideInput} {...rest}>
{locked && (
<FixedContainer>
<AutoColumn gap="sm" justify="center">
<Lock />
<ThemedText.DeprecatedLabel fontSize="12px" textAlign="center" padding="0 12px">
<Trans>The market price is outside your specified price range. Single-asset deposit only.</Trans>
</ThemedText.DeprecatedLabel>
</AutoColumn>
</FixedContainer>
)}
<Container hideInput={hideInput}>
<InputRow style={hideInput ? { padding: '0', borderRadius: '8px' } : {}}>
{!hideInput && (
<StyledNumericalInput
className="token-amount-input"
value={value}
onUserInput={onUserInput}
disabled={!chainAllowed}
$loading={loading}
/>
)}
<CurrencySelect
disabled={!chainAllowed}
visible={currency !== undefined}
selected={!!currency}
hideInput={hideInput}
className="open-currency-select-button"
onClick={() => {
if (onCurrencySelect) {
setModalOpen(true)
}
}}
>
<Aligner>
<RowFixed>
{pair ? (
<span style={{ marginRight: '0.5rem' }}>
<DoubleCurrencyLogo currency0={pair.token0} currency1={pair.token1} size={24} margin={true} />
</span>
) : currency ? (
<CurrencyLogo style={{ marginRight: '2px' }} currency={currency} size="24px" />
) : null}
{pair ? (
<StyledTokenName className="pair-name-container">
{pair?.token0.symbol}:{pair?.token1.symbol}
</StyledTokenName>
) : (
<StyledTokenName className="token-symbol-container" active={Boolean(currency && currency.symbol)}>
{(currency && currency.symbol && currency.symbol.length > 20
? currency.symbol.slice(0, 4) +
'...' +
currency.symbol.slice(currency.symbol.length - 5, currency.symbol.length)
: currency?.symbol) || <Trans>Select token</Trans>}
</StyledTokenName>
)}
</RowFixed>
{onCurrencySelect && <StyledDropDown selected={!!currency} />}
</Aligner>
</CurrencySelect>
</InputRow>
{Boolean(!hideInput && !hideBalance) && (
<FiatRow>
<RowBetween>
<LoadingOpacityContainer $loading={loading}>
<FiatValue fiatValue={fiatValue} priceImpact={priceImpact} isLoading={fiatValueIsLoading} />
</LoadingOpacityContainer>
{account ? (
<RowFixed style={{ height: '17px' }}>
<ThemedText.DeprecatedBody
color={theme.textSecondary}
fontWeight={400}
fontSize={14}
style={{ display: 'inline' }}
>
{!hideBalance && currency && selectedCurrencyBalance ? (
renderBalance ? (
renderBalance(selectedCurrencyBalance)
) : (
<Trans>Balance: {formatCurrencyAmount(selectedCurrencyBalance, 4)}</Trans>
)
) : null}
</ThemedText.DeprecatedBody>
{showMaxButton && selectedCurrencyBalance ? (
<TraceEvent
events={[BrowserEvent.onClick]}
name={EventName.SWAP_MAX_TOKEN_AMOUNT_SELECTED}
element={ElementName.MAX_TOKEN_AMOUNT_BUTTON}
>
<StyledBalanceMax onClick={onMax}>
<Trans>Max</Trans>
</StyledBalanceMax>
</TraceEvent>
) : null}
</RowFixed>
) : (
<span />
)}
</RowBetween>
</FiatRow>
)}
</Container>
{onCurrencySelect && (
<CurrencySearchModal
isOpen={modalOpen}
onDismiss={handleDismissSearch}
onCurrencySelect={onCurrencySelect}
selectedCurrency={currency}
otherSelectedCurrency={otherCurrency}
showCommonBases={showCommonBases}
showCurrencyAmount={showCurrencyAmount}
disableNonToken={disableNonToken}
/>
)}
</InputPanel>
)
}

Some files were not shown because too many files have changed in this diff Show More