Skip to content

Commit

Permalink
hex for felt
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Nov 28, 2024
1 parent 30938be commit 2487b19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/dojo/types/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ impl Ty {
"low": low.to_string()
}))

Check warning on line 339 in crates/dojo/types/src/schema.rs

View check run for this annotation

Codecov / codecov/patch

crates/dojo/types/src/schema.rs#L317-L339

Added lines #L317 - L339 were not covered by tests
}
Primitive::Felt252(Some(v)) => Ok(json!(v.to_string())),
Primitive::ClassHash(Some(v)) => Ok(json!(v.to_string())),
Primitive::ContractAddress(Some(v)) => Ok(json!(v.to_string())),
Primitive::Felt252(Some(v)) => Ok(json!(format!("{:#x}", v))),
Primitive::ClassHash(Some(v)) => Ok(json!(format!("{:#x}", v))),
Primitive::ContractAddress(Some(v)) => Ok(json!(format!("{:#x}", v))),
_ => Err(PrimitiveError::MissingFieldElement),

Check warning on line 344 in crates/dojo/types/src/schema.rs

View check run for this annotation

Codecov / codecov/patch

crates/dojo/types/src/schema.rs#L341-L344

Added lines #L341 - L344 were not covered by tests
},
Ty::Struct(s) => {
Expand Down

0 comments on commit 2487b19

Please sign in to comment.