Skip to content

Commit

Permalink
fix: all
Browse files Browse the repository at this point in the history
  • Loading branch information
nick134-bit committed May 15, 2024
1 parent fdb1c12 commit 9c3be9a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ import luncMenuLinks from './LUNCNavMenu.json'
import NavbarPopper from './NavbarPopper'
import bondingDisabledMenuLinks from './NavBondingDisabledMenu.json'
import menuLinks from './NavMenu.json'
import { useChain } from '@cosmos-kit/react-lite'

const Navbar = () => {
const { chainId, chainName } = useRecoilValue(chainState)
useChain(chainName)

const { isOpen, onOpen, onClose } = useDisclosure()
const currentChainName = chainName
Expand Down
2 changes: 2 additions & 0 deletions components/Pages/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { getChainLogoUrlByName } from 'util/getChainLogoUrlByName'
import { useGetDashboardDataAPI } from './hooks/getDashboardDataAPI'
import { useChainInfos } from 'hooks/useChainInfo'
import { WALLET_CHAIN_NAMES_BY_CHAIN_ID } from 'constants/networks'
import { useChain } from '@cosmos-kit/react-lite'

export type DashboardData = {
logoUrl: string
Expand All @@ -23,6 +24,7 @@ export type DashboardData = {
}
export const Dashboard: FC = () => {
const [dashboardState, setDashboardDataState] = useRecoilState(dashboardDataState)
useChain('migaloo') // force wallet connect status
const { data: dashboardData, isLoading } = useGetDashboardDataAPI()
const chains = useChainInfos()
const prices = usePrices()
Expand Down
5 changes: 2 additions & 3 deletions hooks/useClients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ import {
cosmwasmAminoConverters,
cosmwasmProtoRegistry,
} from '@nick134-bit/nicks-injectivejs/dist/codegen';
import { getHealthyRPCs } from '../services/useAPI';

export const useClients = (walletChainName: string) => {
const {
getCosmWasmClient,
getSigningCosmWasmClient,
isWalletConnected,
setDefaultSignOptions,
wallet, getOfflineSigner } = useChain(walletChainName)
wallet, getRpcEndpoint, getOfflineSigner } = useChain(walletChainName)

if (isWalletConnected && !wallet?.name.includes('station')) {
try {
Expand Down Expand Up @@ -55,7 +54,7 @@ export const useClients = (walletChainName: string) => {
};
const registry = new Registry(protoRegistry);
const aminoTypes = new AminoTypes(aminoConverters);
const endpoint = (await getHealthyRPCs('injective'))[0]
const endpoint = await getRpcEndpoint()
const client = await InjectiveStargate.InjectiveSigningStargateClient.connectWithSigner(
endpoint,
offlineSigner, {
Expand Down

0 comments on commit 9c3be9a

Please sign in to comment.