Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions DashWallet/Sources/UI/Menu/Security/Wallets/IdentitiesScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,14 @@ private struct IdentityRowView: View {
icon: "server.rack",
color: .indigo)
}
if row.isLocal {
// `isLocal` = mine-or-tracked: wallet-derived identities
// are always local, manual adds too. Badge only the rare
// incidental rows (observed identities nobody tracks).
if !row.isLocal {
IdentityBadge(
text: NSLocalizedString("Local Only", comment: "Identities"),
icon: "location",
color: .orange)
text: NSLocalizedString("Observed", comment: "Identities"),
icon: "eye",
color: .gray)
}
if row.pendingContestedName != nil {
IdentityBadge(
Expand Down Expand Up @@ -530,12 +533,16 @@ struct IdentityDetailScreen: View {
detailRow(
label: NSLocalizedString("Type", comment: "Identities"),
value: typeName)
divider
detailRow(
label: NSLocalizedString("Status", comment: ""),
value: row.isLocal
? NSLocalizedString("Local Only", comment: "Identities")
: NSLocalizedString("On Network", comment: "Identities"))
// A Status row only for the rare incidental case — every
// wallet identity is local, so an always-on "Local" row
// would be noise; the Wallet row below already names the
// owner when there is one.
if !row.isLocal {
divider
detailRow(
label: NSLocalizedString("Status", comment: ""),
value: NSLocalizedString("Observed", comment: "Identities"))
}
if let walletName = row.walletName {
divider
detailRow(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ final class IdentitiesViewModel: ObservableObject {
}

var failures = 0
for row in rows where !row.isLocal {
// Refresh every row — the old `!row.isLocal` filter dates from
// when the flag was misread as an on-network badge; under the
// real semantics (mine-or-tracked) it would skip exactly the
// wallet's own identities.
for row in rows {
do {
let fetched = try await sdk.identityGet(identityId: row.idBase58)
if let balance = Self.uint64(from: fetched["balance"]) {
Expand Down
Loading