Skip to content

feat(PT9-383): use server-resolved source from quote response for order building#173

Open
edvardg wants to merge 1 commit intomainfrom
feat/PT9-383_resolved-source
Open

feat(PT9-383): use server-resolved source from quote response for order building#173
edvardg wants to merge 1 commit intomainfrom
feat/PT9-383_resolved-source

Conversation

@edvardg
Copy link
Copy Markdown
Contributor

@edvardg edvardg commented Apr 14, 2026

Change Summary

What does this PR change?

  • SDK now reads the optional source field from the /receive API response
  • When building a Fusion order, the response source takes precedence over the request source for salt injection
  • Falls back to request source if the API response doesn't include one (backward compat with older API versions)

Changes

File What changed
types.ts Added optional source to QuoterResponse
quote/quote.ts Store response.source, use this.source || this.params.source in createFusionOrder
quoter.api.spec.ts 4 new tests: store from response, undefined when absent, prefer response over request, fallback to request

Backward compatibility

  • Fully backward compatible — source is optional in the response type
  • Older API versions that don't return source → SDK falls back to this.params.source (existing behavior)
  • No breaking changes to public API

Related Issue/Ticket:
https://1inch.atlassian.net/browse/PT9-383

Testing & Verification

How was this tested?

  • Unit tests
  • Integration tests
  • Manual testing (describe steps)
  • Verified on staging

Risk Assessment

Risk Level:

  • Low - Minor changes, no operational impact
  • Medium - Moderate changes, limited impact, standard rollback available
  • High - Significant changes, potential operational impact, complex rollback

Risks & Impact

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