diff --git a/packages/nextjs/app/debug/_components/contract/Tuple.tsx b/packages/nextjs/app/debug/_components/contract/Tuple.tsx index 0e3175db0..7ec7e7ec0 100644 --- a/packages/nextjs/app/debug/_components/contract/Tuple.tsx +++ b/packages/nextjs/app/debug/_components/contract/Tuple.tsx @@ -1,6 +1,6 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react"; import { ContractInput } from "./ContractInput"; -import { getFunctionInputKey, getInitalTupleFormState } from "./utilsContract"; +import { getFunctionInputKey, getInitialTupleFormState } from "./utilsContract"; import { replacer } from "~~/utils/scaffold-eth/common"; import { AbiParameterTuple } from "~~/utils/scaffold-eth/contract"; @@ -12,7 +12,7 @@ type TupleProps = { }; export const Tuple = ({ abiTupleParameter, setParentForm, parentStateObjectKey }: TupleProps) => { - const [form, setForm] = useState>(() => getInitalTupleFormState(abiTupleParameter)); + const [form, setForm] = useState>(() => getInitialTupleFormState(abiTupleParameter)); useEffect(() => { const values = Object.values(form); diff --git a/packages/nextjs/app/debug/_components/contract/TupleArray.tsx b/packages/nextjs/app/debug/_components/contract/TupleArray.tsx index 3fa9ac84e..ab889fb70 100644 --- a/packages/nextjs/app/debug/_components/contract/TupleArray.tsx +++ b/packages/nextjs/app/debug/_components/contract/TupleArray.tsx @@ -1,6 +1,6 @@ import { Dispatch, SetStateAction, useEffect, useState } from "react"; import { ContractInput } from "./ContractInput"; -import { getFunctionInputKey, getInitalTupleArrayFormState } from "./utilsContract"; +import { getFunctionInputKey, getInitialTupleArrayFormState } from "./utilsContract"; import { replacer } from "~~/utils/scaffold-eth/common"; import { AbiParameterTuple } from "~~/utils/scaffold-eth/contract"; @@ -12,7 +12,7 @@ type TupleArrayProps = { }; export const TupleArray = ({ abiTupleParameter, setParentForm, parentStateObjectKey }: TupleArrayProps) => { - const [form, setForm] = useState>(() => getInitalTupleArrayFormState(abiTupleParameter)); + const [form, setForm] = useState>(() => getInitialTupleArrayFormState(abiTupleParameter)); const [additionalInputs, setAdditionalInputs] = useState>([ abiTupleParameter.components, ]); diff --git a/packages/nextjs/app/debug/_components/contract/utilsContract.tsx b/packages/nextjs/app/debug/_components/contract/utilsContract.tsx index 217012ce3..55ef9a4f6 100644 --- a/packages/nextjs/app/debug/_components/contract/utilsContract.tsx +++ b/packages/nextjs/app/debug/_components/contract/utilsContract.tsx @@ -86,7 +86,7 @@ const getInitialFormState = (abiFunction: AbiFunction) => { return initialForm; }; -const getInitalTupleFormState = (abiTupleParameter: AbiParameterTuple) => { +const getInitialTupleFormState = (abiTupleParameter: AbiParameterTuple) => { const initialForm: Record = {}; if (abiTupleParameter.components.length === 0) return initialForm; @@ -97,7 +97,7 @@ const getInitalTupleFormState = (abiTupleParameter: AbiParameterTuple) => { return initialForm; }; -const getInitalTupleArrayFormState = (abiTupleParameter: AbiParameterTuple) => { +const getInitialTupleArrayFormState = (abiTupleParameter: AbiParameterTuple) => { const initialForm: Record = {}; if (abiTupleParameter.components.length === 0) return initialForm; abiTupleParameter.components.forEach((component, componentIndex) => { @@ -158,7 +158,7 @@ export { getFunctionInputKey, getInitialFormState, getParsedContractFunctionArgs, - getInitalTupleFormState, - getInitalTupleArrayFormState, + getInitialTupleFormState, + getInitialTupleArrayFormState, transformAbiFunction, }; diff --git a/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx b/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx index c6fa24b50..b9ce162ff 100644 --- a/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx +++ b/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx @@ -48,7 +48,7 @@ export const AddressInput = ({ value, name, placeholder, onChange, disabled }: C }, }); - const { data: ensAvatar, isLoading: isEnsAvtarLoading } = useEnsAvatar({ + const { data: ensAvatar, isLoading: isEnsAvatarLoading } = useEnsAvatar({ name: ensName ? normalize(ensName) : undefined, chainId: 1, query: { @@ -94,7 +94,7 @@ export const AddressInput = ({ value, name, placeholder, onChange, disabled }: C prefix={ ensName ? (
- {isEnsAvtarLoading &&
} + {isEnsAvatarLoading &&
} {ensAvatar ? ( { diff --git a/packages/nextjs/utils/scaffold-eth/contract.ts b/packages/nextjs/utils/scaffold-eth/contract.ts index 68e494c6c..3ff92a2bc 100644 --- a/packages/nextjs/utils/scaffold-eth/contract.ts +++ b/packages/nextjs/utils/scaffold-eth/contract.ts @@ -131,13 +131,13 @@ export type WriteAbiStateMutability = "nonpayable" | "payable"; export type FunctionNamesWithInputs< TContractName extends ContractName, - TAbiStateMutibility extends AbiStateMutability = AbiStateMutability, + TAbiStateMutability extends AbiStateMutability = AbiStateMutability, > = Exclude< Extract< ContractAbi[number], { type: "function"; - stateMutability: TAbiStateMutibility; + stateMutability: TAbiStateMutability; } >, { @@ -149,7 +149,7 @@ type Expand = T extends object ? (T extends infer O ? { [K in keyof O]: O[K] type UnionToIntersection = Expand<(U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never>; -type OptionalTupple = T extends readonly [infer H, ...infer R] ? readonly [H | undefined, ...OptionalTupple] : T; +type OptionalTuple = T extends readonly [infer H, ...infer R] ? readonly [H | undefined, ...OptionalTuple] : T; type UseScaffoldArgsParam< TContractName extends ContractName, @@ -157,7 +157,7 @@ type UseScaffoldArgsParam< > = TFunctionName extends FunctionNamesWithInputs ? { - args: OptionalTupple, TFunctionName>>>; + args: OptionalTuple, TFunctionName>>>; value?: ExtractAbiFunction, TFunctionName>["stateMutability"] extends "payable" ? bigint | undefined : undefined;