@@ -105,17 +105,11 @@ def get_ethscription_with_content(tx_hash, block_tag: 'latest')
105105 ethscription_data = decoded [ 0 ]
106106 content_data = decoded [ 1 ]
107107
108- # Derive media_type and mime_subtype from mimetype
109- mimetype = ethscription_data [ 6 ] # mimetype is at index 6
110- media_type , mime_subtype = mimetype . split ( '/' , 2 ) if mimetype
111-
112108 {
113109 # Content fields
114110 content_uri_hash : '0x' + ethscription_data [ 0 ] . unpack1 ( 'H*' ) ,
115111 content_sha : '0x' + ethscription_data [ 1 ] . unpack1 ( 'H*' ) ,
116- mimetype : mimetype ,
117- media_type : media_type ,
118- mime_subtype : mime_subtype ,
112+ mimetype : ethscription_data [ 6 ] , # mimetype at index 6
119113 esip6 : ethscription_data [ 9 ] , # bool at index 9
120114
121115 # Main fields
@@ -161,17 +155,11 @@ def get_ethscription(tx_hash, block_tag: 'latest')
161155 # The struct is returned as an array
162156 ethscription_data = decoded [ 0 ]
163157
164- # Derive media_type and mime_subtype from mimetype
165- mimetype = ethscription_data [ 6 ] # mimetype is at index 6
166- media_type , mime_subtype = mimetype . split ( '/' , 2 ) if mimetype
167-
168158 {
169159 # Content fields
170160 content_uri_hash : '0x' + ethscription_data [ 0 ] . unpack1 ( 'H*' ) ,
171161 content_sha : '0x' + ethscription_data [ 1 ] . unpack1 ( 'H*' ) ,
172- mimetype : mimetype ,
173- media_type : media_type ,
174- mime_subtype : mime_subtype ,
162+ mimetype : ethscription_data [ 6 ] , # mimetype at index 6
175163 esip6 : ethscription_data [ 9 ] , # bool at index 9
176164
177165 # Main fields
0 commit comments