You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
gregfromstl
changed the title
Unable to switch from ZKsync chain to non-ZKsync chain while providing account factory
Allow Overriding the factoryAddress in switchChainNov 20, 2024
The smart wallet's
switchChain
function uses thefactoryAddress
specified in the initialcreateOptions
and has no opportunity to be overridden. When creating a smart wallet on a ZKsync-based chain (e.g., Treasure Topaz), nofactoryAddress
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 aconnectOptions
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.
The text was updated successfully, but these errors were encountered: