Skip to content

fix(docs): add .slice(2) to dataSuffix hex stripping in builder codes…#1521

Open
0xchainer wants to merge 1 commit into
base:masterfrom
0xchainer:fix/dataSuffix-hex-stripping
Open

fix(docs): add .slice(2) to dataSuffix hex stripping in builder codes…#1521
0xchainer wants to merge 1 commit into
base:masterfrom
0xchainer:fix/dataSuffix-hex-stripping

Conversation

@0xchainer
Copy link
Copy Markdown

Problem

In tmp-builder-codes-outline.mdx, the dataSuffix hex stripping is inconsistent across examples. Some examples correctly strip the 0x prefix (dataSuffix.slice(2)) but the EOA and ERC-4337 sections don't:

  • tx.data = tx.data + dataSuffix;
  • userOp.callData = userOp.callData + dataSuffix;
    Since dataSuffix has 0x prefix, this produces malformed double-prefixed hex strings.

Fix

Added .slice(2) to both:

@cb-heimdall
Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

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.

[Bug] Inconsistent dataSuffix hex stripping: slice(2) used in some examples but not others

2 participants