feat: migrate embedded wallet to @polygonlabs/oms-wallet#127
Merged
Conversation
…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.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the CLI's embedded wallet from
@0xsequence/typescript-sdk@0.1.0-alpha.4to@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
@polygonlabs/oms-wallet@0.2.0(viem ^2.48.4), Node floor bumped to 22+. Mechanical renamesOMSClient→OMSWallet,isOmsSdkError→isOMSWalletError; email, transactions, balances, signing, networks unchanged.OidcHandoffDO,/api/oidc/*routes, andreturn-to.tsare deleted. The OMS relay now owns the Google callback and returns the browser to the agentconnect/loginpage, which posts the callback URL back over the existing/api/loginpairing channel (newoidc-callbackaction); the CLI callscompleteOidcRedirectAuth({callbackUrl}).SEQUENCE_OIDC_RELAY_URIis gone.wrangler.tomlgets av3deleted_classes = ["OidcHandoff"]migration (all envs);LoginSessionretained.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)
?s=on the return URI and appendscode/stateas query params (the SDK parses query only; a fragment-append would be an SDK incompatibility to escalate, not patch).--local's Google leg).Production checklist additions (for the eventual release to main)
/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/*.omsRelayReturnUri(agentconnect/login), not/api/oidc/cb.Follow-ups (non-blocking)
contractAddresscast/guard;validCallbackUrlno IPv6[::1];--localtimeout copy.🤖 Generated with Claude Code