-
Notifications
You must be signed in to change notification settings - Fork 30
fix(frontend): Token group with disabled native token network should not display CK icon name and symbol #5795
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
base: main
Are you sure you want to change the base?
Conversation
…2E-tests-final-step
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the future development (including more networks) and to have a global solution, I suggest that we tackle this issue in a different way. Let's create a common prop inside Token
(or maybe TokenUI
) type
groupingData: {
symbol,
icon,
name
}
so, we create base grouping data objects (like USDC, ETH, or similars) and add it to all the existing tokens where required. So, when we group, instead of using twinTokens for ICRC, and other props for the rest, we use this directly for all tokens (if present).
WDYT?
…x(frontend)/token-group-ck
…to fix(frontend)/token-group-ck
…to fix(frontend)/token-group-ck
…to fix(frontend)/token-group-ck
…x(frontend)/token-group-ck
…to fix(frontend)/token-group-ck
This reverts commit c199292.
Motivation
When we disable the network for the native token of a token group, but there still is another token that gets grouped with the CK token, the icon, name and symbol of the group shows the CK tokens data which isnt correct.
Changes
groupData
prop on the tokens. This will decide what group icon, name and symbol will be displayed when the token forms a group in the homepage token list. In the future we could also use this to define how groups should be formed instead of figuring it out based on token data as it is now.TokenCard
andTokenCardGroup
to now display thegroupData
info when rendering theTokenCard
with propasGroup
groupData
prop to schemas forToken
andIcCkInterface
Tests
Before:

After:
