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

✨ Implement incentives to all remaining components #2308

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

MartinGbz
Copy link
Contributor

@MartinGbz MartinGbz commented Jan 7, 2025

General Changes

This PR adds all the incentives (lm, merit, zksync ignite) on all remaining, ie:

  • Supply Info
  • Borrow Info
  • Supply Modal
  • Borrow Modal
  • Collateral Swap Modal
  • Debt Swap Modal

It also move the "No APRs incentives tooltips" (like Spark airdrop or Superfest) from the asset name to the APRs.
So all incentives are now gather at the same place (aprs or not aprs), and it will also simplify the process of adding new "no aprs incentives" in the future.

It also fix 3 issues:

  • switch collateral/debt modal: If you switched from an incentivized asset to another one, no issue. But if you switched from a non-incentivized asset to a incentivized one, you will have no Reward APR display.
  • switch debt modal: 2 same source asset lm aprs were displayed (not the source and target asset were displayed)
  • ZKSync Ignite borrow APRs (even if for now no borrow aprs is available) wasn't showing up in the "Your borrows" section (but displayed in the "Assets to borrow" section. This is because a variableDebtTokenAddress get from the reserve were undefined. Use the reserve.variableDebtTokenAddress fix this issue (more info in this commit: 25a1cf0)

You can test all the cases on all Modals/Infos by mocking API returns, but here's a few screenshots of the preview:

Supply Info:

Capture d’écran 2025-01-07 à 10 43 38

Switch Supply Modal:

Capture d’écran 2025-01-07 à 16 14 36

Switch Debt Modal:

Capture d’écran 2025-01-08 à 12 18 39

Supply Modal:

Capture d’écran 2025-01-08 à 13 39 13

Borrow Modal:

Capture d’écran 2025-01-08 à 13 39 04

SPK tooltip:

Capture d’écran 2025-01-08 à 14 15 32

Developer Notes

Created a new IncentivesBox component that can be used everywhere in the app.
So we only need to define any new incentive type in this component, and it will be display everywhere else.

Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • End-to-end tests are passing without any errors
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)

Copy link

height bot commented Jan 7, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
interface-ez7q ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 8, 2025 1:21pm

Copy link

vercel bot commented Jan 7, 2025

@MartinGbz is attempting to deploy a commit to the Avara Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant