Skip to content

Commit 537294b

Browse files
author
abel
committed
Merge branch 'dev' of https://github.com/InjectiveLabs/sdk-python into feat/add_chain_streams_support
2 parents a29b821 + 0b3b17b commit 537294b

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

pyinjective/core/broadcaster.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,12 @@ def new_for_grantee_account_without_simulation(
146146
return instance
147147

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

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

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@ name = "injective-py"
33
version = "0.10.dev"
44
description = "Injective Python SDK, with Exchange API Client"
55
authors = ["Injective Labs <[email protected]>"]
6-
license = "Apache Software License 2.0"
6+
license = "Apache-2.0"
77
readme = "README.md"
8+
homepage = "https://injectivelabs.org/"
9+
repository = "https://github.com/InjectiveLabs/sdk-python"
10+
documentation = "https://api.injective.exchange/"
11+
keywords = ["injective", "blockchain", "cosmos", "injectivelabs"]
12+
classifiers = [
13+
"Intended Audience :: Developers",
14+
]
815
packages = [
916
{ include = "pyinjective" },
1017
]

0 commit comments

Comments
 (0)