Skip to content

Commit

Permalink
fix: update to allow decoding with zero params (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
bayological authored May 23, 2024
1 parent c1cc9d6 commit 5cdb3f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/contracts/useContractsInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function decodeCalldata(

if (data?.functionName) {
// output example: `transfer(0x1234etc, 100)`
return `${data.functionName}(${data.args.length ? data.args.join(", ") : ""})`;
return `${data.functionName}(${data.args?.length ? data.args.join(", ") : ""})`;
} else {
return call.calldata;
}
Expand Down

0 comments on commit 5cdb3f2

Please sign in to comment.