Merged
Conversation
- Implemented getInitialWalletParamsFromUrlSearch to handle network and account parameters from URL search. - Added unit tests for getInitialWalletParamsFromUrlSearch to cover various scenarios including unsupported networks and missing parameters. - Set up testing environment with jest-dom for better assertions in tests.
|
--- |
There was a problem hiding this comment.
Pull request overview
This PR removes Crab chain support from the app and introduces a small testing setup to validate new URL-based network selection behavior.
Changes:
- Drops Crab network configuration, assets, and UI conditionals, leaving Darwinia as the only supported network in the app.
- Refactors header initialization logic into a reusable helper that derives initial network/account from URL search params, and adds Vitest-based unit tests for this logic.
- Adds a basic Vitest + Testing Library + jsdom setup for the app package.
Reviewed changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
yarn.lock |
Adds dependency entries for Vitest, Testing Library, jsdom, and their transitive dependencies required by the new test setup. |
packages/app/vite.config.ts |
Extends the Vite config with a test block for Vitest (jsdom environment, setup file, globals). |
packages/app/src/test/setup.ts |
Registers @testing-library/jest-dom matchers globally for Vitest. |
packages/app/src/pages/MultisigAccountMigrationSummary.tsx |
Removes the “How to migrate” Crab-specific footer link from the migration summary page. |
packages/app/src/components/TokensBalanceSummary/index.tsx |
Simplifies token icon handling by always using generic RING/KTON icons, removing Crab-specific icons and logic. |
packages/app/src/components/MultisigMigrationStatus/index.tsx |
Removes Crab-specific “How to migrate” footer link from multisig migration status component. |
packages/app/src/components/MultisigMigrationProgressTabs/index.tsx |
Removes Crab/CKTON icons and hard-codes token icons to generic RING/KTON while retaining commented-out asset UI. |
packages/app/src/components/MultisigMigrationProcess/index.tsx |
Removes Crab-specific “How to migrate” footer link from multisig migration process view. |
packages/app/src/components/MigrationSummary/index.tsx |
Cleans up unused imports (Crab-related icons, helpers) and delegates balance display to TokensBalanceSummary. |
packages/app/src/components/MigrationStatus/index.tsx |
Drops Crab/CKTON icons and forces migration status UI to use generic RING/KTON icons. |
packages/app/src/components/MigrationProcess/index.tsx |
Removes Crab-specific “How to migrate” footer link from the single-account migration process view. |
packages/app/src/components/Header/index.tsx |
Replaces inline URL-parsing logic (including Crab-as-default) with a helper that picks the first supported network (now Darwinia) and optionally preselects an account. |
packages/app/src/components/Header/getInitialWalletParamsFromUrlSearch.ts |
New helper that parses network and account from the query string, defaulting to the first supported network or undefined if none. |
packages/app/src/components/Header/__tests__/getInitialWalletParamsFromUrlSearch.test.ts |
New Vitest test file covering fallback/default behavior and matching behavior for getInitialWalletParamsFromUrlSearch. |
packages/app/src/assets/images/crab.svg |
Removes the Crab logo asset. |
packages/app/src/assets/images/ckton.svg |
Removes the CKTON logo asset. |
packages/app/package.json |
Adds Vitest + watch script and devDependencies (vitest, Testing Library, jsdom) for React/component testing. |
packages/app-utils/src/others.ts |
Updates comment on createMultiSigAccount to remove hard-coded Crab/Pangoro prefix mention and describe the generic prefix usage. |
packages/app-types/src/wallet.ts |
Updates ChainName union to remove "Crab", keeping "Pangolin", "Darwinia", and "Pangoro". |
packages/app-config/src/supportedNetworks.ts |
Changes supportedNetworks to include only darwinia, effectively dropping Crab from selectable networks in the UI. |
packages/app-config/src/chains/crab.ts |
Removes the Crab chain configuration entirely. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fewensa
approved these changes
Jan 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.