Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make "mode" optional in useSmartAccountClient #1334

Closed
wants to merge 23 commits into from
Closed

Conversation

howydev
Copy link
Collaborator

@howydev howydev commented Feb 7, 2025

PR-Codex overview

This PR primarily updates the viem dependency version across multiple package.json files and introduces enhancements for the ModularAccountV2 functionality in the codebase.

Detailed summary

  • Updated viem version from ^2.20.0 to ^2.22.6 in various package.json files.
  • Added support for ModularAccountV2 in account creation and state management.
  • Introduced new functions like createModularAccountV2 and createModularAccountV2Client.
  • Enhanced error handling with a new InvalidModularAccountV2Mode class.
  • Updated documentation and tests to reflect ModularAccountV2 changes.
  • Modified hooks in useAccount and useSmartAccountClient to include ModularAccountV2 support.

The following files were skipped due to too many changes: account-kit/smart-contracts/src/ma-v2/client/client.ts, account-kit/smart-contracts/src/ma-v2/account/semiModularAccountV2.ts, yarn.lock

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

adamegyed and others added 23 commits February 7, 2025 16:35
* feat: adds initial impl of signAuthorization

* docs: adds signAuthorization documentation

* fix: rename var
* feat: add unified ma v2 client

* chore: update docs

* chore: make account source unique
* feat: add unified ma v2 client

* chore: make account source unique

* feat: add ma v2 account to use smart contract client hook

* chore: remove different type names

* chore: rename mav2 to ModularAccountV2

* fix: review fix, add common type

* fix: typo

* fix: remove await

* fix: narrow the type instead of doing non null assertion
* fix: rename MAv2 type to mode, add 7702 middleware for react hook

* fix: don't switch MintCard to MAv2 yet

* fix: reconnect 7702 account after page refresh

* chore: remove comment

* docs: regen docs

* fix: fix docs

* fix: remove unnecessary optional chaining
Copy link

vercel bot commented Feb 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site 🔄 Building (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 11:38pm
aa-sdk-ui-demo 🔄 Building (Inspect) Visit Preview 💬 Add feedback Feb 7, 2025 11:38pm

@howydev howydev closed this Feb 7, 2025
Copy link

graphite-app bot commented Feb 7, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

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