Skip to content

Fix MPP fetch#13

Merged
Haakam21 merged 1 commit into
mainfrom
haakam/eng-300-sdks-x402mpp
Mar 16, 2026
Merged

Fix MPP fetch#13
Haakam21 merged 1 commit into
mainfrom
haakam/eng-300-sdks-x402mpp

Conversation

@Haakam21
Copy link
Copy Markdown
Contributor

@Haakam21 Haakam21 commented Mar 16, 2026

Summary by cubic

Fixes MPP/x402 fetch by using the client's raw fetch for the initial 402 probe, avoiding signed requests and enabling correct credential creation. Aligns with ENG-300 (SDKs x402/MPP).

  • Bug Fixes
    • probe402 now accepts an optional fetchFn and uses it.
    • getPaymentCredentials passes mppx.rawFetch to probe402.
    • Updated unit tests to mock rawFetch.

Written for commit 3e77ef9. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

cubic analysis

No issues found across 4 files

Linked issue analysis

Linked issue: ENG-300: SDKs x402/MPP

Status Acceptance criteria Notes
probe402 accepts an optional fetch function and uses it Added fetchFn param and used fetchFn(httpUrl) in util.ts
getPaymentCredentials passes mppx.rawFetch to probe402 getPaymentCredentials now calls probe402(wsUrl, mppx.rawFetch)
MppxClient interface includes a rawFetch property Raw fetch added to MppxClient interface in mppx.ts
Avoid using signed requests for the initial 402 probe (use client's raw fetch) probe402 now accepts injected fetch and getPaymentCredentials passes rawFetch
Unit tests updated to mock rawFetch where applicable Tests were modified to include rawFetch mocks in two test files
⚠️ Enable correct credential creation (response used to create credentials) Response passed to createCredential but no test verifies credential correctness

@Haakam21 Haakam21 merged commit 91a39eb into main Mar 16, 2026
4 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.

1 participant