diff --git a/scenario_player/utils/token.py b/scenario_player/utils/token.py index 2255833aa..2930b154e 100644 --- a/scenario_player/utils/token.py +++ b/scenario_player/utils/token.py @@ -1,6 +1,6 @@ import json import pathlib -from typing import Tuple, Union +from typing import Optional, Tuple, Union import structlog from eth_utils import decode_hex, to_checksum_address @@ -395,7 +395,7 @@ def mint( **kwargs, ) - def update_allowance(self) -> Union[Tuple[str, int], None]: + def update_allowance(self) -> Tuple[Optional[str], int]: """Update the UD Token Contract allowance depending on the number of configured nodes. If the UD Token Contract's allowance is sufficient, this is a no-op. @@ -414,7 +414,7 @@ def update_allowance(self) -> Union[Tuple[str, int], None]: if not udt_allowance < required_allowance: log.debug("UDTC allowance sufficient") - return + return None, required_allowance log.debug("UDTC allowance insufficient, updating") params = {