diff --git a/src/apps/nem/validators.py b/src/apps/nem/validators.py index c5d11c0e45..6db3402359 100644 --- a/src/apps/nem/validators.py +++ b/src/apps/nem/validators.py @@ -50,12 +50,13 @@ def validate_network(network: int) -> int: def _validate_single_tx(msg: NEMSignTx): # ensure exactly one transaction is provided - tx_count = bool(msg.transfer) + \ - bool(msg.provision_namespace) + \ - bool(msg.mosaic_creation) + \ - bool(msg.supply_change) + \ - bool(msg.aggregate_modification) + \ - bool(msg.importance_transfer) + tx_count = \ + bool(msg.transfer) + \ + bool(msg.provision_namespace) + \ + bool(msg.mosaic_creation) + \ + bool(msg.supply_change) + \ + bool(msg.aggregate_modification) + \ + bool(msg.importance_transfer) if tx_count == 0: raise ValueError('No transaction provided') if tx_count > 1: diff --git a/tests/test_apps.nem.hdnode.py b/tests/test_apps.nem.hdnode.py index ea109c6550..69db1a6c60 100644 --- a/tests/test_apps.nem.hdnode.py +++ b/tests/test_apps.nem.hdnode.py @@ -226,9 +226,9 @@ class TestNemHDNode(unittest.TestCase): ) encrypted = node.nem_encrypt(unhexlify(test['public']), - unhexlify(test['iv']), - unhexlify(test['salt']), - unhexlify(test['input'])) + unhexlify(test['iv']), + unhexlify(test['salt']), + unhexlify(test['input'])) self.assertEqual(encrypted, unhexlify(test['output'])) diff --git a/tests/test_apps.nem.multisig.aggregate_modification.py b/tests/test_apps.nem.multisig.aggregate_modification.py index 3b145d3a9d..94e222eb2b 100644 --- a/tests/test_apps.nem.multisig.aggregate_modification.py +++ b/tests/test_apps.nem.multisig.aggregate_modification.py @@ -52,7 +52,7 @@ class TestNemMultisigAggregateModification(unittest.TestCase): "43aa69177018fc3e2bdbeb259c81cddf24be50eef9c5386db51d82386c41475a")) self.assertEqual(hashlib.sha3_256(t).digest(True), - unhexlify("cc64ca69bfa95db2ff7ac1e21fe6d27ece189c603200ebc9778d8bb80ca25c3c")) + unhexlify("cc64ca69bfa95db2ff7ac1e21fe6d27ece189c603200ebc9778d8bb80ca25c3c")) def test_nem_transaction_aggregate_modification_relative_change(self): # http://bob.nem.ninja:8765/#/aggregate/1fbdae5ba753e68af270930413ae90f671eb8ab58988116684bac0abd5726584 diff --git a/tests/test_apps.nem.multisig.py b/tests/test_apps.nem.multisig.py index df85f3b7ab..ca82fe1bea 100644 --- a/tests/test_apps.nem.multisig.py +++ b/tests/test_apps.nem.multisig.py @@ -45,13 +45,13 @@ class TestNemMultisig(unittest.TestCase): def test_nem_multisig_2(self): # http://chain.nem.ninja/#/multisig/1016cf3bdd61bd57b9b2b07b6ff2dee390279d8d899265bdc23d42360abe2e6c m = _create_provision_msg(NEM_NETWORK_MAINNET, - 59414272, - 20000000, - 59500672, - "dim", - "", - "NAMESPACEWH4MKFMBCVFERDPOOP4FK7MTBXDPZZA", - 5000000000) + 59414272, + 20000000, + 59500672, + "dim", + "", + "NAMESPACEWH4MKFMBCVFERDPOOP4FK7MTBXDPZZA", + 5000000000) base_tx = serialize_provision_namespace(m.transaction, m.provision_namespace, unhexlify("a1df5306355766bd2f9a64efdc089eb294be265987b3359093ae474c051d7d5a")) m = _create_common_msg(NEM_NETWORK_MAINNET,