Skip to content

chore: update sdk types and fix inconsistencies - #1124

Merged
pedromcunha merged 1 commit into
mainfrom
chore/sync-types
Sep 8, 2026
Merged

chore: update sdk types and fix inconsistencies#1124
pedromcunha merged 1 commit into
mainfrom
chore/sync-types

Conversation

@pedromcunha

Copy link
Copy Markdown
Member

No description provided.

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
relay-sdk-demo Ready Ready Preview Sep 8, 2026 4:54pm UTC

Request Review

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @pedromcunha's task in 2m 33s —— View job


📝 Docs Drift Check — No docs impact

This PR does not touch surfaces that require a relayprotocol/relay-docs update.

This is a regeneration of the SDK's OpenAPI-derived types (api.ts, routes, SwapBreakdown, ChainVM += 'hederavm'). The hand-maintained RelayKit reference pages delegate field/endpoint specifics to the OpenAPI-generated API reference and don't enumerate the changed type shapes, so none go stale. The customer-facing breaking-change narrative is carried by the changeset in this PR, which syncs to the unified changelog automatically.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Claude finished @pedromcunha's task in 1m 28s —— View job


Code Review

  • Read PR diff and changed files
  • Review for correctness, security, error handling
  • Check repo-specific guidelines
  • Post review

Code Review — No issues found.

Reviewed 5 files, ~1,463 lines changed. This is a generated API-types sync (api.ts) plus three small hand edits, and all of them check out:

  • routes/index.ts/execute/swap, /requests/{requestId}/signature, and /signature/v2 are removed and /deposit-addresses/v2 + /disable/v2 added. No remaining code references the removed paths (only the explanatory comment in Execute.ts mentions /execute/swap).
  • Execute.tsSwapBreakdown is now inlined instead of derived from the dropped /execute/swap schema. The inlined shape ({ value?: string; timeEstimate?: number }[] | undefined) is structurally identical to the old derived type, so the executeSteps/* consumers that assign json?.breakdown are unaffected.
  • RelayChain.ts — adding 'hederavm' to ChainVM is safe; there is no exhaustive switch with a never fallthrough over VM types that would break compilation.
  • Removed currency literals (degen, usdh from /config/v2) aren't referenced in the UI/SDK — the only USDH hit is an unrelated Hyperliquid coin constant.
  • Changeset follows the repo guidelines well: leads with the reader-facing outcome, names exact surfaces, and states migrations for each breaking change (?? undefined for the nullable fields, the new hederavm case).

The string | null widening the changeset flags will surface as downstream type errors in useRequests / queryRequests / useDepositAddressStatus consumers, but that's a type-checker concern covered by CI rather than a review issue.

@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

The change is not ready to merge until the request route amount declarations match the nullable API contract described in the release notes.

Findings

  1. P1 Route amounts reject null

Summary

  • This change updates Relay API routes, SDK declarations, and migration guidance. The request v2 and v3 route amount declarations remain incompatible with the documented nullable API response values, so consumers using strict TypeScript cannot model responses that contain null amounts.

@pedromcunha
pedromcunha merged commit c7ba781 into main Sep 8, 2026
9 checks passed
@pedromcunha
pedromcunha deleted the chore/sync-types branch September 8, 2026 17:33
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.

2 participants