Skip to content

Commit

Permalink
fix: fix query_id generation
Browse files Browse the repository at this point in the history
  • Loading branch information
gtors committed Apr 18, 2024
1 parent 3bb235b commit bbf36fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tonsdk_ng/boc/_bit_string.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def get_free_bits(self) -> int:
def get_used_bits(self):
return self.cursor

def write_bit_array(self, ba: bytearray):
def write_bit_array(self, ba: bytearray | bytes):
"""Writes a bytearray as a bit array one bit by one."""
for b in ba.decode("utf-8"):
self.write_bit(b)
Expand Down
4 changes: 2 additions & 2 deletions tonsdk_ng/contract/wallet/_highload_wallet_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def create_transfer_message(
timeout=60,
dummy_signature=False,
):
if query_id < int(time.time() + timeout) << 32:
query_id = int(time.time() + timeout) << 32 + query_id
if query_id < (t := int(time.time() + timeout) << 32):
query_id = t + query_id

signing_message = self.create_signing_message(query_id)
recipients = begin_dict(16)
Expand Down

0 comments on commit bbf36fe

Please sign in to comment.