Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/InjectiveLabs/sdk-python int…
Browse files Browse the repository at this point in the history
…o feat/add_chain_streams_support
  • Loading branch information
abel committed Oct 4, 2023
2 parents a29b821 + 0b3b17b commit 537294b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 6 additions & 2 deletions pyinjective/core/broadcaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ def new_for_grantee_account_without_simulation(
return instance

async def broadcast(self, messages: List[any_pb2.Any]):
await self._client.sync_timeout_height()
await self._client.get_account(self._account_config.trading_injective_address)
# Only force initialization of timeout_height and account info (number and sequence) if they are not initialized
# Done this way to allow users to handle timeout_height and sequence re-synchronization in case of errors
if self._client.timeout_height == 1:
await self._client.sync_timeout_height()
if self._client.number == 0:
await self._client.get_account(self._account_config.trading_injective_address)

messages_for_transaction = self._account_config.messages_prepared_for_transaction(messages=messages)

Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ name = "injective-py"
version = "0.10.dev"
description = "Injective Python SDK, with Exchange API Client"
authors = ["Injective Labs <[email protected]>"]
license = "Apache Software License 2.0"
license = "Apache-2.0"
readme = "README.md"
homepage = "https://injectivelabs.org/"
repository = "https://github.com/InjectiveLabs/sdk-python"
documentation = "https://api.injective.exchange/"
keywords = ["injective", "blockchain", "cosmos", "injectivelabs"]
classifiers = [
"Intended Audience :: Developers",
]
packages = [
{ include = "pyinjective" },
]
Expand Down

0 comments on commit 537294b

Please sign in to comment.