Comments (3)
Great point and I believe this is possible? cc @liujun93
signing clients will need to have connection, but query clients shouldn't need to. Totally agree.
from cosmos-kit.
@vinodhum We don't require connected status if getCosmWasmClient & getStargateClient.
try this
import { useChainWallet, useChain } from "@cosmos-kit/react";
import { useEffect } from "react";
export default function TestPage() {
const { getStargateClient } = useChain("cosmoshub");
// const { getStargateClient } = useChainWallet("cosmoshub", "keplr-extension");
useEffect(() => {
getStargateClient().then((client) => {
console.log("%ctest.tsx line:9 client", "color: #007acc;", client);
});
}, []);
return <div></div>;
}
from cosmos-kit.
Thank you @liujun93, for some reason when I tried it didn’t work but your code works, Thank you.
from cosmos-kit.
Related Issues (20)
- useChains bug when one chain has already connected
- Issue with a local chain and keplr HOT 2
- cosmos-kit bundle depends on bip39, I don't think it should HOT 1
- Wallet gets disconnected when switching chains HOT 6
- @interchain-ui 'UserId' is not exported from 'react' HOT 3
- Migration to V2 HOT 18
- Have to click multiple times on Keplr modal to add a chain HOT 4
- No Chain Info for [chain-id] Error When Adding New Chains using useChains hook HOT 2
- cosmos kit address not updating when switching keplr address after closing tab HOT 4
- Leap Cosmos Metamask: Chain ID does not match signer chain ID HOT 1
- Cosmos kit can't keep state login when coin98 extension is disabled HOT 2
- fix useChain HOT 5
- How to style the close modal button HOT 2
- QR code WalletConnect HOT 10
- `<ChainProvider>` props cannot be changed after first render HOT 3
- Warning: Invalid DOM property `fill-rule`. Did you mean `fillRule`? HOT 2
- useChains() error at addChain() bad version HOT 17
- re-sign ins with `useChains` HOT 1
- Support for Reactjs 18 (vite, ts) / Uncaught ReferenceError: Buffer is not defined
- react & react-lite : GasPrice' is not assignable to type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosmos-kit.