cosmology-tech / cosmos-kit

Universal wallet connector for the Cosmos ⚛️
https://cosmology.zone/products/cosmos-kit
BSD 3-Clause Clear License
183 stars 132 forks source link

@cosmjs/proto-signing and @cosmjs/stargate incompatible? #234

Open Dizz02 opened 1 year ago

Dizz02 commented 1 year ago

Hi all

Trying to build with the send-token template found in here but keep failing on deployment. Is there an issue at the moment with those modules?

Type error: Type '(_chain: Chain) => { registry: Registry; aminoTypes: AminoTypes; }' is not assignable to type '(chain: Chain) => SigningStargateClientOptions'. Call signature return types '{ registry: Registry; aminoTypes: AminoTypes; }' and 'SigningStargateClientOptions' are incompatible. The types of 'registry' are incompatible between these types. Type 'import("/home/dizz0/APP-OIN-AIRDROP/node_modules/interchain/node_modules/@cosmjs/proto-signing/build/registry").Registry' is not assignable to type 'import("/home/dizz0/APP-OIN-AIRDROP/node_modules/@cosmjs/stargate/node_modules/@cosmjs/proto-signing/build/registry").Registry'. Types have separate declarations of a private property 'types'.

pyramation commented 1 year ago

we'll look into this asap

can you temporarily use ts-disable or the places you're using this? or ignore node_modules?

kenny019 commented 1 year ago

Bumping this, trying to implement on my local chain and I'm also facing this type issue when I use the transpiled getSigningClientOptions with telescope.

hoangdv2429 commented 8 months ago

@pyramation Can I work on this while upgrade it to yarn v4 sir

srph commented 1 month ago

On Stride, we mostly just put ts-expect-error where this happens. It's worked for us so far.

Not an expert of package management, but in my opinion, cosmos-kit should probably add cosmjs, et al as a peer dependency rather than a direct dependency.

My hunch is it would solve this issue as well as make it simpler to patch cosmjs (as a good number of people already do)