cosmology-tech / cosmos-kit

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

fix: Leap Metamask Snaps signDirect - cannot read properties of undefined 'authInfoBytes' issue #410

Closed karancoder closed 6 months ago

karancoder commented 6 months ago

Issue: When calling signDirect on Leap Cosmos Metamask Snaps (v0.6.1), we are getting following error: TypeError: Cannot read properties of undefined (reading 'authInfoBytes') at CosmosSnapClient.signDirect

Cause: There should be await in this line. requestSignature from '@leapwallet/cosmos-snap-provider' is an async function.

Fix: Add await before requestSignature.