SwitchNetwork now part of IThirdwebWallet#111
Merged
0xFirekeeper merged 3 commits intomainfrom Dec 25, 2024
Merged
Conversation
`SmartWallet.SwitchNetwork` now also switches underlying wallet network. Also adds `SmartWallet.ActiveChain` property.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #111 +/- ##
=======================================
Coverage 78.07% 78.07%
=======================================
Files 28 28
Lines 4684 4698 +14
Branches 639 639
=======================================
+ Hits 3657 3668 +11
- Misses 853 856 +3
Partials 174 174 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SmartWallet.SwitchNetworknow also switches underlying wallet network. Also addsSmartWallet.ActiveChainproperty.PR-Codex overview
This PR primarily introduces the
SwitchNetworkmethod to several classes, enabling the functionality to change the active network based on a specifiedchainId. It also includes adjustments to ensure that the active chain ID is consistently handled across different components.Detailed summary
SwitchNetwork(BigInteger chainId)method toPrivateKeyWalletandEcosystemWallet._rpcUrlinThirdwebRPCto includeClientId.ActiveChainIdproperty inSmartWalletand replaced instances of_chainIdwithActiveChainId.SwitchNetworklogic inSmartWalletto handle network switching and related contract updates.SwitchNetworkfunctionality inThirdweb.Wallets.Tests.ZkSmartWallet.Tests.