Skip to content

Remove Crab chain support#42

Merged
helixboxman merged 1 commit intomainfrom
bear-cleanup-crab
Jan 28, 2026
Merged

Remove Crab chain support#42
helixboxman merged 1 commit intomainfrom
bear-cleanup-crab

Conversation

@boundless-forest
Copy link
Member

No description provided.

- 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.
Copilot AI review requested due to automatic review settings January 28, 2026 09:10
@github-actions
Copy link

---
Commit: 556e99e
Preview: https://migration-n4dl6jeqf-itering.vercel.app

Copy link

Copilot AI left a 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 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.

@helixboxman helixboxman merged commit e3633b8 into main Jan 28, 2026
11 checks passed
@helixboxman helixboxman deleted the bear-cleanup-crab branch January 28, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants