-
Notifications
You must be signed in to change notification settings - Fork 39
refactor(frontend): Rename Token Standard type #10871
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
refactor(frontend): Rename Token Standard type #10871
Conversation
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 performs a systematic rename of the TokenStandard type to TokenStandardCode across the frontend codebase. The motivation is to prepare for transforming the standard field from an enum to an object structure that can include additional properties like version or subStandards. The name "TokenStandardCode" better reflects that this represents the code/symbol of a standard, rather than the standard itself.
- Renamed the Zod schema from
TokenStandardSchematoTokenStandardCodeSchema - Updated the TypeScript type from
TokenStandardtoTokenStandardCode - Updated all imports, type annotations, and usages across 18+ files including tests, components, services, and utilities
Reviewed changes
Copilot reviewed 22 out of 22 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 |
Renamed TokenStandardSchema to TokenStandardCodeSchema |
src/frontend/src/lib/types/token.ts |
Renamed TokenStandard type to TokenStandardCode and updated related types |
src/frontend/src/lib/utils/token.utils.ts |
Updated function parameter types from TokenStandard to TokenStandardCode |
src/frontend/src/lib/stores/send.store.ts |
Updated store type definitions to use TokenStandardCode |
src/frontend/src/lib/services/token.services.ts |
Updated service parameter types to use TokenStandardCode |
src/frontend/src/lib/types/ai-assistant.ts |
Updated AI assistant types to use TokenStandardCode |
src/frontend/src/lib/components/address/DestinationWizardStep.svelte |
Updated component prop types to use TokenStandardCode |
src/frontend/src/icp/utils/ic-send.utils.ts |
Updated utility function parameter types to use TokenStandardCode |
src/frontend/src/icp/stores/receive-token.store.ts |
Updated store context types to use TokenStandardCode |
src/frontend/src/icp/components/send/IcSendDestination.svelte |
Updated component prop types to use TokenStandardCode |
src/frontend/src/icp-eth/derived/cketh.derived.ts |
Updated derived store types to use TokenStandardCode |
src/frontend/src/eth/types/erc721.ts |
Updated ERC721 type definitions to use TokenStandardCode |
src/frontend/src/eth/types/erc20.ts |
Updated ERC20 type definitions to use TokenStandardCode |
src/frontend/src/eth/types/erc1155.ts |
Updated ERC1155 type definitions to use TokenStandardCode |
src/frontend/src/eth/services/eth-transactions.services.ts |
Updated service parameter types to use TokenStandardCode |
src/frontend/src/eth/providers/alchemy.providers.ts |
Updated provider type annotations to use TokenStandardCode |
src/frontend/src/tests/lib/schema/token.schema.spec.ts |
Updated test suite name and references to use TokenStandardCodeSchema |
src/frontend/src/tests/lib/utils/token.utils.spec.ts |
Updated test variable types to use TokenStandardCode |
src/frontend/src/tests/icp/utils/icrc.utils.spec.ts |
Updated test type assertions to use TokenStandardCode |
src/frontend/src/tests/icp/utils/ext.utils.spec.ts |
Updated test type assertions to use TokenStandardCode |
src/frontend/src/tests/eth/services/erc-custom-tokens.services.spec.ts |
Updated test type assertions to use TokenStandardCode |
src/frontend/src/sol/services/worker.sol-wallet.services.ts |
Contains unrelated changes for worker message handling and iOS-specific worker singleton logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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).But first, we need to rename the existing type for
TokenStandard: the idea is that value is thesymbolof thestandard: