Fixed bytes_argument_type

Encoding to bytes was breaking for nonempty bytes args.
pull/62/head
Neeraj Kashyap 2022-03-14 14:45:23 -07:00
rodzic c78dc5c3a1
commit c9fd4a9caf
1 zmienionych plików z 1 dodań i 4 usunięć

Wyświetl plik

@ -28,10 +28,7 @@ def boolean_argument_type(raw_value: str) -> bool:
f"Invalid boolean argument: {{raw_value}}. Value must be one of: {{','.join(TRUE_VALUES + FALSE_VALUES)}}"
)
def bytes_argument_type(raw_value: str) -> Union[str, bytes]:
# Have had issues with empty string in the past. Easier to convert it to empty byte string
if raw_value == "":
return b""
def bytes_argument_type(raw_value: str) -> str:
return raw_value
def get_abi_json(abi_name: str) -> List[Dict[str, Any]]: