dev@locazia: nice fixes
This commit is contained in:
1 parent
4c0d6be3b1
commit
d65624faa5
3 files changed
+13
-6
No files matched your search
@@ -43,10 +43,7 @@ class ContentId:
|
||||
+ self.content_hash
|
||||
)
|
||||
if not (self.safe_onchain_index is None):
|
||||
oi_bin_hex = hex(self.safe_onchain_index)[2:]
|
||||
if len(oi_bin_hex) % 2 == 1:
|
||||
oi_bin_hex = '0' + oi_bin_hex
|
||||
|
||||
oi_bin_hex = (lambda x: (lambda y: (f"0{y}" if len(y) % 2 else y))(hex(x)[2:]))(self.safe_onchain_index)
|
||||
oi_bin_len = len(oi_bin_hex) // 2
|
||||
cid_bin += b'\xb0' + oi_bin_len.to_bytes(1, 'big') + bytes.fromhex(oi_bin_hex)
|
||||
if self.accept_type and include_accept_type:
|
||||
|
||||
Reference in new issue
Block a user