diff --git a/.changeset/blue-seals-relate.md b/.changeset/blue-seals-relate.md deleted file mode 100644 index 84b94339ee..0000000000 --- a/.changeset/blue-seals-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@latticexyz/dev-tools": minor ---- - -Improved rendering of transactions that make calls via World's `call` and `callFrom` methods diff --git a/packages/dev-tools/src/actions/WriteSummary.tsx b/packages/dev-tools/src/actions/WriteSummary.tsx index 42aee498ec..f7f4dca1a5 100644 --- a/packages/dev-tools/src/actions/WriteSummary.tsx +++ b/packages/dev-tools/src/actions/WriteSummary.tsx @@ -1,4 +1,4 @@ -import { decodeEventLog, AbiEventSignatureNotFoundError, decodeFunctionData, Hex } from "viem"; +import { decodeEventLog, AbiEventSignatureNotFoundError } from "viem"; import { twMerge } from "tailwind-merge"; import { isDefined } from "@latticexyz/common/utils"; import { PendingIcon } from "../icons/PendingIcon"; @@ -56,17 +56,6 @@ export function WriteSummary({ write }: Props) { .filter(isDefined) : null; - let functionName = write.request.functionName; - let functionArgs = write.request.args; - if (functionName === "call" || functionName === "callFrom") { - const functionSelectorAndArgs: Hex = write.request?.args?.length - ? (write.request.args[write.request.args.length - 1] as Hex) - : `0x`; - const functionData = decodeFunctionData({ abi: worldAbi, data: functionSelectorAndArgs }); - functionName = functionData.functionName; - functionArgs = functionData.args; - } - return (
{ @@ -84,10 +73,7 @@ export function WriteSummary({ write }: Props) { )} >
- {functionName}({functionArgs?.map((value) => serialize(value)).join(", ")}){" "} - {write.request.functionName !== functionName ? ( - via {write.request.functionName} - ) : null} + {write.request.functionName}({write.request.args?.map((value) => serialize(value)).join(", ")})
{transactionReceipt.status === "fulfilled" ? (