diff --git a/.changeset/green-experts-obey.md b/.changeset/green-experts-obey.md new file mode 100644 index 0000000000..0077394d9b --- /dev/null +++ b/.changeset/green-experts-obey.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/explorer": patch +--- + +Input parameter names are now displayed alongside method names in the "Interact" page. diff --git a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/content/FunctionField.tsx b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/content/FunctionField.tsx index 62873280a4..a104cbe6bf 100644 --- a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/content/FunctionField.tsx +++ b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/interact/content/FunctionField.tsx @@ -57,7 +57,7 @@ const formSchema = z.object({ const getInputLabel = (input: AbiParameter): string => { if (!("components" in input)) { - return input.type; + return input.name || input.type; } if (input.type === "tuple") { @@ -65,7 +65,7 @@ const getInputLabel = (input: AbiParameter): string => { } else if (input.type === "tuple[]") { return `${input.name}[]`; } - return input.type; + return input.name || input.type; }; export function FunctionField({ systemId, worldAbi, functionAbi, useSearchParamsArgs }: Props) {