Skip to content

Fix critical bugs: viem checksum (#17) and spend-cap race condition (…#25

Merged
AaronUppal-AI merged 1 commit into
mainfrom
circle-wallet-migration
May 23, 2026
Merged

Fix critical bugs: viem checksum (#17) and spend-cap race condition (…#25
AaronUppal-AI merged 1 commit into
mainfrom
circle-wallet-migration

Conversation

@AaronUppal-AI

Copy link
Copy Markdown
Owner

#22)

#17 — isAddress called with { strict: false } so non-checksummed addresses (including the mockPaymentFlow hardcoded demo address) pass validation. Strict checksum enforcement belongs at user-input boundaries, not inside the payment pathway where addresses arrive from trusted env/config.

#22 — withSpendLock() serialises concurrent handle402Payment calls using a promise chain so the checkSpendLimit read and recordSpend write are never interleaved between two concurrent payments. Extracted _makePayment() so the locked critical section is explicit.

Summary

Describe the changes introduced by this PR.

Related issues

  • Fixes: #

Checklist

  • I updated the documentation if necessary
  • I added tests that prove my fix is effective or that my feature works
  • All new and existing tests pass

)

#17 — isAddress called with { strict: false } so non-checksummed addresses
(including the mockPaymentFlow hardcoded demo address) pass validation.
Strict checksum enforcement belongs at user-input boundaries, not inside
the payment pathway where addresses arrive from trusted env/config.

#22 — withSpendLock() serialises concurrent handle402Payment calls using a
promise chain so the checkSpendLimit read and recordSpend write are never
interleaved between two concurrent payments. Extracted _makePayment() so
the locked critical section is explicit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@AaronUppal-AI AaronUppal-AI merged commit 5a870cc into main May 23, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant