Skip to content

chore(wallet): remove cosmos-kit integration and deps from deploy-web#3313

Open
baktun14 wants to merge 3 commits into
mainfrom
chore/deploy-web-remove-cosmos-kit
Open

chore(wallet): remove cosmos-kit integration and deps from deploy-web#3313
baktun14 wants to merge 3 commits into
mainfrom
chore/deploy-web-remove-cosmos-kit

Conversation

@baktun14

@baktun14 baktun14 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Why

Closes CON-259

deploy-web is now managed-wallet only (self-custody lives in the separate Console Air app per AEP-84). The entire cosmos-kit wallet-connection stack was dead code: nothing outside it imported useChain/useManager/the wallet modal/the chain configs, and all signing already goes server-side via TxHttpService. Keeping these packages installed only bloated the bundle.

What

Removed the dead cosmos-kit stack and its dependencies from deploy-web:

  • Deleted the cosmos-kit-jotai abstraction layer, the src/chains/* chain-registry configs, and the no-op CustomChainProvider bootstrap wrapper (unwrapped from _app.tsx).
  • Uninstalled @cosmos-kit/core, @cosmos-kit/react, @cosmos-kit/keplr, @cosmos-kit/cosmostation-extension, @cosmos-kit/cosmos-extension-metamask, chain-registry, @chain-registry/types, and @interchain-ui/react (33 packages removed from the lockfile).
  • Removed the now-dead NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID env var.

Scope note on @cosmjs/* (descoped AC)

The AC item "searching for @cosmjs returns zero matches" is not addressed here and is intentionally deferred. @cosmjs/* is still required by the managed flow — customRegistry.ts (consumed by TxHttpService) builds the tx Registry from @cosmjs/proto-signing + @cosmjs/stargate, plus EncodeObject/Decimal/base64 usage. The issue author already flagged this with "verify; TransactionMessageData may still need EncodeObject". Removing @cosmjs requires the API to own transaction building+signing first, now tracked as follow-ups:

  • CON-477 — Build and sign managed-wallet transactions entirely in the API
  • CON-478 — Remove blockchain message construction from the deploy-web frontend (blocked by CON-477; finally satisfies the @cosmjs criterion)

Verification

  • grep @cosmos-kit / chain-registry / @interchain-ui / cosmos-kit-jotai in apps/deploy-web/src0 matches
  • tsc, lint --quiet, unit tests, next build all pass (the only pre-existing tsc/test failures on main are unrelated and unchanged by this PR)

Bundle size (before → after next build)

Artifact Before (main) After
pages/_app chunk (raw) 5.92 MB 5.02 MB (−0.90 MB, ~15%)
pages/_app source map 19 MB 15.8 MB

Summary by CodeRabbit

Release Notes

  • Refactor
    • Removed the integrated wallet modal/connect flow and related chain-store setup from the app.
    • Discontinued Akash network support (mainnet, sandbox, and testnet), including related chain listings.
  • Chores
    • Updated authentication configuration (Auth0 audience/scope).
    • Added Sentry error tracking and removed WalletConnect project configuration.
    • Refreshed deploy-web dependencies.
  • Tests
    • Removed wallet/chain-store component and hook test coverage.
  • Style
    • Updated global font styling for the app shell.

Delete the dead cosmos-kit wallet-connection stack (cosmos-kit-jotai
abstraction, chain-registry configs, and the no-op CustomChainProvider
bootstrap wrapper) now that deploy-web is managed-wallet only, and
uninstall the cosmos-kit / chain-registry / interchain-ui packages.

@cosmjs/* is intentionally retained: it is still required for tx-message
building in customRegistry/TxHttpService. Removing it depends on moving
transaction construction and signing into the API (tracked separately).

Ref CON-259
@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d2223219-3f01-47ae-9932-52eb90987a6c

📥 Commits

Reviewing files that changed from the base of the PR and between a2c9cc8 and 470796f.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • apps/deploy-web/package.json
💤 Files with no reviewable changes (1)
  • apps/deploy-web/package.json

📝 Walkthrough

Walkthrough

Removes the cosmos-kit-jotai wallet infrastructure from apps/deploy-web by dropping wallet-related npm packages and dependencies; unwires CustomChainProvider from the app's provider tree; and applies GeistSans typography to the root HTML element.

Changes

cosmos-kit-jotai wallet stack removal and styling update

Layer / File(s) Summary
Dependency and environment variable updates
apps/deploy-web/package.json, apps/deploy-web/env/.env
Removes @cosmos-kit/*, @interchain-ui/react, chain-registry, @chain-registry/types from dependencies. Replaces NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID with AUTH0_AUDIENCE, AUTH0_SCOPE, and NEXT_PUBLIC_SENTRY_DSN.
App provider tree unwiring and store cleanup
apps/deploy-web/src/pages/_app.tsx, apps/deploy-web/src/lib/cosmos-kit-jotai/store/constants.ts
Removes CustomChainProvider import and wrapper from _app.tsx, unwiring the wallet provider. Removes CURRENT_WALLET_KEY constant from store.
GeistSans font configuration
apps/deploy-web/src/pages/_document.tsx, apps/deploy-web/src/styles/index.css
Applies GeistSans.variable to root <Html> element and adds font-family: var(--font-geist-sans) CSS property to html selector.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

ignore-apps-deps-scan

Suggested reviewers

  • stalniy
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/deploy-web-remove-cosmos-kit

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread package-lock.json
@@ -543,18 +543,12 @@
"@cosmjs/math": "~0.38.0",

@github-actions github-actions Bot Jun 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔄 Carefully review the package-lock.json diff

Resolve the comment if everything is ok

- apps/deploy-web/node_modules/@cosmjs/amino                                               0.38.1  
- apps/deploy-web/node_modules/@cosmjs/crypto                                              0.38.1  
- apps/deploy-web/node_modules/@cosmjs/utils                                               0.38.1  
- apps/deploy-web/node_modules/@cosmos-kit/react                                           2.24.1  
- apps/deploy-web/node_modules/@cosmos-kit/react/node_modules/@chain-registry/types        0.46.15 
- apps/deploy-web/node_modules/@cosmos-kit/react/node_modules/@cosmjs/amino                0.32.4  
- apps/deploy-web/node_modules/@cosmos-kit/react/node_modules/@cosmjs/crypto               0.32.4  
- apps/deploy-web/node_modules/@cosmos-kit/react/node_modules/@cosmjs/encoding             0.32.4  
- apps/deploy-web/node_modules/@cosmos-kit/react/node_modules/@cosmjs/math                 0.32.4  
- apps/deploy-web/node_modules/@cosmos-kit/react/node_modules/@cosmjs/proto-signing        0.32.4  
- apps/deploy-web/node_modules/@cosmos-kit/react/node_modules/@cosmjs/utils                0.32.4  
- apps/deploy-web/node_modules/@cosmos-kit/react/node_modules/@cosmos-kit/react-lite       2.18.1  
- apps/deploy-web/node_modules/@cosmos-kit/react/node_modules/@dao-dao/cosmiframe          1.0.0   
- apps/deploy-web/node_modules/@interchain-ui/react                                        1.26.3  
- apps/deploy-web/node_modules/@noble/ciphers                                              1.3.0   
- apps/deploy-web/node_modules/@noble/curves                                               1.9.7   
- node_modules/appwrite                                                                    14.0.1  
- node_modules/appwrite/node_modules/cross-fetch                                           3.1.5   
- node_modules/appwrite/node_modules/node-fetch                                            2.6.7   
- node_modules/@cosmos-kit/cosmos-extension-metamask                                       0.15.1  
- node_modules/@cosmos-kit/cosmostation-extension                                          2.18.1  
- node_modules/@cosmos-kit/keplr                                                           2.17.1  
- node_modules/@cosmsnap/snapper                                                           0.2.7   
- node_modules/@cosmsnap/snapper/node_modules/@cosmjs/amino                                0.31.3  
- node_modules/@cosmsnap/snapper/node_modules/@cosmjs/crypto                               0.31.3  
- node_modules/@cosmsnap/snapper/node_modules/@cosmjs/encoding                             0.31.3  
- node_modules/@cosmsnap/snapper/node_modules/@cosmjs/math                                 0.31.3  
- node_modules/@cosmsnap/snapper/node_modules/@cosmjs/utils                                0.31.3  
- node_modules/@cosmsnap/snapper/node_modules/@keplr-wallet/proto-types                    0.12.12 
- node_modules/isomorphic-form-data                                                        2.0.0   
- node_modules/isomorphic-form-data/node_modules/form-data                                 2.5.1   
- node_modules/@keplr-wallet/types                                                         0.12.12 
- node_modules/@keplr-wallet/types/node_modules/long                                       4.0.0   
- node_modules/node-appwrite                                                               14.1.0  
- node_modules/node-fetch-native-with-agent                                                1.7.2   
- node_modules/ses                                                                         0.18.4  
- node_modules/@vanilla-extract/css-utils                                                  0.1.6   

@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.85%. Comparing base (d3c1ed3) to head (470796f).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3313      +/-   ##
==========================================
+ Coverage   68.81%   68.85%   +0.03%     
==========================================
  Files        1096     1080      -16     
  Lines       26837    26482     -355     
  Branches     6435     6366      -69     
==========================================
- Hits        18468    18233     -235     
+ Misses       7326     7223     -103     
+ Partials     1043     1026      -17     
Flag Coverage Δ
api 84.83% <ø> (ø)
deploy-web 53.78% <ø> (-0.31%) ⬇️
log-collector 85.85% <ø> (ø)
notifications 91.44% <ø> (ø)
provider-console 81.38% <ø> (ø)
provider-inventory 84.98% <ø> (ø)
provider-proxy 86.37% <ø> (ø)
tx-signer 78.37% <ø> (ø)
see 3 files with indirect coverage changes
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

baktun14 added 2 commits June 13, 2026 20:36
Modals/popups render in a portal at document.body, outside the app's
<main> that carries GeistSans.variable, so --font-geist-sans was
undefined there and they fell back to the browser serif default. This
was previously masked by a global font injected by @interchain-ui,
which was removed alongside cosmos-kit. Define the font variable on
<Html> and set an explicit body font-family so portaled content
inherits Geist.
@cosmjs/amino was only pulled in by the removed cosmos-kit signing
code; knip flags it as an unused devDependency. Remove it to keep the
dependency set clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant