hyperweb-io / hyperweb-io/cosmos-kit

[@cosmos-kit/cosmos-extension-metamask] Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03

Open
#470 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
201
Forks
159
PR merge metrics
No merged PRs in 30d

Description

Hey, I'm facing an issue trying to use metamask snaps with the Akash chain through cosmoskit.

When calling `estimateFee` I get the following error:
`Public key must be compressed secp256k1, i.e. 33 bytes starting with 0x02 or 0x03`

It looks like the issue is caused by `pubkey` being an Object which causes `pubkey.length` to be `undefined`.

![image](https://github.com/cosmology-tech/cosmos-kit/assets/2829180/7f62d15b-dfae-47fe-af2a-8b06f5950e3c)

![image](https://github.com/cosmology-tech/cosmos-kit/assets/2829180/ce785411-abd3-41aa-bd43-f1ab4b5fa1ef)

If I try the same transaction with a Keplr wallet instead, the pubkey is a Uint8Array and no error is thrown.

Here are the versions I'm using:
```
"@cosmjs/encoding": "^0.32.3",
"@cosmjs/proto-signing": "^0.32.3",
"@cosmjs/stargate": "^0.32.3",
"@cosmos-kit/cosmos-extension-metamask": "^0.8.0",
"@cosmos-kit/cosmostation-extension": "^2.11.0",
"@cosmos-kit/keplr": "^2.10.1",
"@cosmos-kit/leap-extension": "^2.11.0",
"@cosmos-kit/react": "^2.15.0",
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.