Skip to content

Commit

Permalink
[ECHOT-316] Up library patch version >> 0.1.59: Update transaction class
Browse files Browse the repository at this point in the history
[ECHOT-316] Up library patch version >> 0.1.59: Update transaction class
  • Loading branch information
Eugene Vasilev authored Mar 12, 2020
1 parent 5ae1df8 commit dd83dd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 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 # todo: and self.has_all_fees
and self.chain_id is not None and self.has_all_fees

@property
def api(self):
Expand Down Expand Up @@ -160,7 +160,7 @@ def expiration(self, value):
@property
def has_all_fees(self):
for op in self._operations:
if 'fee' not in op or 'amount' not in op['fee']:
if 'fee' not in op[1] or 'amount' not in op[1]['fee']:
return False
return True

Expand All @@ -185,6 +185,9 @@ def add_operation(self, name, props):
if type(operation_id) is not int:
raise Exception('unknown operation {}'.format(name))

if not isinstance(props, dict):
raise Exception('argument "props" is not a dict')

operation = [operation_id, operation_class(props)]
self._operations.append(operation)
return self
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.58"
VERSION = "0.1.59"
packages = find_packages()
packages.remove('test')

Expand Down

0 comments on commit dd83dd2

Please sign in to comment.