From d615c6658a0e8174fdf06ad30834045ed917f44f Mon Sep 17 00:00:00 2001 From: Daniel Van Der Maden Date: Fri, 12 Jun 2020 05:39:33 -0700 Subject: [PATCH] [validator] Fix no valid address on instantiation of Validator * bump version --- pyhmy/_version.py | 2 +- pyhmy/validator.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyhmy/_version.py b/pyhmy/_version.py index 1bf79ad..5ad36dd 100644 --- a/pyhmy/_version.py +++ b/pyhmy/_version.py @@ -7,5 +7,5 @@ Provides pyhmy version information. from incremental import Version -__version__ = Version('pyhmy', 20, 5, 7) +__version__ = Version('pyhmy', 20, 5, 8) __all__ = ["__version__"] diff --git a/pyhmy/validator.py b/pyhmy/validator.py index 974896b..55da7d0 100644 --- a/pyhmy/validator.py +++ b/pyhmy/validator.py @@ -44,6 +44,8 @@ class Validator: min_required_delegation = 10000 def __init__(self, address): + if not isinstance(address, str): + raise InvalidValidatorError(1, f'given ONE address was not a string.') if not is_valid_address(address): raise InvalidValidatorError(1, f'{address} is not valid ONE address') self._address = address