Skip to content

Commit

Permalink
Rename useScaffoldWriteContract to createScaffoldWriteContract for co…
Browse files Browse the repository at this point in the history
…nsistency
  • Loading branch information
ByteAtATime committed Apr 9, 2024
1 parent 34d119c commit 231c6f8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/svelte/src/lib/runes/scaffoldWriteContract.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import type { WriteContractErrorType, WriteContractReturnType } from "@wagmi/cor
* @param contractName - contract name
* @param writeContractParams - wagmi's useWriteContract parameters
*/
export const useScaffoldWriteContract = (writeContractParams?: CreateWriteContractParameters) => {
export const createScaffoldWriteContract = (writeContractParams?: CreateWriteContractParameters) => {
const {
result: { chain },
} = $derived(createAccount());
Expand Down Expand Up @@ -69,13 +69,13 @@ export const useScaffoldWriteContract = (writeContractParams?: CreateWriteContra
...wagmiVariables,
} as WriteContractVariables<Abi, string, any[], Config, number>,
mutateOptions as
| MutateOptions<
WriteContractReturnType,
WriteContractErrorType,
WriteContractVariables<Abi, string, any[], Config, number>,
unknown
>
| undefined,
| MutateOptions<
WriteContractReturnType,
WriteContractErrorType,
WriteContractVariables<Abi, string, any[], Config, number>,
unknown
>
| undefined,
);
const writeTxResult = await writeTx(makeWriteWithParams, { blockConfirmations, onBlockConfirmation });

Expand Down

0 comments on commit 231c6f8

Please sign in to comment.