x402 icon indicating copy to clipboard operation
x402 copied to clipboard

fix: Use bytes signature for smart wallet EIP-3009 transfers

Open apmcdermott opened this issue 1 month ago • 3 comments

The facilitator's settle function was calling parseSignature() on all signatures, which failed for smart wallets with:

Error: expected valid s: 1 <= n < 115792089237316195423570985008687907852837564279074904382605163141518161494337, got 0

Solution

Use the bytes signature overload of transferWithAuthorization instead of the (v, r, s) overload for smart wallets.

Checklist

  • [x] I have formatted and linted my code
  • [x] All new and existing tests pass
  • [x] My commits are signed (required for merge) -- you may need to rebase if you initially pushed unsigned commits

apmcdermott avatar Dec 03 '25 13:12 apmcdermott

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

cb-heimdall avatar Dec 03 '25 13:12 cb-heimdall

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
x402 Ready Ready Preview Comment Dec 4, 2025 7:35pm

vercel[bot] avatar Dec 03 '25 13:12 vercel[bot]

Review Error for carsonroscoe-cb @ 2025-12-03 23:35:48 UTC User failed mfa authentication, either user does not exist or public email is not set on your github profile. \ see go/mfa-help

cb-heimdall avatar Dec 03 '25 23:12 cb-heimdall