Skip to content

Commit

Permalink
find assets by token
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Apr 19, 2024
1 parent eadc325 commit 1028cb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mantis/blackbox/cvm_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ def find_asset_by_token(token: str) -> Optional[AssetItem]:
if isinstance(onchain.exchange.root, OsmosisPool):
subonchain: OsmosisPool = onchain.exchange.root
pool_id = subonchain.osmosis_pool_manager_module_v1_beta1.pool_id
indexer = [c for c in indexers_2.root if c.id == str(pool_id)]
indexer = [c for c in indexers_2.root if c.id == str(pool_id) or c.pool_id == str(pool_id)]
if any(indexer):
indexer = indexer[0]
indexer = indexer[0]
token_a = indexer.token0 if indexer.token0 else indexer.pool_assets[0].token.denom
token_b = indexer.token1 if indexer.token1 else indexer.pool_assets[1].token.denom
asset_a = find_asset_by_token(token_a)
Expand Down

0 comments on commit 1028cb7

Please sign in to comment.