diff --git a/README.md b/README.md index 91196ecb..3dc446c6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ sudo dnf install python3-devel autoconf automake gcc gcc-c++ libffi-devel libtoo **macOS** ```bash -brew install autoconf automake libtool +brew install autoconf automake libtool bufbuild/buf/buf ``` ### Quick Start @@ -67,7 +67,7 @@ Upgrade `pip` to the latest version, if you see these warnings: 3. Fetch latest denom config ``` -poetry run python pyinjective/fetch_metadata.py +poetry run python pyinjective/utils/fetch_metadata.py ``` Note that the [sync client](https://github.com/InjectiveLabs/sdk-python/blob/master/pyinjective/client.py) has been deprecated as of April 18, 2022. If you are using the sync client please make sure to transition to the [async client](https://github.com/InjectiveLabs/sdk-python/blob/master/pyinjective/async_client.py), for more information read [here](https://github.com/InjectiveLabs/sdk-python/issues/101) diff --git a/tests/core/test_network_deprecation_warnings.py b/tests/core/test_network_deprecation_warnings.py index db27655b..1764576c 100644 --- a/tests/core/test_network_deprecation_warnings.py +++ b/tests/core/test_network_deprecation_warnings.py @@ -16,6 +16,7 @@ def test_use_secure_connection_parameter_deprecation_warning(self): chain_id="chain_id", fee_denom="fee_denom", env="env", + official_tokens_list_url="https://tokens.url", chain_cookie_assistant=DisabledCookieAssistant(), exchange_cookie_assistant=DisabledCookieAssistant(), explorer_cookie_assistant=DisabledCookieAssistant(), @@ -40,6 +41,7 @@ def test_use_secure_connection_parameter_in_custom_network_deprecation_warning(s chain_stream_endpoint="chain_stream_endpoint", chain_id="chain_id", env="env", + official_tokens_list_url="https://tokens.url", chain_cookie_assistant=DisabledCookieAssistant(), exchange_cookie_assistant=DisabledCookieAssistant(), explorer_cookie_assistant=DisabledCookieAssistant(), diff --git a/tests/test_async_client.py b/tests/test_async_client.py index b7b597ed..d814a7f1 100644 --- a/tests/test_async_client.py +++ b/tests/test_async_client.py @@ -87,7 +87,11 @@ async def test_initialize_tokens_and_markets( ape_usdt_spot_market_meta, btc_usdt_perp_market_meta, first_match_bet_market_meta, + aioresponses, ): + test_network = Network.local() + aioresponses.get(test_network.official_tokens_list_url, payload=[]) + spot_servicer.markets_responses.append( injective_spot_exchange_rpc_pb2.MarketsResponse( markets=[inj_usdt_spot_market_meta, ape_usdt_spot_market_meta] @@ -101,7 +105,7 @@ async def test_initialize_tokens_and_markets( ) client = AsyncClient( - network=Network.local(), + network=test_network, insecure=False, ) @@ -144,7 +148,11 @@ async def test_initialize_tokens_from_chain_denoms( spot_servicer, derivative_servicer, smart_denom_metadata, + aioresponses, ): + test_network = Network.local() + aioresponses.get(test_network.official_tokens_list_url, payload=[]) + pagination = pagination_pb.PageResponse( total=1, ) @@ -163,7 +171,7 @@ async def test_initialize_tokens_from_chain_denoms( ) client = AsyncClient( - network=Network.local(), + network=test_network, insecure=False, )