Skip to content

Commit

Permalink
Quick SDK fix (MystenLabs#14017)
Browse files Browse the repository at this point in the history
## Description 

Fixed incorrect enabled status

## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
Jordan-Mysten authored Sep 29, 2023
1 parent 00a6fb1 commit c688e6e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions sdk/dapp-kit/src/hooks/useSuiClientQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function useSuiClientQuery<T extends keyof SuiRpcMethods>(
? [method: T, params?: SuiRpcMethods[T]['params'], options?: UseSuiClientQueryOptions<T>]
: [method: T, params: SuiRpcMethods[T]['params'], options?: UseSuiClientQueryOptions<T>]
) {
const [method, params, { queryKey = [], enabled = !!params, ...options } = {}] = args as [
const [method, params, { queryKey = [], ...options } = {}] = args as [
method: T,
params?: SuiRpcMethods[T]['params'],
options?: UseSuiClientQueryOptions<T>,
Expand All @@ -50,7 +50,6 @@ export function useSuiClientQuery<T extends keyof SuiRpcMethods>(
return useQuery({
...options,
queryKey: [suiContext.network, method, params, ...queryKey],
enabled,
queryFn: async () => {
return await suiContext.client[method](params as never);
},
Expand Down

0 comments on commit c688e6e

Please sign in to comment.