hyperweb-io / hyperweb-io/cosmology-cli

Method getPools returns wrong LcdPool[] properties

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
50
Forks
21
PR merge metrics
No merged PRs in 30d

Description

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.

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.