Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method getPools returns wrong LcdPool[] properties #26

Open
WaDadidou opened this issue Jan 30, 2023 · 0 comments
Open

Method getPools returns wrong LcdPool[] properties #26

WaDadidou opened this issue Jan 30, 2023 · 0 comments

Comments

@WaDadidou
Copy link

Hi,
I got LcdPool[] by doing :

  • Make a client by instancing OsmosisApiClient
  • Call getPools(). Get a PoolsResponse containing LcdPool[]

The issue is that the received LcdPool[] have properties like pool_assets and not poolAssets. Same for total_weight and pool_params.
So, I have to "clean" my LcdPool[] before using it. With, for example if (pool.pool_params) pool.poolParams = pool.pool_params

Here is LcdPool : https://github.com/cosmology-tech/cosmology/blob/main/packages/core/src/types.ts#L284
Here is PoolsResponse : https://github.com/cosmology-tech/cosmology/blob/main/packages/core/src/clients/osmosis.ts#L21
Here is the method getPools() of OsmosisApiClient : https://github.com/cosmology-tech/cosmology/blob/main/packages/core/src/clients/osmosis.ts#L33

Wdyt ?
Thank you for your repo and your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant