Skip to content

Commit

Permalink
chore: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Jul 24, 2023
1 parent 8948538 commit ad9339f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/query/getTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function getTransactionQueryOptions<
return getTransaction(
config,
params as GetTransactionParameters,
) as Promise<GetTransactionQueryFnData<config, chainId>>
) as unknown as Promise<GetTransactionQueryFnData<config, chainId>>
},
queryKey: getTransactionQueryKey(options),
} as const satisfies QueryOptions<
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/query/readContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export function readContractQueryKey<
>(options: ReadContractOptions<config, abi, functionName> = {} as any) {
// minimze abi for query key
const abi = ((options.abi ?? []) as Abi).filter(
(abiItem) => 'name' in abiItem && abiItem.name === options.functionName,
)
(x) => 'name' in x && x.name === options.functionName,
) as Abi
return ['readContract', filterQueryOptions({ ...options, abi })] as const
}

Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/query/simulateContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export function simulateContractQueryKey<
) {
// minimze abi for query key
const abi = ((options.abi ?? []) as Abi).filter(
(abiItem) => 'name' in abiItem && abiItem.name === options.functionName,
)
(x) => 'name' in x && x.name === options.functionName,
) as Abi
return ['simulateContract', filterQueryOptions({ ...options, abi })] as const
}

Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/query/waitForTransactionReceipt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export function waitForTransactionReceiptQueryOptions<
...parameters,
onReplaced: options.onReplaced,
hash,
})
}) as unknown as Promise<
WaitForTransactionReceiptReturnType<config, chainId>
>
},
queryKey: waitForTransactionReceiptQueryKey(options),
} as const satisfies QueryOptions<
Expand Down

1 comment on commit ad9339f

@vercel
Copy link

@vercel vercel bot commented on ad9339f Jul 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wagmi-v2 – ./docs

wagmi-v2-wagmi-dev.vercel.app
wagmi-v2.vercel.app
wagmi-v2-git-tmm-v2-wagmi-dev.vercel.app

Please sign in to comment.