Skip to content

Commit cb3382d

Browse files
Oracle JSON test: qualify json! so it compiles for wasm
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 54a07a5 commit cb3382d

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

‎crates/quote/src/oracle.rs‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,7 @@ mod tests {
511511
signed.signer,
512512
address!("0x1234567890123456789012345678901234567890")
513513
);
514-
assert_eq!(
515-
signed.domainSeparator,
516-
FixedBytes::<32>::repeat_byte(0xd5)
517-
);
514+
assert_eq!(signed.domainSeparator, FixedBytes::<32>::repeat_byte(0xd5));
518515
assert_eq!(signed.context.len(), 1);
519516
assert_eq!(signed.context[0], ctx_val);
520517
assert_eq!(signed.signature, Bytes::from(vec![0xaa, 0xbb, 0xcc]));
@@ -523,7 +520,7 @@ mod tests {
523520
#[test]
524521
fn test_oracle_response_json_requires_domain_separator() {
525522
let domain = format!("0x{}", "d5".repeat(32));
526-
let with_domain: OracleResponse = serde_json::from_value(json!({
523+
let with_domain: OracleResponse = serde_json::from_value(serde_json::json!({
527524
"signer": "0x1234567890123456789012345678901234567890",
528525
"domainSeparator": domain,
529526
"context": [format!("0x{}", "2a".repeat(32))],
@@ -536,10 +533,10 @@ mod tests {
536533
);
537534
assert_eq!(
538535
serde_json::to_value(&with_domain).unwrap()["domainSeparator"],
539-
json!(domain)
536+
serde_json::json!(domain)
540537
);
541538

542-
let without_domain = serde_json::from_value::<OracleResponse>(json!({
539+
let without_domain = serde_json::from_value::<OracleResponse>(serde_json::json!({
543540
"signer": "0x1234567890123456789012345678901234567890",
544541
"context": [format!("0x{}", "2a".repeat(32))],
545542
"signature": "0xaabbcc",

0 commit comments

Comments
 (0)