Skip to content

Commit c4efc12

Browse files
author
Ivo Georgiev
committed
primitives/validator: use to_hex_non_prefix_string when possible
1 parent 8accb4d commit c4efc12

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

primitives/src/validator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl ValidatorId {
2828
}
2929

3030
pub fn to_hex_checksummed_string(&self) -> String {
31-
eth_checksum::checksum(&format!("0x{}", hex::encode(self.0)))
31+
eth_checksum::checksum(&format!("0x{}", self.to_hex_non_prefix_string()))
3232
}
3333
}
3434

@@ -79,7 +79,7 @@ impl TryFrom<&String> for ValidatorId {
7979

8080
impl fmt::Display for ValidatorId {
8181
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
82-
write!(f, "{}", format!("0x{}", hex::encode(self.0)))
82+
write!(f, "{}", format!("0x{}", self.to_hex_non_prefix_string()))
8383
}
8484
}
8585

0 commit comments

Comments
 (0)