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

fix(frontend): fix hide zeros filter #4200

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

Conversation

BonomoAlessandro
Copy link
Collaborator

@BonomoAlessandro BonomoAlessandro commented Jan 13, 2025

Motivation

If a user who is not invested in ck tokens activates the Hide zeros option, these tokens disappear. But the user should always know, that there is an option to invest in cks. This means if there is a token group and at least one of the tokens do have a balance, display the whole group.

Changes

  • updates filter logic

Tests

before:
image

image

after:
image

image

@BonomoAlessandro BonomoAlessandro marked this pull request as ready for review January 13, 2025 14:18
@BonomoAlessandro BonomoAlessandro requested a review from a team as a code owner January 13, 2025 14:18
];

return checks.some((check) => check());
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we not use the Number(balance ?? 0n) || (usdBalance ?? 0) || $showZeroBalances logic? Will it not work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@AntonioVentilii you are right. This is much better

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