Skip to content

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

Merged
edvardg merged 1 commit into
mainfrom
feat/PT9-383_resolved-source
Apr 28, 2026
Merged

feat(PT9-383): use server-resolved source from quote response for order building#173
edvardg merged 1 commit into
mainfrom
feat/PT9-383_resolved-source

Conversation

@edvardg

@edvardg edvardg commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

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

@edvardg
edvardg merged commit 807d648 into main Apr 28, 2026
3 of 4 checks passed
@edvardg
edvardg deleted the feat/PT9-383_resolved-source branch April 28, 2026 09:08
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