Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECHOT-316] Up library patch version >> 0.1.59: Update transaction class #11

Merged
merged 6 commits into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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