Skip to content

Commit

Permalink
Chore/bump version cosmjs (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
codingki authored Aug 16, 2023
2 parents a4d438c + 4f073cf commit 1f46df1
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 444 deletions.
14 changes: 7 additions & 7 deletions packages/graz/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "graz",
"description": "React hooks for Cosmos",
"version": "0.0.45",
"version": "0.0.46",
"author": "Griko Nibras <[email protected]>",
"repository": "https://github.com/graz-sh/graz.git",
"homepage": "https://github.com/graz-sh/graz",
Expand Down Expand Up @@ -30,13 +30,13 @@
"prepublishOnly": "pnpm build"
},
"dependencies": {
"@cosmjs/cosmwasm-stargate": "^0.30.1",
"@cosmjs/cosmwasm-stargate": "^0.31.0",
"@cosmjs/launchpad": "^0.27.1",
"@cosmjs/proto-signing": "^0.30.1",
"@cosmjs/stargate": "^0.30.1",
"@cosmjs/tendermint-rpc": "^0.30.1",
"@keplr-wallet/cosmos": "^0.12.10",
"@keplr-wallet/types": "^0.12.10",
"@cosmjs/proto-signing": "^0.31.0",
"@cosmjs/stargate": "^0.31.0",
"@cosmjs/tendermint-rpc": "^0.31.0",
"@keplr-wallet/cosmos": "^0.12.20",
"@keplr-wallet/types": "^0.12.20",
"@tanstack/react-query": "^4.29.14",
"@tanstack/react-query-devtools": "^4.29.14",
"@vectis/extension-client": "^0.7.1",
Expand Down
1 change: 1 addition & 0 deletions packages/graz/src/actions/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export const connect = async (args?: ConnectArgs): Promise<ConnectResult> => {
});
typeof window !== "undefined" && window.sessionStorage.setItem(RECONNECT_SESSION_KEY, "Active");
const { account } = useGrazSessionStore.getState();
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return { account: account!, walletType: currentWalletType, chain };
} catch (error) {
console.error("connect ", error);
Expand Down
2 changes: 2 additions & 0 deletions packages/graz/src/hooks/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export const useAccount = ({ onConnect, onDisconnect }: UseAccountArgs = {}) =>
const { account, activeChain } = useGrazSessionStore.getState();
const { walletType } = useGrazInternalStore.getState();
onConnect?.({
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
account: account!,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chain: activeChain!,
walletType,
isReconnect: prevStat === "reconnecting",
Expand Down
6 changes: 4 additions & 2 deletions packages/graz/src/hooks/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ export const useActiveChainValidators = <T extends QueryClient & StakingExtensio
const queryKey = ["USE_ACTIVE_CHAIN_VALIDATORS", queryClient, status] as const;
const query = useQuery(
queryKey,
({ queryKey: [, _queryClient, _status] }) => {
return _queryClient!.staking.validators(_status);
async ({ queryKey: [, _queryClient, _status] }) => {
if (!_queryClient) throw new Error("Query client is not defined");
const res = await _queryClient.staking.validators(_status);
return res;
},
{
enabled: typeof queryClient !== "undefined",
Expand Down
Loading

0 comments on commit 1f46df1

Please sign in to comment.