-
Notifications
You must be signed in to change notification settings - Fork 39
feat(frontend): Rename standard for EXT tokens #10875
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): Rename standard for EXT tokens #10875
Conversation
Co-authored-by: Copilot <[email protected]>
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.
Pull request overview
This PR renames the EXT token standard from 'extV2' to 'ext' across the frontend codebase. This change prepares for a future refactoring where the standard field will be transformed from an enum to an object, allowing for additional fields like version or subStandards.
Key Changes
- Updated token standard definition from 'extV2' to 'ext' in the schema
- Renamed utility functions from
isTokenExtV2/isTokenExtV2CustomTokentoisTokenExt/isTokenExtCustomToken - Updated all references to the standard value and utility functions across test files and implementation code
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frontend/src/lib/schema/token.schema.ts | Changed token standard enum value from 'extV2' to 'ext' |
| src/frontend/src/icp/utils/ext.utils.ts | Renamed utility functions isTokenExtV2 → isTokenExt and isTokenExtV2CustomToken → isTokenExtCustomToken, updated standard value in mapExtToken |
| src/frontend/src/icp/utils/token.utils.ts | Updated import and usage of renamed isTokenExt function |
| src/frontend/src/icp/utils/ic-send.utils.ts | Updated import and usage of renamed isTokenExt function |
| src/frontend/src/icp/services/nft-send.services.ts | Updated import and usage of renamed isTokenExt function |
| src/frontend/src/icp/services/ext.services.ts | Updated standard value from 'extV2' to 'ext' in token mapping |
| src/frontend/src/lib/utils/tokens.utils.ts | Updated import and two usages of renamed isTokenExt function |
| src/frontend/src/lib/utils/nft.utils.ts | Updated import and two usages of renamed isTokenExt function |
| src/frontend/src/lib/stores/default-tokens.store.ts | Updated import and usage of renamed isTokenExt function |
| src/frontend/src/lib/stores/custom-tokens.store.ts | Updated import and usage of renamed isTokenExt function |
| src/frontend/src/lib/services/nft.services.ts | Updated import and usage of renamed isTokenExtCustomToken function |
| src/frontend/src/lib/components/tokens/EnableTokenToggle.svelte | Updated import and usage of renamed isTokenExtCustomToken function |
| src/frontend/src/tests/mocks/ext-tokens.mock.ts | Updated mock token standard values from 'extV2' to 'ext' |
| src/frontend/src/tests/lib/stores/custom-tokens.store.spec.ts | Updated test mock standard value from 'extV2' to 'ext' |
| src/frontend/src/tests/lib/schema/token.schema.spec.ts | Updated test mock standard value from 'extV2' to 'ext' |
| src/frontend/src/tests/icp/utils/ext.utils.spec.ts | Renamed test suite and updated imports/usages of renamed functions and standard values |
| src/frontend/src/tests/icp/services/ext.service.spec.ts | Updated test mock standard values from 'extV2' to 'ext' |
| src/frontend/src/tests/icp/services/ext-add-custom-tokens.service.spec.ts | Updated test mock standard value from 'extV2' to 'ext' |
| src/frontend/src/tests/icp/schema/ext-token.schema.spec.ts | Updated test mock standard value from 'extV2' to 'ext' |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Motivation
We are going to transform the
standardfield of aTokentype from anenumto anobject(so that we can extend it with other fields likeversionorsubStandards).So, we can simply define the standard of EXT tokens as
extand specify the version after.