cosmos / cosmjs

The Swiss Army knife to power JavaScript based client solutions ranging from Web apps/explorers over browser extensions to server-side clients like faucets/scrapers.
https://cosmos.github.io/cosmjs/
Apache License 2.0
635 stars 328 forks source link

can't convert a gov/v1 Proposal to gov/v1beta1 Proposal when amount of proposal messages not exactly one #1537

Open rickball opened 7 months ago

rickball commented 7 months ago

Hi,

I'm not able to query proposals via latest @cosmjs libs. I'm receiving mentioned error:

Query failed with (6): can't convert a gov/v1 Proposal to gov/v1beta1 Proposal when amount of proposal messages not exactly one

It seems that @cosmjs/stargate is still using cosmjs-types/cosmos/gov/v1beta1/query which is not able to proceed gov/v1 proposals.

Currently I'm receiving this error when trying to access Osmosis proposals.

Is there any way how to access it rn?

Thanks

rickball commented 6 months ago

any thoughts, please?

zakarialounes commented 5 months ago

@rickball I'm not part of the team. From the .proto files you can generate the gov/v1/query.ts file and then use QueryClientImplem to fetch Proposals. Not necessarily obvious if you've never done it, but it's a good way to understand how everything works until it's managed by cosmjs itself.