Skip to content

Commit

Permalink
[lightapi/python] task: removed unused field
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyLaw committed Oct 6, 2023
1 parent c908483 commit 719e08f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions lightapi/python/symbollightapi/model/Transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ def __init__(
deadline,
signature,
signatures,
other_transaction,
inner_hash
other_transaction
):
"""Create MultisigTransaction model."""

Expand All @@ -203,14 +202,12 @@ def __init__(

self.signatures = signatures
self.other_transaction = other_transaction
self.inner_hash = inner_hash

def __eq__(self, other):
return isinstance(other, MultisigTransaction) and all([
super().__eq__(other),
self.signatures == other.signatures,
self.other_transaction == other.other_transaction,
self.inner_hash == other.inner_hash
self.other_transaction == other.other_transaction
])


Expand Down
7 changes: 2 additions & 5 deletions lightapi/python/tests/model/test_Transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@
'other_transaction': TransferTransaction(
**COMMON_ARGS,
**TRANSFER_TRANSACTION_ARGS
),
'inner_hash': '306f20260a1b7af692834809d3e7d53edd41616d5076ac0fac6cfa75982185df'
)
}

NAMESPACE_REGISTRATION_TRANSACTION_ARGS = {
Expand Down Expand Up @@ -188,8 +187,7 @@ class MultisigTransactionTest(BaseTransactionTest):
TRANSACTION_ARGS = MULTISIG_TRANSACTION_ARGS
INVALID_OBJECT = BaseTransactionTest.INVALID_OBJECT + [
('signatures', []),
('other_transaction', 1),
('inner_hash', 'inner_hash')
('other_transaction', 1)
]

def test_eq_is_supported(self):
Expand Down Expand Up @@ -336,7 +334,6 @@ def test_create_multisig_transaction(self):
self._run_common_args_test(transaction)
self.assertEqual(MULTISIG_TRANSACTION_ARGS['signatures'], transaction.signatures)
self.assertEqual(MULTISIG_TRANSACTION_ARGS['other_transaction'], transaction.other_transaction)
self.assertEqual(MULTISIG_TRANSACTION_ARGS['inner_hash'], transaction.inner_hash)
self.assertEqual(TransactionType.MULTISIG.value, transaction.transaction_type)

def test_create_namespace_registration_transaction(self):
Expand Down

0 comments on commit 719e08f

Please sign in to comment.