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: augment runtime LP tokens metadata from Portals #7675

Merged
merged 17 commits into from
Sep 10, 2024

Conversation

gomesalexandre
Copy link
Contributor

@gomesalexandre gomesalexandre commented Sep 2, 2024

Description

Rationale: While attempting to tackle #730, I noticed Zapper was already giving us the LP tokens data we need, and all we needed was to route using isPool criteria.
Easy? As it usually goes, not exactly. After debugging things out and accomodating the Zapper parser with its parsing, I noticed the routing still wasn't working for some assets, but was working for others. The reason for that is if we are missing an asset in generatedAssetData.json (which we may), but have it in the portfolio, we'll leverage unchained to upsert its minimal version - minimal in this context meaning on-chain symbol, name, etc. No image, nothing fancy.

This PR ensures we leverage Portals data for said assets whenever possible, in preparation for the actual routing in a follow-up.

Issue (if applicable)

Risk

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Testing

This one assumes you have some LP tokens which are not present in the current Portals assets in the store. I tested this myself with Trader Joe BNB/AVAX i.e 0xeb8eb6300c53c3addbb7382ff6c6fbc4165b0742

  • Ensure asset icons look sane for pool assets that are not present in generatedAssetData.json
  • Ensure asset name looks sane and follows our LP terminology

Engineering

Operations

  • 🏁 My feature is behind a flag and doesn't require operations testing (yet)

Screenshots (if applicable)

Tested against develop (right):

image

@gomesalexandre gomesalexandre changed the title [skip ci] wip: augment runtime LP tokens metadata from Portals feat: augment runtime LP tokens metadata from Portals Sep 3, 2024
@gomesalexandre gomesalexandre marked this pull request as ready for review September 3, 2024 10:00
@gomesalexandre gomesalexandre requested a review from a team as a code owner September 3, 2024 10:00
@0xean 0xean requested a review from kaladinlight September 3, 2024 22:29
Copy link
Contributor

@kaladinlight kaladinlight left a comment

Choose a reason for hiding this comment

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

image

removed select asset from generated assets and confirmed detection and asset upsert on load and via websocket.

approving in knowing there will be a follow up to further cleanup any duplication, align logic in src/lib/portals and update to react query as required for markets page.

@gomesalexandre gomesalexandre enabled auto-merge (squash) September 10, 2024 22:13
@gomesalexandre gomesalexandre merged commit ac7d454 into develop Sep 10, 2024
3 checks passed
@gomesalexandre gomesalexandre deleted the feat_portals_lp_defi branch September 10, 2024 22:20
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.

2 participants