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

Allow Overriding the factoryAddress in switchChain #5472

Open
alecananian opened this issue Nov 20, 2024 · 2 comments
Open

Allow Overriding the factoryAddress in switchChain #5472

alecananian opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
Account Abstraction CS: Growth Feature Adds new functionality to the public API. Stale

Comments

@alecananian
Copy link
Contributor

The smart wallet's switchChain function uses the factoryAddress specified in the initial createOptions and has no opportunity to be overridden. When creating a smart wallet on a ZKsync-based chain (e.g., Treasure Topaz), no factoryAddress is provided and if we want to switch to a non-ZKsync-based chain (e.g., Arbitrum Sepolia), there's no way to specify the proper factory address. The default Thirdweb one gets used and the user is dropped into an unknown account.

The UseWalletDetailsModalOptions type has a connectOptions field that allows you to specify account abstraction, but these are only passed down to the connect flow, not the network switcher.

I've found I can work around this by specifying an (unused) account factory address even when connecting to a ZKsync chain, but that's a bit odd and only works if I know that the factory address will be the same on every possible chain the user can connect to.

@gregfromstl gregfromstl changed the title Unable to switch from ZKsync chain to non-ZKsync chain while providing account factory Allow Overriding the factoryAddress in switchChain Nov 20, 2024
@gregfromstl gregfromstl self-assigned this Nov 20, 2024
@gregfromstl gregfromstl added Feature Adds new functionality to the public API. Account Abstraction CS: Growth labels Nov 20, 2024 — with Linear
Copy link
Contributor

This issue has been inactive for 30 days. It is now marked as stale and will be closed in 5 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account Abstraction CS: Growth Feature Adds new functionality to the public API. Stale
Projects
None yet
Development

No branches or pull requests

2 participants