Skip to content

feat: migrate embedded wallet to @polygonlabs/oms-wallet#127

Merged
JamesLawton merged 9 commits into
stagingfrom
feat/oms-wallet-sdk-migration
Jul 16, 2026
Merged

feat: migrate embedded wallet to @polygonlabs/oms-wallet#127
JamesLawton merged 9 commits into
stagingfrom
feat/oms-wallet-sdk-migration

Conversation

@JamesLawton

Copy link
Copy Markdown
Collaborator

Migrates the CLI's embedded wallet from @0xsequence/typescript-sdk@0.1.0-alpha.4 to @polygonlabs/oms-wallet@0.2.0 (the same SDK rebranded under Polygon). Merging deploys the migrated oidc-relay + agentconnect UI to staging for the live e2e.

What changed

  • Package + Node: @polygonlabs/oms-wallet@0.2.0 (viem ^2.48.4), Node floor bumped to 22+. Mechanical renames OMSClientOMSWallet, isOmsSdkErrorisOMSWalletError; email, transactions, balances, signing, networks unchanged.
  • Google login re-architected onto the SDK's OMS relay: our custom OidcHandoff DO, /api/oidc/* routes, and return-to.ts are deleted. The OMS relay now owns the Google callback and returns the browser to the agentconnect /login page, which posts the callback URL back over the existing /api/login pairing channel (new oidc-callback action); the CLI calls completeOidcRedirectAuth({callbackUrl}). SEQUENCE_OIDC_RELAY_URI is gone.
  • Relay wrangler.toml gets a v3 deleted_classes = ["OidcHandoff"] migration (all envs); LoginSession retained.

Reviewed per-task plus a whole-branch review (ready: yes, no critical). 73 tests pass. Spec: docs/superpowers/specs/2026-07-16-oms-wallet-sdk-migration-design.md.

Live e2e gates (after staging deploy)

  • OMS relay preserves ?s= on the return URI and appends code/state as query params (the SDK parses query only; a fragment-append would be an SDK incompatibility to escalate, not patch).
  • Whether a localhost return URI is allowlisted (decides --local's Google leg).

Production checklist additions (for the eventual release to main)

  • The prod relay deploy removes /api/oidc/*, so already-installed CLI versions lose their Google leg until users upgrade (email keeps working). Sequence the prod relay deploy + npm release with that break window in mind; optionally serve a transitional 410 on /api/oidc/*.
  • The Sequence/OMS allowlist target is now the omsRelayReturnUri (agentconnect /login), not /api/oidc/cb.

Follow-ups (non-blocking)

  • operations.ts redundant contractAddress cast/guard; validCallbackUrl no IPv6 [::1]; --local timeout copy.

🤖 Generated with Claude Code

…on post error

isRelayReturn now requires an oauth callback param (code/state/error) rather
than any non-s query key, so a wrapped/tracked link (utm_*, gclid) pasted
into a browser no longer misfires a bogus relay callback post. The
oidc-callback post in LoginPage now awaits the result and dispatches a
terminal failed state on a false response, instead of leaving the user on
the finishing-sign-in spinner until the poll timeout. Also hoists the
duplicated isRelayReturn(window.location.search) call into one const.
@claude

claude Bot commented Jul 16, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@JamesLawton
JamesLawton merged commit a493241 into staging Jul 16, 2026
1 check passed
@JamesLawton
JamesLawton deleted the feat/oms-wallet-sdk-migration branch July 16, 2026 09:48
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