-
Notifications
You must be signed in to change notification settings - Fork 12.3k
test: fix async signature handling and explicit address retrieval in ERC2771 Context tests #5494
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
test: fix async signature handling and explicit address retrieval in ERC2771 Context tests #5494
Conversation
…ERC2771Context tests
|
Amxx
left a comment
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.
Some of the proposed change may go in the right direction, but the diff is really messy.
Many blank lines are removes without reasons. Some changes make things more messy for no reason (.withArgs(this.sender); works just fine, no need to change it to .withArgs(await this.sender.getAddress());)
| deadline: MAX_UINT48, | ||
| }; | ||
|
|
||
| req.signature = this.sender.signTypedData(this.domain, this.types, req); |
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 used to be a change (adding the await) and now its not
|
It looks like some of the good changes were reverted in daee720, but at the same time all of the "remove empty lines" was kept :/ |
|
can you address this PR asap? Thanks |
Fix: Handle Async Signature and Explicit Address Retrieval in ERC2771Context Tests
Overview
This PR improves the tests for the ERC2771Context contract by addressing asynchronous behavior and enhancing clarity in event comparisons.
Changes Introduced
Async Handling:
All calls to
signTypedDataare now properly awaited to avoid potential race conditions during signature generation.Explicit Address Retrieval:
Event comparisons have been updated to explicitly use
await sender.getAddress(), ensuring that the expected values are in the correct format.Comment Cleanup:
Fixed a minor typo in a comment from “poisonned” to “poisoned” for clarity.