From 16704be0a0f44ae6c395646eb3faffdfc5254084 Mon Sep 17 00:00:00 2001 From: Ulrich Petri Date: Fri, 6 Sep 2019 13:31:07 +0200 Subject: [PATCH] [HOTFIX-#238] Fix an incompatible return type introduced in #278 --- scenario_player/utils/token.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 = {