Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 23e7471

Browse files
committed
more missing bytes encodings
1 parent 8bce715 commit 23e7471

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ethereum/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def check_and_strip_checksum(x):
144144

145145
def normalize_address(x, allow_blank=False):
146146
if allow_blank and (x == '' or x == b''):
147-
return ''
147+
return b''
148148
if len(x) in (42, 50) and x[:2] == '0x':
149149
x = x[2:]
150150
if len(x) in (40, 48):
@@ -335,7 +335,7 @@ def scan_int(v):
335335

336336
def int_to_hex(x):
337337
o = encode_hex(encode_int(x))
338-
return '0x' + (o[1:] if (len(o) > 0 and o[0] == '0') else o)
338+
return b'0x' + (o[1:] if (len(o) > 0 and o[0] == b'0') else o)
339339

340340

341341
def remove_0x_head(s):

0 commit comments

Comments
 (0)