diff --git a/substrate/core/primitives/src/authority_id.rs b/substrate/core/primitives/src/authority_id.rs index c82261bce5..39134530b9 100644 --- a/substrate/core/primitives/src/authority_id.rs +++ b/substrate/core/primitives/src/authority_id.rs @@ -36,14 +36,15 @@ impl AuthorityId { #[cfg(feature = "std")] impl ::std::fmt::Display for AuthorityId { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "{}", ::hexdisplay::HexDisplay::from(&self.0)) + write!(f, "{}", ::ed25519::Public(self.0).to_ss58check()) } } #[cfg(feature = "std")] impl ::std::fmt::Debug for AuthorityId { fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { - write!(f, "{}", ::hexdisplay::HexDisplay::from(&self.0)) + let h = format!("{}", ::hexdisplay::HexDisplay::from(&self.0)); + write!(f, "{} ({}…{})", ::ed25519::Public(self.0).to_ss58check(), &h[0..8], &h[60..]) } }