Skip to content

Conversation

@SvineruS
Copy link

@SvineruS SvineruS commented Nov 26, 2025

Should use .equals() instead of === for PublicKey


Important

Fixes incorrect PublicKey comparison in createSPLTokenInstruction to ensure correct token program selection.

  • Behavior:
    • Fixes incorrect comparison in createSPLTokenInstruction in createTransfer.ts by using .equals() instead of === for PublicKey objects.
    • Ensures correct token program (TOKEN_2022_PROGRAM_ID or TOKEN_PROGRAM_ID) is selected based on account owner.

This description was created by Ellipsis for a31e03d. You can customize this summary. It will automatically update as commits are pushed.

Should use .equals() instead of === for PublicKey
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to a31e03d in 27 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. core/src/createTransfer.ts:147
  • Draft comment:
    Good fix using .equals() to compare PublicKey objects instead of ===.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it only praises the use of .equals() instead of === for comparing PublicKey objects. It does not provide any actionable feedback or suggestions for improvement.

Workflow ID: wflow_LVTbO2dLecpsx0af

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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