From 96cb0191a14be8448796bac750bf74a3d29bd3fa Mon Sep 17 00:00:00 2001 From: Vadim Yavorsky Date: Wed, 18 Dec 2024 19:59:35 +0000 Subject: [PATCH] Replace Exception with ValueError for input validation in MultiSigWalletGenerator --- .../multisigwallet_generator.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/predeployed/src/multisigwallet_predeployed/multisigwallet_generator.py b/predeployed/src/multisigwallet_predeployed/multisigwallet_generator.py index 26e4f42..ceec4e4 100644 --- a/predeployed/src/multisigwallet_predeployed/multisigwallet_generator.py +++ b/predeployed/src/multisigwallet_predeployed/multisigwallet_generator.py @@ -57,15 +57,15 @@ def generate_storage(cls, **kwargs) -> Dict[str, str]: required_confirmations = kwargs.get('required_confirmations', 1) if len(originator_addresses) > cls.MAX_OWNER_COUNT: - raise Exception('Number of originators must not be more than 50') + raise ValueError('Number of originators must not be more than 50') if required_confirmations > len(originator_addresses): - raise Exception('Number of required confirmations must be less' - 'or equal than number of originators') + raise ValueError('Number of required confirmations must be less' + 'or equal than number of originators') storage: Dict[str, str] = {} for originator_address in originator_addresses: if originator_address == cls.ZERO_ADDRESS: - raise Exception('Originator address must not be zero') + raise ValueError('Originator address must not be zero') is_owner_value_slot = cls.calculate_mapping_value_slot( cls.IS_OWNER_SLOT, originator_address,