File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff 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 ):
Original file line number Diff line number Diff line change @@ -23,4 +23,4 @@ def is_hex(s):
2323
2424
2525def string_utf8_to_hex (name ):
26- return bytes (name , encoding = 'utf-8' ).hex ()
26+ return bytes (name , encoding = 'utf-8' ).hex ()
You can’t perform that action at this time.
0 commit comments