osmosis-labs / osmojs

OsmosJS makes it easy to compose and broadcast Osmosis and Cosmos messages
https://cosmology.zone/products/osmojs
Apache License 2.0
63 stars 32 forks source link

Update e2e tests to use amino signer #42

Closed pyramation closed 1 year ago

pyramation commented 1 year ago

https://github.com/osmosis-labs/osmojs/blob/20f800edf85137a3dba21b19a430335232e52b25/packages/osmojs/starship/__tests__/gov.test.js#LL121C33-L121C56

looks like it's using direct signer, not the amino signer. The amino signer is the Secp256k1HdWallet

questions: should we do both, proto and amino signer? Maybe it doesn't hurt, although proto should theoretically always work.

cc @Anmol1696

pyramation commented 1 year ago

I've reverted to the functional version, so we can verify it's a starship issue, not the new osmojs protos:

https://github.com/osmosis-labs/osmojs/actions/runs/5340423154/jobs/9680224597

This is an amino error, is it possible we got the wrong sequence number, or chain-id?

    Broadcasting transaction failed with code 4 (codespace: sdk). Log: signature verification failed; please verify account number (19), sequence (0) and chain-id (osmosis-1): unauthorized
Anmol1696 commented 1 year ago

For PR: 44 Hmm this is weird. I ran the tests with --runInBand to run sequentially, but still this issue seems to exist. Chain-id is correct. Sequence number should be correct too (--runInBand would have detected it).

When I saw unauthorized, i thought something in Osmosis changed on how to create pools, but that shuold be same right?

I will debug a little deeper for this and see where the error is.