-
Notifications
You must be signed in to change notification settings - Fork 137
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
fix(aa-core): add back eip-1193 method handling to the client #425
Conversation
@@ -22,9 +30,13 @@ export function isSmartAccountClient< | |||
>( | |||
client: Client<TTransport, TChain, TAccount> | |||
): client is SmartAccountClient<TTransport, TChain, TAccount> { | |||
return ( | |||
client && "middleware" in client && client.type === "SmartAccountClient" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this check of the type
was causing an E2E alchemy test to fail. So had to change this. The goal of the test is really to test what's going on on the right anyways: does this client support the actions we expect it to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh why was it failing? what was client.type
referring to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah because the AlchemyClient sets the type to AlchemySmartAccountClient
which results in this not passing in the core methods. So instead I changed this to make sure the methods on it match the expectation instead
|
||
return client | ||
return custom({ | ||
async request({ method, params }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding these handlers back because I forgot to handle them after the refactor
ead447c
to
4e6d7a9
Compare
I also caught a broken e2e test here.... we really need the rundler-js bit in here so we can move our e2e tests as part of the PR pipeline |
4e6d7a9
to
e43f219
Compare
@@ -22,9 +30,13 @@ export function isSmartAccountClient< | |||
>( | |||
client: Client<TTransport, TChain, TAccount> | |||
): client is SmartAccountClient<TTransport, TChain, TAccount> { | |||
return ( | |||
client && "middleware" in client && client.type === "SmartAccountClient" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huh why was it failing? what was client.type
referring to?
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)PR-Codex overview
This PR focuses on updating the
IncompatibleClientError
class in the codebase. The notable changes include:client
parameter to theIncompatibleClientError
constructor.smartAccountClientMethodKeys
constant to check for supported RPC methods in a smart account client.