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(portfolio): implement token cards relationship management #6183

Merged
merged 3 commits into from
Jan 20, 2025

Conversation

yhabib
Copy link
Contributor

@yhabib yhabib commented Jan 17, 2025

Motivation

There is a relationship between the HeldTokensCard and the StakedTokensCard. Based on this relationship, we display or hide an additional row with a static message to achieve visual balance between the heights of the cards.
The logic for this can be found in #6181.

Live demo can be found here

Changes

  • Updates HeldTokensCard to receive the number of staked tokens and determine whether to display the InfoRow.
  • Updates the Portfolio page to provide the number of staked tokens to HeldTokens.
  • Updates StakedTokensCard to utilize a new utility function for deciding whether to display the InfoRow.
  • Includes some minor CSS changes.

Tests

  • Update tests based on the new logic

Todos

  • Add entry to changelog (if necessary).
    Not necessary

@yhabib yhabib marked this pull request as ready for review January 17, 2025 16:01
@yhabib yhabib requested a review from a team as a code owner January 17, 2025 16:01
Copy link
Contributor

@mstrasinskis mstrasinskis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Base automatically changed from nns1-3520/utility-for-info-row to main January 18, 2025 15:47
@yhabib yhabib force-pushed the nns1-3520/cards-relationship branch from b554cb7 to c580708 Compare January 20, 2025 05:41
@yhabib yhabib enabled auto-merge January 20, 2025 05:52
@yhabib yhabib added this pull request to the merge queue Jan 20, 2025
Merged via the queue into main with commit 9e7e147 Jan 20, 2025
32 checks passed
@yhabib yhabib deleted the nns1-3520/cards-relationship branch January 20, 2025 06:13
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