Skip to content

fix: validate x402 payment requirements#15

Merged
ralyodio merged 1 commit into
mainfrom
fix/x402-accepts-validation
Jun 27, 2026
Merged

fix: validate x402 payment requirements#15
ralyodio merged 1 commit into
mainfrom
fix/x402-accepts-validation

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Summary

  • validate every x402 accepts entry before payment processing
  • reject null/non-object entries and missing required string fields
  • reject non-decimal maxAmountRequired values before BigInt guards can fail later
  • add regression coverage for malformed requirements

Fixes #14.

Validation

  • corepack pnpm@9.12.0 --filter @tronbrowser/payments test
  • corepack pnpm@9.12.0 --filter @tronbrowser/payments typecheck

@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio ralyodio merged commit 31fed85 into main Jun 27, 2026
7 checks passed
@ralyodio ralyodio deleted the fix/x402-accepts-validation branch June 27, 2026 02:18
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.

x402 parser accepts malformed payment requirements

2 participants