Skip to content

Expose add login signer redirect metadata#1019

Merged
matt416 merged 2 commits into
masterfrom
targeted-plan-fix
Jun 23, 2026
Merged

Expose add login signer redirect metadata#1019
matt416 merged 2 commits into
masterfrom
targeted-plan-fix

Conversation

@matt416

@matt416 matt416 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Adds an opt-in includeMetadata mode to WDK completeRedirect so add-login-signer redirect callers can receive the new signer address, kind, and OAuth email alongside the redirect target.

Preserves the default Promise behavior for existing callers and only includes addedLoginSigner for add-signer redirect completions. Adds WDK wallet tests for the metadata response and the legacy string response.

Verified with WDK build, targeted wallets.test.ts, WDK typecheck, and WDK lint

@corbanbrook corbanbrook marked this pull request as ready for review June 22, 2026 15:42
@corbanbrook corbanbrook requested a review from a team June 22, 2026 15:42
@corbanbrook corbanbrook requested a review from a team as a code owner June 22, 2026 15:42
corbanbrook
corbanbrook previously approved these changes Jun 22, 2026

@tolgahan-arikan tolgahan-arikan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment, not blocker:

The new metadata types are declared in wallets.ts but not re-exported from packages/wallet/wdk/src/sequence/index.ts. This means consumers can use the feature via inference, but cannot cleanly import/name CompleteRedirectWithMetadataArgs or CompleteRedirectMetadataResult from the public package entrypoint.

@matt416 matt416 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed — CompleteRedirectWithMetadataArgs and CompleteRedirectMetadataResult are exported from wallets.ts (lines 107 and 111) but not re-exported from packages/wallet/wdk/src/sequence/index.ts. The existing type block at line 10–25 of that file re-exports CompleteRedirectArgs and the other args types, but the two new metadata types are absent.

Consumers who rely on inference today will be fine, but anyone wanting to name or import either type directly (e.g. in a function signature or a satisfies constraint) will need to reach into the internal path or use ReturnType/Parameters workarounds.

Suggested fix — add the two types to the existing export type { ... } from './wallets.js' block:

CompleteRedirectWithMetadataArgs,
CompleteRedirectMetadataResult,

@matt416 matt416 dismissed stale reviews from tolgahan-arikan and corbanbrook via 5f9712c June 22, 2026 16:13
@matt416 matt416 merged commit 33c639e into master Jun 23, 2026
7 checks passed
@matt416 matt416 deleted the targeted-plan-fix branch June 23, 2026 12:02
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