File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments