fix: stop swallowing facilitator verification errors#18
Open
namedfarouk wants to merge 1 commit intoOpenGradient:mainfrom
Open
fix: stop swallowing facilitator verification errors#18namedfarouk wants to merge 1 commit intoOpenGradient:mainfrom
namedfarouk wants to merge 1 commit intoOpenGradient:mainfrom
Conversation
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
This PR fixes silent catch behavior in facilitator verification flows so we no longer continue with ambiguous state when core checks fail.
What changed
verifyEIP3009:invalid_exact_evm_payload_signature_verification_errorwhen smart-wallet bytecode lookup failsinvalid_exact_evm_payload_balance_check_failedwhen balance reads failverifyPermit2:invalid_permit2_signature_verification_errorpermit2_allowance_check_failedon allowance read errorspermit2_balance_check_failedon balance read errorsinvalid_exact_svm_payload_recipient_ata_lookup_failed(with message) when ATA derivation fails instead of generic recipient mismatchTests
Added targeted regression coverage in:
typescript/packages/mechanisms/evm/test/unit/exact/facilitator.test.tsValidated with:
pnpm --filter @x402/evm test -- test/unit/exact/facilitator.test.tspnpm --filter @x402/svm test -- test/unit/facilitator.test.tsFixes #13