Skip to content

fix(wallet): remove Leap wallet integration#3064

Open
baktun14 wants to merge 4 commits intomainfrom
fix/wallet-remove-leap-wallet
Open

fix(wallet): remove Leap wallet integration#3064
baktun14 wants to merge 4 commits intomainfrom
fix/wallet-remove-leap-wallet

Conversation

@baktun14
Copy link
Copy Markdown
Contributor

@baktun14 baktun14 commented Apr 15, 2026

Why

Fixes CON-182

Leap is sunsetting their wallet extension. This PR removes all Leap wallet integration from the codebase.

What

  • Removed @cosmos-kit/leap and @cosmos-kit/leap-extension dependencies from deploy-web and provider-console
  • Removed @leapwallet/elements liquidity modal (swap/bridge/fiat on-ramp) and its CSS
  • Removed Leap from wallet connection arrays in both apps' CustomChainProvider
  • Removed LeapElements global type declaration
  • Removed Leap-specific analytics events (leap_get_more_tokens, leap_tx_complete)
  • Removed @leapwallet/elements script/stylesheet tags from get-started pages
  • Renamed E2E test wallet mock from Leap to Keplr (initLeapWebWalletMockinitKeplrWebWalletMock)
  • Updated connectWalletViaLeapconnectWalletViaKeplr in test fixtures
  • Removed Leap extension storage restore helpers and unused test utilities
  • Cleaned up .npmrc (removed @leapwallet registry), .gitignore, and ESLint config
  • Updated QA checklist docs to remove Leap references

Summary by CodeRabbit

  • Changes
    • Removed Leap wallet integration; Keplr is now the primary wallet option and related UI/assets removed
    • Removed Leap analytics events
  • Chores
    • Removed Leap-related dependencies and cleared a scoped npm registry override
  • Style
    • Removed obsolete Leap-related CSS and global type declarations
  • Tests
    • Updated UI test fixtures to use Keplr and added Get Started component tests
  • Documentation
    • Updated QA checklist to list Keplr/Cosmostation as custodial options

Leap is sunsetting their wallet extension. Remove all Leap-related code
including wallet connections, @leapwallet/elements liquidity modal,
analytics events, CSS styles, test fixtures, and package dependencies
from both deploy-web and provider-console apps.

Fixes CON-182
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

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: 08055ee2-77e6-42d6-ab80-1f0647bc7f21

📥 Commits

Reviewing files that changed from the base of the PR and between ffde128 and c4e6b7e.

📒 Files selected for processing (1)
  • apps/deploy-web/src/components/get-started/GetStartedStepper.spec.tsx
✅ Files skipped from review due to trivial changes (1)
  • apps/deploy-web/src/components/get-started/GetStartedStepper.spec.tsx

📝 Walkthrough

Walkthrough

Removed Leap wallet integration across the repo: deleted the LiquidityModal, removed Leap deps and registry override, stripped Leap types/CSS/analytics, updated provider wallets, and replaced Leap flows with Keplr in tests and mocks.

Changes

Cohort / File(s) Summary
Dependencies & Registry
\.npmrc, apps/deploy-web/package.json, apps/provider-console/package.json
Removed @leapwallet npm scope override and removed @cosmos-kit/leap / @cosmos-kit/leap-extension dependencies.
Deleted Component
apps/deploy-web/src/components/liquidity-modal/index.tsx
Removed the entire Leap LiquidityModal component and its exports.
Get Started / Stepper
apps/deploy-web/src/components/get-started/GetStartedStepper.tsx, apps/deploy-web/src/pages/get-started/index.tsx, apps/provider-console/src/pages/get-started/index.tsx
GetStartedStepper now accepts injected dependencies instead of directly using Leap hooks; pages no longer inject Leap Elements CSS/UMD script.
Wallet Provider Configuration
apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx, apps/provider-console/src/context/CustomChainProvider/CustomChainProvider.tsx
Removed Leap/Leap-extension from configured wallets and related window/global augmentation and detection logic.
Tests & Mocks
apps/deploy-web/tests/ui/fixture/*, apps/deploy-web/tests/ui/fixture/web-wallet/*
Replaced Leap extension flows with Keplr: renamed mocks and helpers, updated injected events, removed Leap-specific setup/import helpers.
Types & Styles
apps/deploy-web/src/types/global.ts, apps/deploy-web/src/styles/index.css, apps/provider-console/src/styles/index.css
Removed Window.LeapElements augmentation and Leap-specific CSS selectors/rules.
Analytics
apps/deploy-web/src/services/analytics/analytics.service.ts
Removed leap_get_more_tokens and leap_tx_complete from AnalyticsEvent union and GA mapping.
Linting & Ignore
packages/dev-config/.eslintrc.base.js, .gitignore
Removed Leap from ESLint import-x settings and removed a gitignore pattern for Leap Playwright fixture files.
Docs & QA
doc/e2e-manual-qa-checklist.md
Replaced “Leap” with “Cosmostation” in custodial wallet coverage text and connection-flow checklist.
Tests added
apps/deploy-web/src/components/get-started/GetStartedStepper.spec.tsx
Added Vitest + RTL tests for GetStartedStepper using injected/mock dependencies.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

size: L, ignore-apps-deps-scan

Suggested reviewers

  • ygrishajev
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wallet-remove-leap-wallet

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

Comment thread package-lock.json
@@ -521,7 +521,6 @@
"@cosmos-kit/cosmos-extension-metamask": "0.13.3",
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot Apr 15, 2026

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

- node_modules/@cosmos-kit/leap                                                            2.15.6  
- node_modules/@cosmos-kit/leap-extension                                                  2.15.6  
- node_modules/@cosmos-kit/leap-metamask-cosmos-snap                                       0.15.6  
- node_modules/@cosmos-kit/leap-mobile                                                     2.14.6  
- node_modules/eth-rpc-errors                                                              4.0.3   
- node_modules/extension-port-stream                                                       2.1.1   
- node_modules/json-rpc-engine                                                             6.1.0   
- node_modules/json-rpc-engine/node_modules/@metamask/safe-event-emitter                   2.0.0   
- node_modules/json-rpc-middleware-stream                                                  4.2.3   
- node_modules/@leapwallet/cosmos-snap-provider                                            0.1.26  
- node_modules/@leapwallet/cosmos-snap-provider/node_modules/@cosmjs/proto-signing         0.32.4  
- node_modules/@metamask/object-multiplex                                                  1.3.0   
- node_modules/@metamask/providers                                                         11.1.2  
- node_modules/@metamask/safe-event-emitter                                                3.1.2   
- node_modules/webextension-polyfill                                                       0.10.0  

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.42%. Comparing base (c30cac7) to head (c4e6b7e).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3064      +/-   ##
==========================================
+ Coverage   60.04%   60.42%   +0.37%     
==========================================
  Files        1036     1035       -1     
  Lines       24446    24371      -75     
  Branches     6062     6036      -26     
==========================================
+ Hits        14679    14725      +46     
+ Misses       8518     8412     -106     
+ Partials     1249     1234      -15     
Flag Coverage Δ
api 81.35% <ø> (-0.03%) ⬇️
deploy-web 44.28% <100.00%> (+0.57%) ⬆️
log-collector 86.34% <ø> (ø)
notifications 86.06% <ø> (ø)
provider-console 81.48% <ø> (ø)
provider-proxy 85.21% <ø> (ø)
tx-signer 76.26% <ø> (ø)
Files with missing lines Coverage Δ
...b/src/components/get-started/GetStartedStepper.tsx 72.54% <100.00%> (+72.54%) ⬆️
...ontext/CustomChainProvider/CustomChainProvider.tsx 2.94% <ø> (ø)
apps/deploy-web/src/pages/get-started/index.tsx 0.00% <ø> (ø)
...oy-web/src/services/analytics/analytics.service.ts 94.20% <ø> (ø)

... and 4 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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@doc/e2e-manual-qa-checklist.md`:
- Line 165: Update the checklist item that currently reads "Wallet extension
modal opens (Keplr/Cosmostation)" to include MetaMask so it reflects all
supported extensions; locate the checklist line containing "Wallet extension
modal opens (Keplr/Cosmostation)" in doc/e2e-manual-qa-checklist.md and change
it to something like "Wallet extension modal opens
(Keplr/Cosmostation/MetaMask)" or similar to explicitly mention MetaMask.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 39688809-1818-4399-9d03-05f80ef6be5b

📥 Commits

Reviewing files that changed from the base of the PR and between c30cac7 and 1607829.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (20)
  • .gitignore
  • .npmrc
  • apps/deploy-web/package.json
  • apps/deploy-web/src/components/get-started/GetStartedStepper.tsx
  • apps/deploy-web/src/components/liquidity-modal/index.tsx
  • apps/deploy-web/src/context/CustomChainProvider/CustomChainProvider.tsx
  • apps/deploy-web/src/pages/get-started/index.tsx
  • apps/deploy-web/src/services/analytics/analytics.service.ts
  • apps/deploy-web/src/styles/index.css
  • apps/deploy-web/src/types/global.ts
  • apps/deploy-web/tests/ui/fixture/context-with-extension.ts
  • apps/deploy-web/tests/ui/fixture/wallet-setup.ts
  • apps/deploy-web/tests/ui/fixture/web-wallet/initKeplrWebWalletMock.ts
  • apps/deploy-web/tests/ui/fixture/web-wallet/injectWebWallet.ts
  • apps/provider-console/package.json
  • apps/provider-console/src/context/CustomChainProvider/CustomChainProvider.tsx
  • apps/provider-console/src/pages/get-started/index.tsx
  • apps/provider-console/src/styles/index.css
  • doc/e2e-manual-qa-checklist.md
  • packages/dev-config/.eslintrc.base.js
💤 Files with no reviewable changes (11)
  • .gitignore
  • apps/provider-console/package.json
  • .npmrc
  • apps/deploy-web/package.json
  • apps/deploy-web/src/styles/index.css
  • apps/deploy-web/src/pages/get-started/index.tsx
  • apps/provider-console/src/styles/index.css
  • apps/deploy-web/src/types/global.ts
  • apps/deploy-web/src/services/analytics/analytics.service.ts
  • apps/provider-console/src/pages/get-started/index.tsx
  • apps/deploy-web/src/components/liquidity-modal/index.tsx

Comment thread doc/e2e-manual-qa-checklist.md Outdated
Add unit tests for the GetStartedStepper component covering the balance
display logic for both custodial and managed wallets. Introduce the
DEPENDENCIES pattern to enable DI-based testing.
Address CodeRabbit review: include MetaMask in the QA checklist since
it's still a supported wallet option in deploy-web.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/deploy-web/src/components/get-started/GetStartedStepper.spec.tsx`:
- Around line 57-63: The balance mock is only created when input.balanceUAKT
exists, which skips creating a balance object if only balanceUUSDC or
balanceUACT are provided; update the gating in the GetStartedStepper.spec.tsx
test to create the balance object when any of input.balanceUAKT,
input.balanceUUSDC, or input.balanceUACT is defined (e.g., check
input?.balanceUAKT !== undefined || input?.balanceUUSDC !== undefined ||
input?.balanceUACT !== undefined) and still fill the properties using the
existing fallback logic (balanceUUSDC: input?.balanceUUSDC ?? 0, balanceUACT:
input?.balanceUACT ?? 0).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 73bfd44b-e2ee-4e38-b51d-dfb05d35cc99

📥 Commits

Reviewing files that changed from the base of the PR and between 1607829 and ffde128.

📒 Files selected for processing (3)
  • apps/deploy-web/src/components/get-started/GetStartedStepper.spec.tsx
  • apps/deploy-web/src/components/get-started/GetStartedStepper.tsx
  • doc/e2e-manual-qa-checklist.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • doc/e2e-manual-qa-checklist.md
  • apps/deploy-web/src/components/get-started/GetStartedStepper.tsx

Comment thread apps/deploy-web/src/components/get-started/GetStartedStepper.spec.tsx Outdated
Address CodeRabbit review: balance mock now activates when any of
balanceUAKT, balanceUUSDC, or balanceUACT is provided, not just
balanceUAKT.
@stalniy
Copy link
Copy Markdown
Contributor

stalniy commented Apr 15, 2026

should we wait till May 28, 2026?

@baktun14
Copy link
Copy Markdown
Contributor Author

should we wait till May 28, 2026?

Sure we can, I don't think it matters.

import { MockComponents } from "@tests/unit/mocks";

describe(GetStartedStepper.name, () => {
it("displays AKT and USDC balance for custodial wallet", () => {
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.

USDC?

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.

3 participants