-
Notifications
You must be signed in to change notification settings - Fork 20
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(frontend): add burn icrc token from json #3523
base: main
Are you sure you want to change the base?
Conversation
… overview for canisters that are no sns
Object.entries(icrcTokens).reduce( | ||
(acc, [key, value]) => ({ | ||
...acc, | ||
...((STAGING || BETA || PROD) && |
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.
I am not really sure I understand this condition: why only these envs? and why do you use the function for only the production tokens if STAGING is acceptable too? should it be only BETA and PROD?
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.
Why only these env vars?
Because it somehow seems to matter here:
const mapCkErc20Data = ({ |
So i thought it might also matter for this mapping
Why I only use it for the production tokens?
I could add a line like this:
const ADDITIONAL_ICRC_STAGING_DATA = mapIcrcData(additionalIcrcTokensStaging);
but because there is no staging token that we want to read right now, this variable will be unused. So i think is better to introduce it when it's needed.
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.
ah understood! thank you for the explanation! then, shouldn't the check be only for BETA and PROD?
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.
I don't feel strongly about this as I just replicated the existing pattern, i'll remove the staging for now
@AntonioVentilii can you take another look so that we get this in today? |
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.
good one! however, the tests should be for each env, so that if at some point we change something, they fail
Motivation
We add the additional icrc token "BURN".
Changes
Tests
In discussion with @AntonioVentilii-DFINITY I aimed for manual testing because testing this functionality in a unit test would include multiple stores and a deeper knowledge of how they work together.
Acceptance criteria:
User w/o the token: user does not see the token in the list, and sees the token in the list settings and can enable it
2650331
Bildschirmaufnahme.2024-11-14.um.16.04.46.mov
User w/ the token, a balance, active: User still sees the token and the balance in the list. and only once in “manage list” and can enable it
2650332
Bildschirmaufnahme.2024-11-14.um.16.06.46.mov
User w/ the token, a balance, inactive: User does not see the token in the list. and only once in “manage list” and can enable it
2650334
Bildschirmaufnahme.2024-11-14.um.16.08.16.mov