Skip to content

Commit

Permalink
[HOTFIX-#238] Fix an incompatible return type introduced in #278
Browse files Browse the repository at this point in the history
  • Loading branch information
Nils Diefenbach authored Sep 6, 2019
2 parents a06a432 + 16704be commit 20bce25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scenario_player/utils/token.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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 = {
Expand Down

0 comments on commit 20bce25

Please sign in to comment.