From 719e08f8f553f56851490898c9d86032ffe35bc4 Mon Sep 17 00:00:00 2001 From: AnthonyLaw Date: Sat, 7 Oct 2023 00:47:29 +0800 Subject: [PATCH] [lightapi/python] task: removed unused field --- lightapi/python/symbollightapi/model/Transaction.py | 7 ++----- lightapi/python/tests/model/test_Transaction.py | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lightapi/python/symbollightapi/model/Transaction.py b/lightapi/python/symbollightapi/model/Transaction.py index aef370cab4..720d007b04 100644 --- a/lightapi/python/symbollightapi/model/Transaction.py +++ b/lightapi/python/symbollightapi/model/Transaction.py @@ -183,8 +183,7 @@ def __init__( deadline, signature, signatures, - other_transaction, - inner_hash + other_transaction ): """Create MultisigTransaction model.""" @@ -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 ]) diff --git a/lightapi/python/tests/model/test_Transaction.py b/lightapi/python/tests/model/test_Transaction.py index 7a0b125d48..a1b2d99695 100644 --- a/lightapi/python/tests/model/test_Transaction.py +++ b/lightapi/python/tests/model/test_Transaction.py @@ -66,8 +66,7 @@ 'other_transaction': TransferTransaction( **COMMON_ARGS, **TRANSFER_TRANSACTION_ARGS - ), - 'inner_hash': '306f20260a1b7af692834809d3e7d53edd41616d5076ac0fac6cfa75982185df' + ) } NAMESPACE_REGISTRATION_TRANSACTION_ARGS = { @@ -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): @@ -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):