Skip to content

feat: Respect minikit supported version#142

Merged
Takaros999 merged 2 commits intomainfrom
takis/version-minikit-cmd-correctlyt
Mar 2, 2026
Merged

feat: Respect minikit supported version#142
Takaros999 merged 2 commits intomainfrom
takis/version-minikit-cmd-correctlyt

Conversation

@Takaros999
Copy link
Contributor

This PR checks which Minikit.verify versions World App supports:

  • Legacy presets are routed to both v1 and v2
  • While constraints are routed to only v2

@vercel
Copy link

vercel bot commented Feb 28, 2026

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

Project Deployment Actions Updated (UTC)
idkit-js-example Ready Ready Preview, Comment Mar 1, 2026 4:46am

Request Review

@Takaros999
Copy link
Contributor Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98b814510e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 103 to +107
export function createNativeRequest(
wasmPayload: unknown,
config: BuilderConfig,
signalHashes: Record<string, string> = {},
version: 1 | 2,

Choose a reason for hiding this comment

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

P2 Badge Default verify version when creating native requests

createNativeRequest now requires a version argument but does not provide a runtime default, so any existing JavaScript call site still using the old 3-argument form will send { command: "verify", version: undefined } to World App. Because this helper previously hardcoded v2, that is a behavioral regression for untyped/non-typechecked callers and can cause verification requests to be rejected; setting a default (as the docstring already implies) preserves backward compatibility.

Useful? React with 👍 / 👎.

Comment on lines +486 to +489
} catch {
throw new Error(
"verify v2 is not supported by this World App version. " +
"Use a legacy preset (e.g. orbLegacy()) or update the World App.",

Choose a reason for hiding this comment

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

P3 Badge Re-throw non-version errors in v1 preset fallback

The broad catch in the v1 preset branch rewrites every failure into a "verify v2 is not supported" message, including unrelated issues like malformed RP context or other payload-construction errors thrown inside the try block. On hosts that only support v1, this misdiagnoses real configuration problems and points developers to the wrong fix instead of surfacing the actual error.

Useful? React with 👍 / 👎.

andy-t-wang
andy-t-wang previously approved these changes Mar 1, 2026
- Backtick `MiniKit` in doc comment to satisfy clippy::doc_markdown
- Only catch v1-incompatibility errors in preset fallback, re-throw others
@Takaros999 Takaros999 merged commit 648eacc into main Mar 2, 2026
15 checks passed
@Takaros999 Takaros999 deleted the takis/version-minikit-cmd-correctlyt branch March 2, 2026 17:44
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