Hello. I am facing an issue with the method getCosmWasmClient from the useChain hook.
For starters, I am using my own chain with a custom config.
Here's the ChainProvider code (obfuscated):
Calling const { getCosmWasmClient } = useChain(MY_CHAIN.chain_name); from the component and then trying to use getCosmWasmClient does not work. I get the following error:
Uncaught (in promise) Something wrong! Probably no valid RPC endpoint for chain my-chain
The interesting part is that getStargateClient works perfectly fine. It connects to my endpoints and I can even sign transactions normally. The problem is only with the getCosmWasmClient. It also throws a lot (hundreds) of errors like this:
Access to XMLHttpRequest at 'https://rpc.cosmos.directory/my-chain' from origin 'http://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
It appears it is not using the endpoints I configured for cosmwasm, only for the regular stargate.
Hello. I am facing an issue with the method
getCosmWasmClient
from theuseChain
hook. For starters, I am using my own chain with a custom config. Here's the ChainProvider code (obfuscated):Calling
const { getCosmWasmClient } = useChain(MY_CHAIN.chain_name);
from the component and then trying to usegetCosmWasmClient
does not work. I get the following error:The interesting part is that
getStargateClient
works perfectly fine. It connects to my endpoints and I can even sign transactions normally. The problem is only with thegetCosmWasmClient
. It also throws a lot (hundreds) of errors like this:It appears it is not using the endpoints I configured for cosmwasm, only for the regular stargate.
I am using v2.18.0. Any help is much appreciated.