mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 18:37:59 +00:00
SS58 addresses in BFT (#823)
* SS58 addresses in BFT Closes #590 * Fix wasm compile
This commit is contained in:
@@ -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..])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user