metaplex-foundation / beet

Borsh compatible De/Serializer
https://metaplex-foundation.github.io/beet/
35 stars 15 forks source link

Wrong Enum Index #23

Closed austbot closed 2 years ago

austbot commented 2 years ago

Reproduction

Use an ENUM onchain and use solita to generate an SDK. If you pass the enum value into the instruction method it will deserialize it with an incorrect index that is +n of the enum members due to how js represents ts enums.