project-serum / serum-ts

Project Serum TypeScript monorepo
https://projectserum.com
Apache License 2.0
272 stars 246 forks source link

Calling loadInfo() function of pool js library fails #10

Open paul-schaaf opened 3 years ago

paul-schaaf commented 3 years ago

How to reproduce:

  1. create a pool with a deployed pool program
  2. import and call loadInfo() with params

Observed Error:

Uncaught (in promise) TypeError: exports.POOL_STATE_TAG.toBuffer is not a function
    at Object.isPoolState (schema.js?b2c4:48)
    at loadPoolInfo (index.js?4485:36)
paul-schaaf commented 3 years ago

Workaround: get account data through solana library and then use the decodePoolState function

mikhail-karan commented 3 years ago

I'm having this same issue. Will try the work around now.

mikhail-karan commented 3 years ago

I'm having an issue where my app freezes at decodePoolState