Skip to content

Commit

Permalink
[ECHOT-316] Up library patch version >> 0.1.58: Small fixes in Transa…
Browse files Browse the repository at this point in the history
…ction class

[ECHOT-316] Up library patch version >> 0.1.58: Small fixes in Transaction class
  • Loading branch information
Eugene Vasilev authored Mar 12, 2020
1 parent 1b98d8e commit 5ae1df8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions echopy/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def depth_copy(op):
@property
def finalized(self):
return self._ref_block_num is not None and self._ref_block_prefix is not None\
and self.chain_id is not None and self.has_all_fees
and self.chain_id is not None # todo: and self.has_all_fees

@property
def api(self):
Expand Down Expand Up @@ -286,19 +286,16 @@ def set_global_chain_data(self):
if self.ref_block_num is None or self.ref_block_prefix is None:
global_chain_data = self._get_dynamic_global_chain_data('2.1.0')
ref_block_prefix = self.bytes_to_int(
sorted(
bytearray(decode(global_chain_data['head_block_id'], 'hex')[4:8]),
reverse=True
)
reversed(bytearray(decode(global_chain_data['head_block_id'], 'hex')[4:8]))
)
self.ref_block_num = global_chain_data['head_block_number'] & 0xffff,
self.ref_block_num = global_chain_data['head_block_number'] & 0xffff
self.ref_block_prefix = ref_block_prefix

def sign(self, _private_key=None):
if _private_key is not None:
self.add_signer(_private_key)

if self.check_not_finalized():
if not self.finalized:
self.set_global_chain_data()

if not self.has_all_fees:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from setuptools import setup, find_packages

VERSION = "0.1.57"
VERSION = "0.1.58"
packages = find_packages()
packages.remove('test')

Expand Down

0 comments on commit 5ae1df8

Please sign in to comment.