File tree 1 file changed +2
-4
lines changed
components/ordhook-core/src/db/models
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,7 @@ impl DbInscription {
43
43
tx_index : usize ,
44
44
timestamp : u32 ,
45
45
) -> Self {
46
- // Remove null bytes from `content` and `content_type`
47
- let mut content = hex:: decode ( & reveal. content_bytes [ 2 ..] ) . unwrap ( ) ;
48
- content. retain ( |& x| x != 0 ) ;
46
+ // Remove null bytes from `content_type`
49
47
let mut content_type_bytes = reveal. content_type . clone ( ) . into_bytes ( ) ;
50
48
content_type_bytes. retain ( |& x| x != 0 ) ;
51
49
let content_type = String :: from_utf8 ( content_type_bytes) . unwrap ( ) ;
@@ -62,7 +60,7 @@ impl DbInscription {
62
60
mime_type : content_type. split ( ';' ) . nth ( 0 ) . unwrap ( ) . to_string ( ) ,
63
61
content_type,
64
62
content_length : PgBigIntU32 ( reveal. content_length as u32 ) ,
65
- content,
63
+ content : hex :: decode ( & reveal . content_bytes [ 2 .. ] ) . unwrap ( ) ,
66
64
fee : PgNumericU64 ( reveal. inscription_fee ) ,
67
65
curse_type : reveal. curse_type . as_ref ( ) . map ( |c| match c {
68
66
OrdinalInscriptionCurseType :: DuplicateField => "duplicate_field" . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments