fix: share manager JsonRpcProvider with ERC-4337 accounts - #123
Closed
jonathunne wants to merge 1 commit into
Closed
fix: share manager JsonRpcProvider with ERC-4337 accounts#123jonathunne wants to merge 1 commit into
jonathunne wants to merge 1 commit into
Conversation
Stop opening a new JsonRpcProvider per owner account, 4337 wrap, and balance helper when accounts are spawned from a manager. Follow the wdk-wallet-btc pattern: one client on the manager, inject into getAccount.
Contributor
Author
|
Closing for now — will reopen when ready. |
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.
Summary
JsonRpcProvider(already used forgetFeeRates) and injects an EIP-1193 adapter intogetAccount, matchingwdk-wallet-btc(client: this._client).WalletAccountEvmis constructed withoutprovider(keys/address only); 4337 account and balance/verifyhelpers reuse the shared provider instead of rebuilding from the URL.approve()no longer depends onowner._provider(encodes calldata without a runner; still requires the 4337 account provider for chainId/allowance).getAccount→getBalanceconstructs exactly oneJsonRpcProvider.Test plan
jest tests/provider-instance-count.test.jsjest tests/wallet-manager-evm-erc-4337.test.jsjest tests/wallet-account-evm-erc-4337.test.js