Skip to content

Conversation

@peachbits
Copy link
Contributor

@peachbits peachbits commented Sep 5, 2025

This should not be merged until is successfully tested

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Description

none

Useful if service is expecting an OP_RETURN to be a specific output index
@peachbits peachbits marked this pull request as ready for review September 8, 2025 18:56
const memoOutput = sortedOutputs.splice(currentMemoIndex, 1)
sortedOutputs.splice(memoIndex, 0, memoOutput[0])
}
}
Copy link

Choose a reason for hiding this comment

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

Bug: Memo Placement Error in Transactions

The memoIndex parameter in makeTx lacks bounds validation. If memoIndex is negative or exceeds the output array's length, the splice operation places the memo output at an unintended position. This could cause issues if precise memo placement is critical for transaction validity or downstream processing.

Fix in Cursor Fix in Web

@peachbits peachbits merged commit 9c6d08a into master Sep 9, 2025
3 checks passed
@peachbits peachbits deleted the matthew/memo-index branch September 9, 2025 08:13
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