Skip to content

Commit

Permalink
validate_and_parse
Browse files Browse the repository at this point in the history
  • Loading branch information
malik672 committed Dec 25, 2023
1 parent bcbdf27 commit 7da537a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/validate_and_parse_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ mod tests {
#[test]
fn test_validate_and_parse_address() {
let valid_address = "0x1234567890123456789012345678901234567890";
let expected_checksummed_address = "0x5a0b54d5dc17e0aadc383d2db43b0a0d3e029c4c";

assert_eq!(
validate_and_parse_address(valid_address),
Ok(expected_checksummed_address.to_string())
Ok(valid_address.to_string())
);

let invalid_address = "0xinvalidaddress";
let invalid_address = "0xInvAlIdAddrEsS";
assert_eq!(
validate_and_parse_address(invalid_address),
Err(format!("{} is not a valid Ethereum address.", invalid_address))
Expand Down

0 comments on commit 7da537a

Please sign in to comment.