fix(profile): hide '_@' prefix on NIP-05 in profile header
Per NIP-05, when the local part is '_', the address should display as just the domain. The profile header was calling Nip05Id.toValue() which always returns 'name@domain', producing '_@houseofeff.com' on screen. Match the pattern already used in NIP05VerificationDisplay, AwardBadgeScreen, RelayManagementScreen, and NewCommunityScreen.
This commit is contained in:
+3
-1
@@ -338,8 +338,10 @@ fun DisplayNip05ProfileStatus(
|
||||
Text(
|
||||
text =
|
||||
remember(nip05State) {
|
||||
val name = nip05State.nip05.name
|
||||
val display = if (name == "_") nip05State.nip05.domain else "$name@${nip05State.nip05.domain}"
|
||||
buildAnnotatedString {
|
||||
appendLink(nip05State.nip05.toValue(), color) {
|
||||
appendLink(display, color) {
|
||||
runCatching { uri.openUri("https://${nip05State.nip05.domain}") }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user