Skip to content

fix(request): enforce payment caps and network selection - #135

Merged
brendanjryan merged 2 commits into
tempoxyz:mainfrom
mablr:fix/mpp-payment-safety
Sep 9, 2026
Merged

fix(request): enforce payment caps and network selection#135
brendanjryan merged 2 commits into
tempoxyz:mainfrom
mablr:fix/mpp-payment-safety

Conversation

@mablr

@mablr mablr commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Validate payment offers before credential creation so --max-spend cannot be bypassed. Normalize network aliases, honor explicit flags over environment defaults, and reject incompatible chains. Dry-run now returns a decoded, validated quote without wallet access.

Preserve the effective request after redirects and reject capped subscriptions whose recurring authorization cannot enforce a cumulative limit.

Validation: 197 tests passed, plus typechecks, lint, formatting and changelog validation.

AI-assisted

Validate the selected payment challenge before wallet access or credential
creation so SDK observation hooks cannot bypass --max-spend. Reject capped
recurring subscriptions because per-period limits cannot enforce a cumulative
cap, and validate decoded dry-run quotes without paying.

Normalize network aliases with explicit flags taking precedence over the
environment, pin payment clients to that network, and validate options through
the shared execution boundary. Preserve the effective method, body and URL
after redirects when retrying with payment credentials.
Comment thread src/commands/request.ts

@mattsse mattsse left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@brendanjryan
brendanjryan merged commit 19be97b into tempoxyz:main Sep 9, 2026
6 checks passed
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.

3 participants