Skip to content

Conversation

@kronosapiens
Copy link
Contributor

Summary

  • Moves asWalletStandard() from @cartridge/connector to @cartridge/controller
  • Users who don't use starknet-react can now use wallet standard directly via the controller
  • The connector now delegates to the controller's implementation

Context

Users trying to install @cartridge/connector without starknet-react were getting peer dependency errors. The asWalletStandard() helper was the only reason some users needed the connector package, but it doesn't actually depend on starknet-react - it uses @starknet-io/get-starknet-wallet-standard which is independent.

Usage

import ControllerProvider from "@cartridge/controller";

const controller = new ControllerProvider({ /* options */ });
const walletStandard = controller.asWalletStandard();

Test plan

  • Build passes for both packages
  • Lint/format checks pass

🤖 Generated with Claude Code

@vercel
Copy link

vercel bot commented Feb 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
controller-example-next Ready Ready Preview Feb 6, 2026 10:12pm
keychain Ready Ready Preview Feb 6, 2026 10:12pm
keychain-storybook Ready Ready Preview Feb 6, 2026 10:12pm

Request Review

@claude
Copy link
Contributor

claude bot commented Feb 3, 2026


Code review

No issues found. Checked for bugs and CLAUDE.md compliance.


Move the wallet standard functionality from @cartridge/connector to
@cartridge/controller so users who don't use starknet-react can access
it directly. The connector now delegates to the controller's implementation.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The wallet standard's `standard:disconnect` only performs local cleanup
(clears accounts, emits change event) without calling through to the
controller. Wrap `StarknetInjectedWallet` to also call
`controller.disconnect()` for proper keychain session cleanup.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 19.81%. Comparing base (0e418ec) to head (c9a1e5e).
⚠️ Report is 75 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2364      +/-   ##
==========================================
- Coverage   20.89%   19.81%   -1.08%     
==========================================
  Files         307      325      +18     
  Lines       31079    33141    +2062     
  Branches      880      883       +3     
==========================================
+ Hits         6493     6567      +74     
- Misses      24574    26562    +1988     
  Partials       12       12              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@claude
Copy link
Contributor

claude bot commented Feb 6, 2026

Claude finished @kronosapiens's task —— View job


Documentation Update Analysis ✅

I've analyzed the PR changes and updated the documentation accordingly.

Todo List:

  • Analyze the changed files to understand the API migration
  • Explore the docs-repo directory structure
  • Find existing documentation about asWalletStandard
  • Update documentation to reflect new API location and usage
  • Commit and push documentation changes (Cannot commit docs-repo as it's a separate git repository)

Analysis Summary

The PR successfully moved asWalletStandard() from @cartridge/connector to @cartridge/controller, allowing users to access wallet standard functionality without needing starknet-react dependencies.

Documentation Updates Made

Updated /docs-repo/src/pages/controller/getting-started.mdx in the Wallet Standard Integration section to:

  1. Show the new primary usage pattern: Direct usage from the controller for users who don't need starknet-react
  2. Maintain backward compatibility example: ControllerConnector usage (which now delegates to the controller)
  3. Clarify the benefits: Users can now use wallet standard without starknet-react peer dependencies

Key Changes:

  • Added example showing direct controller.asWalletStandard() usage
  • Updated description to reflect that the functionality is now available on the controller itself
  • Maintained existing ControllerConnector example for backward compatibility
  • Added explanatory comments about the delegation behavior

Files Updated:

  • docs-repo/src/pages/controller/getting-started.mdx - Updated Wallet Standard Integration section

Note: The docs-repo directory contains a separate git repository, so the changes have been made to the files but cannot be committed through this repository. The documentation files have been updated and are ready for review.

kronosapiens pushed a commit to cartridge-gg/docs that referenced this pull request Feb 9, 2026
Updates documentation to reflect changes made in:
    feat: move asWalletStandard to controller package

    Related controller PR: cartridge-gg/controller#2364

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

2 participants