Skip to content

Commit

Permalink
Uppercase domain hash
Browse files Browse the repository at this point in the history
  • Loading branch information
alexroan committed Feb 28, 2025
1 parent 4e9b86e commit f02ff9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions safe/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ fn calculate_domain_hash(
};

let hash = keccak256(encoded);
Ok(format!("0x{}", hex::encode(hash)))
Ok(format!("0x{}", hex::encode(hash).to_uppercase()))
}

/// Helper function to calculate the message hash based on transaction parameters
Expand Down Expand Up @@ -315,7 +315,7 @@ mod tests {
let domain_hash = calculate_domain_hash(chain_id, address, version)?;
assert_eq!(
domain_hash,
"0x1655e94a9bcc5a957daa1acae692b4c22e7aaf146b4deb9194f8221d2f09d8c3"
"0x1655E94A9BCC5A957DAA1ACAE692B4C22E7AAF146B4DEB9194F8221D2F09D8C3"
);
Ok(())
}
Expand Down

0 comments on commit f02ff9e

Please sign in to comment.