Skip to content

Commit 9b30da9

Browse files
author
Eason Smith
committed
refactoried some classes from osmo-query to use interchainjs
1 parent 42c7bed commit 9b30da9

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

examples/ibc-asset-list/hooks/queries/useQueryHooks.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { useChain } from '@interchain-kit/react';
2-
import {
3-
createRpcQueryHooks, useRpcClient,
4-
// useRpcEndpoint
5-
} from 'osmo-query';
2+
import { createRpcQueryHooks } from 'osmo-query';
3+
import { useRpcClient } from 'interchain-react/react-query';
64
import { useRpcEndpoint } from 'interchain-react/react-query'
75
import { defaultContext } from '@tanstack/react-query';
86

@@ -23,8 +21,12 @@ export const useQueryHooks = (chainName: string, extraKey?: string) => {
2321
});
2422

2523
const rpcClientQuery = useRpcClient({
26-
rpcEndpoint: rpcEndpointQuery.data || '',
24+
// rpcEndpoint: rpcEndpointQuery.data || '',
25+
clientResolver: {
26+
rpcEndpoint: rpcEndpointQuery.data,
27+
},
2728
options: {
29+
context: defaultContext,
2830
enabled: !!address && !!rpcEndpointQuery.data,
2931
staleTime: Infinity,
3032
queryKeyHashFn: (queryKey) => {

0 commit comments

Comments
 (0)