Show npub abbreviations instead of hex

Changelog-Changed: Show npub abbreviations instead of old-style hex
This commit is contained in:
William Casarin
2022-12-27 14:14:49 -08:00
parent aea271182e
commit 538ce45c2c
6 changed files with 15 additions and 7 deletions

View File

@@ -89,7 +89,8 @@ struct Profile: Codable {
}
static func displayName(profile: Profile?, pubkey: String) -> String {
return profile?.name ?? abbrev_pubkey(pubkey)
let pk = bech32_nopre_pubkey(pubkey) ?? pubkey
return profile?.name ?? abbrev_pubkey(pk)
}
}