Skip to content

Fix: missing imports and syntax error in the code#55

Open
CryptAm wants to merge 2 commits intomagicblock-labs:mainfrom
CryptAm:main
Open

Fix: missing imports and syntax error in the code#55
CryptAm wants to merge 2 commits intomagicblock-labs:mainfrom
CryptAm:main

Conversation

@CryptAm
Copy link

@CryptAm CryptAm commented Feb 9, 2026

  • Added missing imports of AUTHORITY_FLAG and TX_LOGS_FLAG in create.mdx to prevent ReferenceError
  • Fixed a syntax error in delegate.mdx by adding a missing comma between object fields, ensuring the code compiles correctly.

Summary by CodeRabbit

  • Documentation

    • Updated Web3.js code examples in documentation with latest SDK references.
  • Style

    • Minor formatting improvements to code snippets for consistency.

@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

Walkthrough

Two Web3.js code snippet files were modified: one file added two named imports from an external SDK package, and another file added a trailing comma to a function parameter for consistency.

Changes

Cohort / File(s) Summary
Web3.js Snippet Imports
snippets/per-web3js-code/create.mdx
Added named imports TX_LOGS_FLAG and AUTHORITY_FLAG from @magicblock-labs/ephemeral-rollups-sdk.
Web3.js Snippet Formatting
snippets/per-web3js-code/delegate.mdx
Added trailing comma after ownerProgram: PERMISSION_PROGRAM_ID in function call parameter list.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: it fixes missing imports in create.mdx and a syntax error (trailing comma) in delegate.mdx, which aligns with the actual changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
snippets/per-web3js-code/delegate.mdx (1)

9-15: 🧹 Nitpick | 🔵 Trivial

Inconsistent indentation in the object literal.

Lines 11–12 use 4-space indentation while the surrounding properties (lines 10, 13, 14) use 2-space indentation. Consider aligning them for readability.

✏️ Suggested fix
 const delegatePermissionIx = createDelegatePermissionInstruction({
   payer: payer.publicKey,
-    authority: [payer.publicKey, true], // defined as authority in permission members
-    permissionedAccount: [permissionedAccountKeypair.publicKey, false], // optional signer, since payer is defined as authority in permission members
+  authority: [payer.publicKey, true], // defined as authority in permission members
+  permissionedAccount: [permissionedAccountKeypair.publicKey, false], // optional signer, since payer is defined as authority in permission members
   ownerProgram: PERMISSION_PROGRAM_ID,
   validator,
 });

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