Skip to content

Commit

Permalink
Merge pull request #265 from InjectiveLabs/fix/sync_dev_with_master_095
Browse files Browse the repository at this point in the history
Fix/sync dev with master 0.9.5
  • Loading branch information
aarmoa authored Nov 7, 2023
2 parents fbbedf0 + df2f01b commit 05505fe
Show file tree
Hide file tree
Showing 9 changed files with 808 additions and 407 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [1.0.1] - 2023-11-07
### Changed
- Updated proto definitions to injective-core v1.12.2-testnet and injective-indexer v1.12.45-rc3

## [1.0] - 2023-11-01
### Added
- Added logic to support use of Client Order ID (CID) new identifier in OrderInfo
Expand All @@ -14,6 +18,13 @@ All notable changes to this project will be documented in this file.
- Remove `aiocron` dependency. Use plain asyncio tasks to solve the timeout height synchronization
- Updated the gas fee buffer used to calculate fee consumption in all examples

## [0.9.5]
* Updated fetch_metadata script (to synchronize denom ini files) to reuse logic in AsyncClient
* Synchronized denom ini files with Indexer information for mainnet, testnet and devnet

## [0.9.4]
* Added TIA/USDT spot market in mainnet and testnet ini file

## [0.9.3]
* Updated TIA/USDT-30NOV2023 market id in denoms_mainnet.ini file

Expand Down
17 changes: 13 additions & 4 deletions pyinjective/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,15 @@ async def _initialize_tokens_and_markets(self):
binary_option_markets = dict()
tokens = dict()
tokens_by_denom = dict()
markets_info = (await self.get_spot_markets()).markets
markets_info = (await self.get_spot_markets(market_status="active")).markets
valid_markets = (
market_info
for market_info in markets_info
if len(market_info.base_token_meta.SerializeToString()) > 0
and len(market_info.quote_token_meta.SerializeToString()) > 0
)

for market_info in markets_info:
for market_info in valid_markets:
if "/" in market_info.ticker:
base_token_symbol, quote_token_symbol = market_info.ticker.split(constant.TICKER_TOKENS_SEPARATOR)
else:
Expand Down Expand Up @@ -948,8 +954,11 @@ async def _initialize_tokens_and_markets(self):

spot_markets[market.id] = market

markets_info = (await self.get_derivative_markets()).markets
for market_info in markets_info:
markets_info = (await self.get_derivative_markets(market_status="active")).markets
valid_markets = (
market_info for market_info in markets_info if len(market_info.quote_token_meta.SerializeToString()) > 0
)
for market_info in valid_markets:
quote_token_symbol = market_info.quote_token_meta.symbol

quote_token = self._token_representation(
Expand Down
Loading

0 comments on commit 05505fe

Please sign in to comment.