Skip to content

fix(python): camelCase serialization + auto-wrap LocalAccount#1122

Open
madisoncarter1234 wants to merge 3 commits intocoinbase:mainfrom
madisoncarter1234:fix/auto-wrap-local-account
Open

fix(python): camelCase serialization + auto-wrap LocalAccount#1122
madisoncarter1234 wants to merge 3 commits intocoinbase:mainfrom
madisoncarter1234:fix/auto-wrap-local-account

Conversation

@madisoncarter1234
Copy link
Contributor

Summary

Fixes #1120
Fixes #1121

Test plan

  • 3 new tests for camelCase serialization (PaymentPayload, PaymentRequirements, PaymentRequired)
  • 3 new tests for LocalAccount auto-wrap (auto-wrap, address preserved, no double-wrap)
  • All 42 existing + new tests pass

@cb-heimdall
Copy link

cb-heimdall commented Feb 9, 2026

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/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 1
Sum 2

@vercel
Copy link

vercel bot commented Feb 9, 2026

@madisoncarter1234 is attempting to deploy a commit to the Coinbase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added sdk Changes to core v2 packages python labels Feb 9, 2026
Two fixes for the Python SDK:

1. Add serialize_by_alias=True to BaseX402Model so model_dump_json()
   produces spec-compliant camelCase by default. Users no longer need
   to pass by_alias=True manually. (Fixes coinbase#1120)

2. Auto-wrap eth_account LocalAccount in EthAccountSigner when passed
   to ExactEvmScheme or ExactEvmSchemeV1. This prevents the confusing
   ValueError from mismatched sign_typed_data signatures. (Fixes coinbase#1121)
@madisoncarter1234 madisoncarter1234 force-pushed the fix/auto-wrap-local-account branch from a38c411 to 0ce1d36 Compare February 9, 2026 01:35
madisoncarter1234 and others added 2 commits February 9, 2026 16:26
The "should create default client if empty array provided" test was calling
initialize() on a server with a real HTTPFacilitatorClient, causing a network
request that timed out on Node 22 in CI. The test only needs to verify that
the constructor accepts an empty array, not that initialize works with a
real facilitator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python sdk Changes to core v2 packages typescript

2 participants