Skip to content

Commit

Permalink
remove dev-tools diff as it's addressed in #2399
Browse files Browse the repository at this point in the history
  • Loading branch information
tash-2s committed Mar 9, 2024
1 parent 0291029 commit 30d7768
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions packages/dev-tools/src/actions/WriteSummary.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
decodeEventLog,
AbiEventSignatureNotFoundError,
decodeFunctionData,
Hex,
AbiFunctionSignatureNotFoundError,
} from "viem";
import { decodeEventLog, AbiEventSignatureNotFoundError, decodeFunctionData, Hex } from "viem";
import { twMerge } from "tailwind-merge";
import { isDefined } from "@latticexyz/common/utils";
import { PendingIcon } from "../icons/PendingIcon";
Expand Down Expand Up @@ -68,19 +62,9 @@ export function WriteSummary({ write }: Props) {
const functionSelectorAndArgs: Hex = write.request?.args?.length
? (write.request.args[write.request.args.length - 1] as Hex)
: `0x`;

// TODO: Since `functionSelectorAndArgs` corresponds to a System's function, decoding it using
// the World ABI may not always be successful. For instance, namespaced system calls could
// result in an error.
try {
const functionData = decodeFunctionData({ abi: worldAbi, data: functionSelectorAndArgs });
functionName = functionData.functionName;
functionArgs = functionData.args;
} catch (error) {
if (!(error instanceof AbiFunctionSignatureNotFoundError)) {
throw error;
}
}
const functionData = decodeFunctionData({ abi: worldAbi, data: functionSelectorAndArgs });
functionName = functionData.functionName;
functionArgs = functionData.args;
}

return (
Expand Down

0 comments on commit 30d7768

Please sign in to comment.