Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(yield): fetch balances for LP-tokens #5005

Merged
merged 80 commits into from
Oct 29, 2024

Conversation

shoom3301
Copy link
Collaborator

@shoom3301 shoom3301 commented Oct 18, 2024

Summary

  1. Extracted VirtualList component in order to reuse it for LP-tokens list
  2. Added styles for the LP-token selector (figma)
  3. Added balances caching. Only >0 values are cached into localStorage
  4. Added balances and allowances fetching for LP-tokens. The fetching mechanism for LP is different:
  • it starts with 3 sec delay
  • it's longer, because it doesn't send all requests at once, but execute them one after another. We have to do that, because node starts answering 429 error due to too much requests
image

To Test

  1. In Yield widget, the token selector should display All, Pool tokens, CoW AMM only tabs
  2. Pool tokens should be displayed
  3. APR is hardcoded, tooltip is hardcoded, LP-token logo is not stylized yet

ZeroApprovalWarning and HighFeeWarning
… feat/vampire-attack-lp-tokens

# Conflicts:
#	apps/cowswap-frontend/src/modules/trade/containers/TradeWidget/TradeWidgetForm.tsx
#	apps/cowswap-frontend/src/modules/trade/containers/TradeWidgetLinks/styled.ts
@shoom3301
Copy link
Collaborator Author

@elena-zh

  1. I would spend time on special cases in Sepolia. The Yield feature is not really working in this network since there are not so much LPs. Since this is test-net I would keep it as it is.
  2. Fixed
  3. Fixed
  4. This wasn't specified, but I trust you. Changed the link
  5. Fixed
  6. I will implement the sorting in another PR
  7. Implemented in the next PR feat(yield): use lp-token in widget #5013
  8. Implemented in the next PR feat(yield): use lp-token in widget #5013
  9. Fixed in feat: modify pool token list layout #5014

@elena-zh
Copy link
Contributor

Hey @shoom3301 , everything is great besides geo-blocking feature: I still don't see these token lists from the blocked area:
image

* feat: add unlock screen for yield tab

* feat: add unlock screen for yield tab

* chore: revert

---------

Co-authored-by: Alexandr Kazachenko <[email protected]>
@shoom3301
Copy link
Collaborator Author

@elena-zh sorry, this case is fixed in the next pr: #5013

Copy link
Contributor

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved then!

Copy link
Collaborator

@alfetopito alfetopito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue I noticed, when I'm not connected the loading effect is playing
image

@shoom3301
Copy link
Collaborator Author

One issue I noticed, when I'm not connected the loading effect is playing image

Thank you! This is already fixed in another PR

@shoom3301 shoom3301 merged commit 2877df5 into develop Oct 29, 2024
11 of 12 checks passed
@shoom3301 shoom3301 deleted the feat/vampire-attack-lp-tokens branch October 29, 2024 08:30
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants