Skip to content

Commit

Permalink
fix deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Jan 27, 2025
1 parent 0bec0d9 commit 31f7f43
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 54 deletions.
27 changes: 0 additions & 27 deletions libs/injective-vue/src/vue-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {
} from '@tanstack/vue-query';

import { HttpEndpoint, ProtobufRpcClient } from '@cosmjs/stargate';
import { Tendermint34Client } from '@cosmjs/tendermint-rpc';
import {Ref} from 'vue'

export const DEFAULT_RPC_CLIENT_QUERY_KEY = 'rpcClient';
Expand Down Expand Up @@ -111,32 +110,6 @@ export function useRpcClient<TData = ProtobufRpcClient>({
);
}

interface UseTendermintClient extends VueQueryParams<Tendermint34Client> {
rpcEndpoint: string | HttpEndpoint;
}

/**
* Function that uses vue-query to cache a connected tendermint client.
*/
export const useTendermintClient = ({
rpcEndpoint,
options,
}: UseTendermintClient) => {
const { data: client } = useQuery<Tendermint34Client, Error, Tendermint34Client>({
queryKey: ['client', 'tendermint', rpcEndpoint],
queryFn: () => Tendermint34Client.connect(rpcEndpoint),
...{
// allow overriding
onError: (e: any) => {
throw new Error(`Failed to connect to ${rpcEndpoint}` + '\n' + e)
},
...options,
}
}
);
return { client };
};

export interface UseQueryBuilderOptions<TReq, TRes> {
builderQueryFn: (
clientResolver?: RpcResolver
Expand Down
27 changes: 0 additions & 27 deletions libs/interchain-vue/src/vue-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import {
} from '@tanstack/vue-query';

import { HttpEndpoint, ProtobufRpcClient } from '@cosmjs/stargate';
import { Tendermint34Client } from '@cosmjs/tendermint-rpc';
import {Ref} from 'vue'

export const DEFAULT_RPC_CLIENT_QUERY_KEY = 'rpcClient';
Expand Down Expand Up @@ -111,32 +110,6 @@ export function useRpcClient<TData = ProtobufRpcClient>({
);
}

interface UseTendermintClient extends VueQueryParams<Tendermint34Client> {
rpcEndpoint: string | HttpEndpoint;
}

/**
* Function that uses vue-query to cache a connected tendermint client.
*/
export const useTendermintClient = ({
rpcEndpoint,
options,
}: UseTendermintClient) => {
const { data: client } = useQuery<Tendermint34Client, Error, Tendermint34Client>({
queryKey: ['client', 'tendermint', rpcEndpoint],
queryFn: () => Tendermint34Client.connect(rpcEndpoint),
...{
// allow overriding
onError: (e: any) => {
throw new Error(`Failed to connect to ${rpcEndpoint}` + '\n' + e)
},
...options,
}
}
);
return { client };
};

export interface UseQueryBuilderOptions<TReq, TRes> {
builderQueryFn: (
clientResolver?: RpcResolver
Expand Down
2 changes: 2 additions & 0 deletions networks/injective/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@
},
"dependencies": {
"@ethersproject/transactions": "^5.7.0",
"@noble/hashes": "^1.3.1",
"@interchainjs/cosmos": "^1.8.1",
"@interchainjs/cosmos-types": "^1.8.0",
"@interchainjs/ethereum": "1.7.8",
"@interchainjs/types": "1.7.8",
"@interchainjs/utils": "1.7.8",
"@interchainjs/auth": "1.7.9",
"decimal.js": "^10.4.3",
"interchainjs": "^1.8.1"
},
Expand Down
1 change: 1 addition & 0 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"dependencies": {
"@interchainjs/types": "1.7.8",
"decimal.js": "^10.4.3",
"bech32": "^2.0.0"
}
}

0 comments on commit 31f7f43

Please sign in to comment.