Skip to content

Commit 5287e6b

Browse files
committed
update sign()
1 parent 3991183 commit 5287e6b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tronapi/tron.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,8 +1127,6 @@ def to_hex(self, val):
11271127
If you wish to specifically convert TRX addresses to HEX,
11281128
please use tron.address.to_hex instead.
11291129
1130-
Args:
1131-
val (str): Value to convert to hex.
11321130
11331131
Example:
11341132
>>> tron.to_hex("test")
@@ -1138,7 +1136,7 @@ def to_hex(self, val):
11381136
if utils.is_bool(val):
11391137
return self.from_decimal(+val)
11401138

1141-
if isinstance(val, (dict, object)):
1139+
if type(val) == dict:
11421140
return self.from_utf8(json.dumps(val).replace(' ', ''))
11431141

11441142
if utils.is_string(val):

tronapi/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ def is_hex(s):
2323

2424

2525
def string_utf8_to_hex(name):
26-
return bytes(name, encoding='utf-8').hex()
26+
return bytes(name, encoding='utf-8').hex()

0 commit comments

Comments
 (0)