-
Notifications
You must be signed in to change notification settings - Fork 225
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
feat: Extend SafeProviders externalClient type #928
Merged
dasanra
merged 14 commits into
feat/viem-migration
from
feat/viem-migration-external-client-refactor
Jul 30, 2024
Merged
feat: Extend SafeProviders externalClient type #928
dasanra
merged 14 commits into
feat/viem-migration
from
feat/viem-migration-external-client-refactor
Jul 30, 2024
Conversation
This file contains 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
…lient` * Introduce `ExternalClient` type alias and use it as type for `#externalProvider` in SafeProvider * With the extended type we need to use viem methods individually from `viem/actions` instead of calling them directly on the client itself
…e4337Pack Also fix unit test for Safe4337Pack
Closed
No idea why the build in the pipeline is failing. There is no issue when running the build locally 🤔 |
This reverts commit 67acd8f.
…iem-migration-external-client-refactor
dasanra
approved these changes
Jul 30, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What it solves
Addresses the feedback provided in this comment.
How this PR fixes it
This PR enhances the
SafeProvider
by enabling it to support bothPublicClient
andWalletClient
as external providers.Key Changes:
ExternalClient
has been introduced, defined asPublicClient | ExternalSigner
. This type is now used for the#externalProvider
property inSafeProvider
.viem
methods are now individually imported fromviem/actions
instead of being directly invoked on the client.These changes ensure that
SafeProvider
can handle a broader range of external providers, enhancing its flexibility and functionality.