Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
- Only call Attribution.toDataSuffix when builderCode is truthy - Omit data field when no suffix (plain transfer) - Document use of data vs dataSuffix for useSendTransaction Made-with: Cursor
with-next-app-router/packages/nextjs/app/debug/_components/contract/WriteOnlyFunctionForm.tsx
Show resolved
Hide resolved
…ways visible) Builder code block is always rendered; zeroInputs compact flex-row broke layout. Set zeroInputs = false so flex-col is used consistently. Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| }); | ||
| const zeroInputs = inputs.length === 0 && abiFunction.stateMutability !== "payable"; | ||
| // Builder code block is always rendered, so use column layout for consistent UX | ||
| const zeroInputs = false; |
There was a problem hiding this comment.
Hardcoded zeroInputs creates unreachable dead code block
Low Severity
Setting zeroInputs to the constant false makes the conditional block at the bottom (zeroInputs && txResult ? ... : null) completely unreachable dead code. That block also differs from the live path by using raw txResult instead of the managed displayedTxResult state. Rather than leaving a constant false variable wired into three conditionals, the dead block and the variable itself could be removed, and the always-true/always-false branches simplified.


Note
Medium Risk
Moderate risk due to upgrades of core web3 deps (
viem/wagmi) and new transaction payload behavior (dataSuffix/data) that could affect signing and downstream indexing.Overview
Adds optional ERC-8021 builder code attribution to contract writes in the debug UI by appending an
ox/erc8021-generateddataSuffixtouseWriteContractcalls, and updates the form layout to always show this input.Introduces a new
SendTransactiontest component on the home page that sends a dummy transaction with the ERC-8021 suffix (passed asdata) to validate parsing.Updates dependencies to support this work: adds
ox, bumpsviemandwagmi, and refreshesyarn.lock; removes the rootpostinstallhusky hook.Written by Cursor Bugbot for commit 6947159. This will update automatically on new commits. Configure here.