From 26526283b86fcaf8f33edae6bd3cd6f9a199bdbe Mon Sep 17 00:00:00 2001 From: romchornyi Date: Wed, 11 Nov 2026 11:50:34 +0200 Subject: [PATCH 1/9] fix(dashconnect): a disconnect also turns off the app's keys on its owner's other contracts A disconnect of an App Connect app reads the owners of the contracts and contract groups its unrecorded keys are bound to, and turns off the keys on the app owner's other bindings (#1346). Connections shows them under the app. A key whose owner cannot be read, or that another connected app of the same owner may hold, stays on its own row and the result says so; the disconnect never reports no access left in that case (ADR-0032, ADR-0033). Co-Authored-By: Claude Opus 5.5 SDD-Published-From: d87d3085b57c9f27c4b18c91f428ba098e933250 --- .../xcshareddata/swiftpm/Package.resolved | 2 +- .../DashConnect/AppConnectProjection.swift | 234 +++++-- .../DashConnect/DashConnectDataSource.swift | 9 +- .../DashConnect/DashConnectModels.swift | 22 +- .../PlatformDashConnectDataSource.swift | 256 ++++++-- .../Components/ConnectionsMessageDialog.swift | 95 +++ .../UI/DashConnect/ConnectionsScreen.swift | 56 +- .../UI/DashConnect/ConnectionsViewModel.swift | 79 ++- .../Views/DashSpend/DashSpendPayScreen.swift | 4 +- .../Sources/UI/Home/HomeViewController.swift | 2 +- .../Dialogs/ModalDialog.swift | 12 +- DashWallet/ar.lproj/Localizable.strings | 8 +- DashWallet/bg.lproj/Localizable.strings | 8 +- DashWallet/ca.lproj/Localizable.strings | 8 +- DashWallet/cs.lproj/Localizable.strings | 8 +- DashWallet/da.lproj/Localizable.strings | 8 +- DashWallet/de.lproj/Localizable.strings | 8 +- DashWallet/el.lproj/Localizable.strings | 8 +- DashWallet/en.lproj/Localizable.strings | 8 +- DashWallet/eo.lproj/Localizable.strings | 8 +- DashWallet/es.lproj/Localizable.strings | 8 +- DashWallet/et.lproj/Localizable.strings | 8 +- DashWallet/fa.lproj/Localizable.strings | 8 +- DashWallet/fi.lproj/Localizable.strings | 8 +- DashWallet/fil.lproj/Localizable.strings | 8 +- DashWallet/fr.lproj/Localizable.strings | 8 +- DashWallet/hr.lproj/Localizable.strings | 8 +- DashWallet/hu.lproj/Localizable.strings | 8 +- DashWallet/id.lproj/Localizable.strings | 8 +- DashWallet/it.lproj/Localizable.strings | 8 +- DashWallet/ja.lproj/Localizable.strings | 8 +- DashWallet/ko.lproj/Localizable.strings | 8 +- DashWallet/mk.lproj/Localizable.strings | 8 +- DashWallet/ms.lproj/Localizable.strings | 8 +- DashWallet/nb.lproj/Localizable.strings | 8 +- DashWallet/nl.lproj/Localizable.strings | 8 +- DashWallet/pl.lproj/Localizable.strings | 8 +- DashWallet/pt.lproj/Localizable.strings | 8 +- DashWallet/ro.lproj/Localizable.strings | 8 +- DashWallet/ru.lproj/Localizable.strings | 8 +- DashWallet/sk.lproj/Localizable.strings | 8 +- DashWallet/sl.lproj/Localizable.strings | 8 +- DashWallet/sl_SI.lproj/Localizable.strings | 8 +- DashWallet/sq.lproj/Localizable.strings | 8 +- DashWallet/sr.lproj/Localizable.strings | 8 +- DashWallet/sv.lproj/Localizable.strings | 8 +- DashWallet/th.lproj/Localizable.strings | 8 +- DashWallet/tr.lproj/Localizable.strings | 8 +- DashWallet/uk.lproj/Localizable.strings | 8 +- DashWallet/vi.lproj/Localizable.strings | 8 +- DashWallet/zh-Hans.lproj/Localizable.strings | 8 +- .../zh-Hant-TW.lproj/Localizable.strings | 8 +- DashWallet/zh.lproj/Localizable.strings | 8 +- DashWallet/zh_TW.lproj/Localizable.strings | 8 +- .../AppConnectProjectionTests.swift | 247 +++++++- .../DashConnect/DashConnectStoreTests.swift | 2 +- .../PlatformDashConnectDataSourceTests.swift | 573 +++++++++++++++++- ...-from-platform-into-the-pure-projection.md | 57 ++ ...the-unrecorded-keys-the-question-listed.md | 50 ++ docs/adr/README.md | 2 + docs/design-system.md | 3 +- 61 files changed, 1803 insertions(+), 246 deletions(-) create mode 100644 DashWallet/Sources/UI/DashConnect/Components/ConnectionsMessageDialog.swift create mode 100644 docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md create mode 100644 docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md diff --git a/DashWallet.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DashWallet.xcworkspace/xcshareddata/swiftpm/Package.resolved index 3c8b0b84df..25a0e19447 100644 --- a/DashWallet.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DashWallet.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -7,7 +7,7 @@ "location": "https://github.com/dashpay/DashUIKit", "state": { "branch": "master", - "revision": "4494a8b317af9faf84f40369b9279488b3bc38ce" + "revision": "e8ae3e7fed1c6625adcbe58d65d0568d41fc7ab9" } } ], diff --git a/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift b/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift index 3969641f56..b74d27cbca 100644 --- a/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift +++ b/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift @@ -267,61 +267,38 @@ extension AppConnect { /// Every connection the wallet can show for these identities. An app /// with no intent appears when one of its contracts carries a live auth /// key no intent names. - static func project(_ snapshots: [IdentitySnapshot], intents: [ConnectionIntent]) -> Projection { + static func project(_ snapshots: [IdentitySnapshot], intents: [ConnectionIntent], owners: [Data: Data] = [:]) -> Projection { let byIdentity = Dictionary(snapshots.map { ($0.identityId, $0) }, uniquingKeysWith: { a, b in b.revision >= a.revision ? b : a }) - // An id an intent names is that intent's only while the key under - // it is the one the intent submits: one held by another key is that - // key's. - let named = Set(intents.flatMap { intent in - intent.keys.filter { key in - byIdentity[intent.identityId].map { presence(of: key, in: $0) != .conflicting } ?? true - }.map { IdentityKey(intent.identityId, $0.id) } - }) - - // The contracts each app's intents on each identity bind keys to. - var contractsOfApp: [Data: [Data: Set]] = [:] - for intent in intents { - contractsOfApp[intent.identityId, default: [:]][intent.appId, default: [intent.appId]] - .formUnion(intent.authKeys.compactMap(\.bound).filter { !isProfileBound($0) }.map(contractId(of:))) - } + let placing = UnrecordedPlacing(snapshots: Array(byIdentity.values), intents: intents) var unrecorded: [Data: [Data: [UInt32]]] = [:] var profile: [Data: [UInt32]] = [:] var unplaced: [Data: [UInt32]] = [:] for snapshot in snapshots { - for key in snapshot.keys where isAppConnectAuthKey(key) - && !named.contains(IdentityKey(snapshot.identityId, key.id)) { - guard let bound = key.bound else { - // The store does not hold the key's bound yet: whose it - // is cannot be told, and it is reported as such. - if !key.boundKnown { unplaced[snapshot.identityId, default: []].append(key.id) } + for key in snapshot.keys { + switch placing.placement(of: key, on: snapshot.identityId) { + case nil, .system: continue - } - if isProfileBound(bound) { - // No app can be told to hold it. It is offered with any - // app's disconnect, and stands as a connection of its - // own, so it can be turned off whatever other rows there - // are. + case .unplaced: + unplaced[snapshot.identityId, default: []].append(key.id) + case .profile: profile[snapshot.identityId, default: []].append(key.id) if let dashPay = dashPayContractIdData { unrecorded[dashPay, default: [:]][snapshot.identityId, default: []].append(key.id) } - continue - } - // A key bound to a system contract is no app's. One bound to - // a contract the intents of several apps bind (on this - // identity first) cannot be told to be any one of theirs: - // each of them shows it, and a disconnect of any of them - // turns it off with the user's confirm. - let contract = contractId(of: bound) - guard !systemContractIds.contains(contract.toBase58String()) else { continue } - func binding(_ contracts: [Data: Set]) -> [Data] { contracts.filter { $0.value.contains(contract) }.map(\.key) } - var apps = binding(contractsOfApp[snapshot.identityId] ?? [:]) - if apps.isEmpty { apps = Array(Set(contractsOfApp.values.flatMap(binding))) } - for app in apps.isEmpty ? [contract] : apps { - unrecorded[app, default: [:]][snapshot.identityId, default: []].append(key.id) + case .apps(let apps): + for app in apps { + unrecorded[app, default: [:]][snapshot.identityId, default: []].append(key.id) + } + case .noApp(let contract): + // It joins an app here only when attributed to it by + // owner; otherwise it stands on its own contract's row. + let apps = placing.apps(on: snapshot.identityId) + let attributed = apps.filter { ownerOutcome(of: contract, for: $0, among: apps, owners: owners) == .attributed } + let row = (attributed.count == 1 ? attributed.first : nil) ?? contract + unrecorded[row, default: [:]][snapshot.identityId, default: []].append(key.id) } } } @@ -350,6 +327,117 @@ extension AppConnect { unplacedKeyIds: unplaced) } + /// The ids whose owner the projection needs for `snapshot`: the contract + /// of every app with an intent on its identity, and the bound (contract, + /// or contract group) of every unrecorded key no intent names by + /// contract. Empty when there is no such key, or no app has an intent on + /// the identity: then no owner decides anything. + static func ownerIdsNeeded(snapshot: IdentitySnapshot, intents: [ConnectionIntent]) -> Set { + let placing = UnrecordedPlacing(snapshots: [snapshot], intents: intents) + let apps = placing.apps(on: snapshot.identityId) + guard !apps.isEmpty else { return [] } + let bounds = snapshot.keys.compactMap { key -> Data? in + guard case .noApp(let contract) = placing.placement(of: key, on: snapshot.identityId) else { return nil } + return contract + } + guard !bounds.isEmpty else { return [] } + return Set(bounds).union(apps) + } + + /// How an unrecorded key bound to a contract no intent names stands + /// against one app, by owner. + enum OwnerOutcome: Equatable { + /// The bound's known owner is the app's, and no other app here has + /// that owner or an unknown one. + case attributed + /// The bound's known owner is the app's, and another app here has it + /// too: whose the key is cannot be told. + case notAttributable + /// It may be the app's, but an owner that decides it is unknown. + case notChecked + /// It is not the app's: a known other owner, or the system's. + case notThisApp + } + + /// The owner rule, the only place it lives. `apps` are the apps with an + /// intent on the identity, `app` among them; `owners` holds the owners + /// read, and an id it lacks has an unknown owner, which is never a match + /// or a mismatch. + static func ownerOutcome( + of bound: Data, for app: Data, among apps: Set, owners: [Data: Data] + ) -> OwnerOutcome { + let boundOwner = owners[bound] + if boundOwner == systemContractOwnerId { return .notThisApp } + guard let boundOwner, let appOwner = owners[app] else { return .notChecked } + guard boundOwner == appOwner else { return .notThisApp } + let others = apps.subtracting([app]).map { owners[$0] } + if others.contains(appOwner) { return .notAttributable } + return others.contains(nil) ? .notChecked : .attributed + } + + /// Where an unrecorded key goes, before any owner is asked. + private enum UnrecordedPlacement: Equatable { + /// The store does not hold the key's bound yet: whose it is cannot be + /// told, and it is reported as such. + case unplaced + /// Bound to the DashPay profile. No app can be told to hold it. It is + /// offered with any app's disconnect, and stands as a connection of + /// its own, so it can be turned off whatever other rows there are. + case profile + /// Bound to a system contract: no app's. + case system + /// Bound to a contract the intents of these apps bind (on this + /// identity first). With several, it cannot be told to be any one + /// of theirs: each of them shows it, and a disconnect of any of them + /// turns it off with the user's confirm. + case apps([Data]) + /// Bound to a contract no intent binds; `contract` is the bound's + /// contract, or contract group. + case noApp(contract: Data) + } + + /// Which keys intents name, and the contracts their apps bind, for one + /// set of reads. + private struct UnrecordedPlacing { + private let named: Set + /// The contracts each app's intents on each identity bind keys to. + private let contractsOfApp: [Data: [Data: Set]] + + init(snapshots: [IdentitySnapshot], intents: [ConnectionIntent]) { + let byIdentity = Dictionary(snapshots.map { ($0.identityId, $0) }, uniquingKeysWith: { a, _ in a }) + // An id an intent names is that intent's only while the key + // under it is the one the intent submits: one held by another + // key is that key's. + named = Set(intents.flatMap { intent in + intent.keys.filter { key in + byIdentity[intent.identityId].map { presence(of: key, in: $0) != .conflicting } ?? true + }.map { IdentityKey(intent.identityId, $0.id) } + }) + var contractsOfApp: [Data: [Data: Set]] = [:] + for intent in intents { + contractsOfApp[intent.identityId, default: [:]][intent.appId, default: [intent.appId]] + .formUnion(intent.authKeys.compactMap(\.bound).filter { !isProfileBound($0) }.map(contractId(of:))) + } + self.contractsOfApp = contractsOfApp + } + + /// The apps with an intent on `identityId`. + func apps(on identityId: Data) -> Set { Set(contractsOfApp[identityId].map { Array($0.keys) } ?? []) } + + /// Nil for a key that is not an unrecorded App Connect key. + func placement(of key: PlatformKey, on identityId: Data) -> UnrecordedPlacement? { + guard isAppConnectAuthKey(key), !named.contains(IdentityKey(identityId, key.id)) else { return nil } + guard let bound = key.bound else { return key.boundKnown ? nil : .unplaced } + if isProfileBound(bound) { return .profile } + let contract = contractId(of: bound) + guard !systemContractIds.contains(contract.toBase58String()) else { return .system } + func binding(_ contracts: [Data: Set]) -> [Data] { contracts.filter { $0.value.contains(contract) }.map(\.key) } + var apps = binding(contractsOfApp[identityId] ?? [:]) + if apps.isEmpty { apps = Array(Set(contractsOfApp.values.flatMap(binding))) } + return apps.isEmpty ? .noApp(contract: contract) : .apps(apps) + } + } + private struct IdentityKey: Hashable { let identityId: Data let keyId: UInt32 @@ -480,6 +568,20 @@ extension AppConnect { var fence: [UInt32] = [] /// Intents whose response may be on Platform. var deleteResponses: [UUID] = [] + /// The live keys no intent names on the app's row, or, for an app + /// with no intent on the identity, every one placed on its contract: + /// those a disconnect asks the user to turn off with it. + var offeredUnrecorded: [UInt32] = [] + /// Keys that may be the app's whose owner, or the app's or another + /// app's owner, is unknown, and keys whose bound the store does not + /// hold: they stay on, and no access left cannot be claimed. + var notChecked: [UInt32] = [] + /// Keys of the app's owner that another app here has too: they stay + /// on, since they may be the other app's. + var notAttributable: [UInt32] = [] + /// Offered keys the user's question did not list: they stay on for a + /// later disconnect. + var leftAfterQuestion: [UInt32] = [] var isEmpty: Bool { disable.isEmpty && fence.isEmpty && deleteResponses.isEmpty } } @@ -504,10 +606,14 @@ extension AppConnect { return Set(otherKeyIds).subtracting(app).sorted() + app.sorted() } - /// `includeUnrecorded`: also turn off the app's live keys no intent - /// names; the user confirms that separately. + /// `owners`: the owners read, an absent id unknown. `listedUnrecordedKeyIds`: + /// the unrecorded keys the user's question listed and confirmed, nil + /// before the question. Of those, only the ones still offered + /// (`DisconnectPlan.offeredUnrecorded`) are turned off: never a key the + /// question did not count. static func disconnectPlan( - appId: Data, snapshot: IdentitySnapshot, intents: [ConnectionIntent], includeUnrecorded: Bool + appId: Data, snapshot: IdentitySnapshot, intents: [ConnectionIntent], owners: [Data: Data], + listedUnrecordedKeyIds: Set? ) -> DisconnectPlan { var plan = DisconnectPlan() let own = intents.filter { $0.appId == appId && $0.identityId == snapshot.identityId } @@ -519,11 +625,41 @@ extension AppConnect { } if !intent.responseRemoved { plan.deleteResponses.append(intent.id) } } - if includeUnrecorded { - let projection = project([snapshot], intents: intents) - let others = projection.connections.first { $0.appId == appId }?.unrecordedKeyIds[snapshot.identityId] ?? [] - plan.disable += others + let placing = UnrecordedPlacing(snapshots: [snapshot], intents: intents) + let apps = placing.apps(on: snapshot.identityId) + var offered = Set(project([snapshot], intents: intents, owners: owners).connections + .first { $0.appId == appId }?.unrecordedKeyIds[snapshot.identityId] ?? []) + if !apps.contains(appId) { + // A row with no intent here is the contract the user named: its + // keys stay its own even when an owner read since attributes + // them to an app here. + offered.formUnion(snapshot.keys.filter { + placing.placement(of: $0, on: snapshot.identityId) == .noApp(contract: appId) + }.map(\.id)) + } + plan.offeredUnrecorded = offered.sorted() + if let listed = listedUnrecordedKeyIds { + plan.disable += offered.intersection(listed) + plan.leftAfterQuestion = offered.subtracting(listed).sorted() + } + // The keys that may be the app's but stay on, by the same owner rule + // that places them on rows. + for key in snapshot.keys { + switch placing.placement(of: key, on: snapshot.identityId) { + case .unplaced: + plan.notChecked.append(key.id) + case .noApp(let contract) where apps.contains(appId): + switch ownerOutcome(of: contract, for: appId, among: apps, owners: owners) { + case .notChecked: plan.notChecked.append(key.id) + case .notAttributable: plan.notAttributable.append(key.id) + case .attributed, .notThisApp: break + } + default: + break + } } + plan.notChecked.sort() + plan.notAttributable.sort() plan.disable = Array(Set(plan.disable)).sorted() plan.fence = Array(Set(plan.fence)).sorted() return plan diff --git a/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift index 074ac1e03b..015fe68e14 100644 --- a/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift @@ -46,8 +46,9 @@ protocol DashConnectDataSource { /// responses; it throws when a key could not be shown off, and the /// connection then stays. Keys no approval of this wallet names (the /// app's from another device or from before a restore, DashPay profile - /// keys no app can be told to hold) are turned off only with - /// `includingUnrecorded`; the result says how many are left. The + /// keys no app can be told to hold) are turned off only when listed in + /// `unrecordedKeyIds`, the ids the result of a disconnect without them + /// offered (nil: none listed); only those still the app's go. The /// connection also stays, and that is thrown, while an approval of the /// app on another identity of the wallet is not done. /// @@ -55,7 +56,7 @@ protocol DashConnectDataSource { /// both calls act only while it still names the wallet they would act /// on. @discardableResult - func disconnect(id: String, scope: String?, includingUnrecorded: Bool) async throws -> DashConnectDisconnectResult + func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult func remove(id: String, scope: String?) async /// Puts the App Connect rows in step with the active identity's keys on /// Platform. Best effort: a failed read leaves the rows as they were. @@ -277,7 +278,7 @@ final class MockDashConnectDataSource: DashConnectDataSource { } @discardableResult - func disconnect(id: String, scope: String?, includingUnrecorded: Bool) async throws -> DashConnectDisconnectResult { + func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult { persistAndSend(subject.value.filter { $0.id != id }) return DashConnectDisconnectResult() } diff --git a/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift b/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift index 579108fb41..1621e6a2b5 100644 --- a/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift +++ b/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift @@ -211,17 +211,27 @@ struct DashConnectDisconnectResult: Equatable { /// How many of the app's keys it turned off. var keysTurnedOff = 0 /// Live keys no approval of this wallet names that a disconnect turns - /// off only when the user asks: keys bound to the app's contracts, given - /// on another device or before a restore, and DashPay profile keys no - /// app can be told to hold. - var unrecordedKeysLeft = 0 - /// Live App Connect keys whose app the wallet could not tell yet: its key - /// store does not hold their bound. None of them was turned off. + /// off only when the user asks, offered by a disconnect without listed + /// keys: keys on the app's contracts or of its owner, given on another + /// device or before a restore, and DashPay profile keys no app can be + /// told to hold. The user's answer passes them back. + var offeredUnrecordedKeyIds: Set = [] + /// Live App Connect keys that may be the app's but could not be checked: + /// their bound is not in the key store yet, or an owner that decides + /// whose they are could not be read. None of them was turned off. var keysNotChecked = 0 + /// Live keys of the app's owner that another app with an approval here + /// has too: they may be that app's, and none was turned off. + var keysNotAttributable = 0 + /// Keys the disconnect found on the app's row that the user's question + /// did not list: none was turned off. + var keysLeftAfterQuestion = 0 /// A read of another identity of this wallet saw keys of the app no /// approval names. They can be turned off only while that identity is /// the active one. var keysOnAnotherIdentity = false + + var unrecordedKeysLeft: Int { offeredUnrecordedKeyIds.count } } /// A pending request derived from a scanned login QR code. diff --git a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift index 5433ce6170..e851a78f4c 100644 --- a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift @@ -379,6 +379,9 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { /// The newest read of each identity this process has seen; a read /// behind it is not used (`AppConnect.IdentitySnapshot.mayReplace`). private static let newestSnapshots = OSAllocatedUnfairLock<[Data: AppConnect.IdentitySnapshot]>(initialState: [:]) + /// The owners of contracts and contract groups this process has read, + /// for every data source of the app's run: Platform never changes one. + private static let ownerMemory = OwnerMemory() private let subject: CurrentValueSubject<[DAppConnection], Never> private let shownRows: ShownRows private let operationGate: DashConnectOperationGate @@ -646,6 +649,69 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } } + /// The owner a contract read from Platform names, nil when it names + /// none this build can read. + static func contractOwnerId(_ contract: [String: Any]) -> Data? { + (contract["ownerId"] as? String ?? contract["$ownerId"] as? String).flatMap(decodeIdentifier) + } + + /// The owner a contract group read from Platform names, nil when it + /// names none this build can read. + static func groupOwnerId(_ info: [String: Any]) -> Data? { + (info["ownerId"] as? String).flatMap(decodeIdentifier) + } + + /// The owners of contracts and contract groups, read from Platform and + /// remembered in memory, never on disk: Platform never changes an + /// owner. A read that fails, finds nothing, or names no readable owner + /// is not remembered, so the owner stays unknown and is read again. + final class OwnerMemory: Sendable { + private struct Key: Hashable { + let network: String + let id: Data + } + + private let known = OSAllocatedUnfairLock<[Key: Data]>(initialState: [:]) + + /// The known owners of `contracts` and `groups` on `network`: those + /// remembered, and the rest read in parallel. An id that could not + /// be read is absent. Never throws. + func owners( + contracts: Set, groups: Set, network: String, + readContract: @escaping @Sendable (Data) async throws -> [String: Any], + readGroup: @escaping @Sendable (Data) async throws -> [String: Any] + ) async -> [Data: Data] { + let ids = contracts.union(groups) + var owners = known.withLock { known in + Dictionary(uniqueKeysWithValues: ids.compactMap { id in known[Key(network: network, id: id)].map { (id, $0) } }) + } + let unknown = ids.subtracting(owners.keys) + guard !unknown.isEmpty else { return owners } + let read = await withTaskGroup(of: (Data, Data?).self) { group -> [Data: Data] in + for id in unknown { + group.addTask { + if groups.contains(id) { + return (id, (try? await readGroup(id)).flatMap(PlatformDashConnectDataSource.groupOwnerId)) + } + return (id, (try? await readContract(id)).flatMap(PlatformDashConnectDataSource.contractOwnerId)) + } + } + var read: [Data: Data] = [:] + for await (id, owner) in group { + read[id] = owner + } + return read + } + known.withLock { known in + for (id, owner) in read { known[Key(network: network, id: id)] = owner } + } + PlatformDashConnectDataSource.logger.info( + "🔗 DASHCONNECT :: owners read: \(unknown.count, privacy: .public), not read: \(unknown.count - read.count, privacy: .public)") + owners.merge(read) { _, new in new } + return owners + } + } + /// Reads the owners wallet rule 3 compares from Platform. A group the /// network proves absent counts as not the app's; any other failure to /// read throws, so the sheet offers to try again. The caller's reads run @@ -661,9 +727,6 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { administeredGroupIds: Set, currentKeyRules: [KeyPurpose: AppConnect.CurrentKeyRule] ) { - func ownerId(of contract: [String: Any]) -> Data? { - (contract["ownerId"] as? String ?? contract["$ownerId"] as? String).flatMap(Self.decodeIdentifier) - } let app: [String: Any] do { app = try await readContract(plan.appId) @@ -671,7 +734,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { return (AppConnect.Refusal(.invalid, NSLocalizedString( "The app's contract does not exist on this network.", comment: "DashConnect App Connect v2")), [], [:]) } - guard let appOwnerId = ownerId(of: app) else { + guard let appOwnerId = contractOwnerId(app) else { return (AppConnect.Refusal(.invalid, NSLocalizedString( "The app's contract has no readable owner.", comment: "DashConnect App Connect v2")), [], [:]) } @@ -686,7 +749,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { guard groupOwners[id] == nil else { continue } do { let info = try await readGroup(id) - groupOwners[id] = (info["ownerId"] as? String).flatMap(Self.decodeIdentifier) + groupOwners[id] = groupOwnerId(info) // Read as administered unless the proof shows none. if (info["adminIds"] as? [Any])?.isEmpty != true { administeredGroupIds.insert(id) } } catch SDKError.notFound { @@ -705,7 +768,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { continue } contracts[id] = contract - contractOwners[id] = ownerId(of: contract) + contractOwners[id] = contractOwnerId(contract) } } // A contract whose config this build cannot read says nothing of its @@ -864,17 +927,120 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { return result } + /// Where the owners a projection needs come from: what `memory` knows on + /// `network`, and the rest read with `readContract` and `readGroup`. + struct OwnerReader: Sendable { + let network: String + let memory: OwnerMemory + let readContract: @Sendable (Data) async throws -> [String: Any] + let readGroup: @Sendable (Data) async throws -> [String: Any] + + /// The owners the projection of `snapshot` needs that are known. An + /// owner that could not be read is absent: unknown. + func knownOwners(for snapshot: AppConnect.IdentitySnapshot, intents: [AppConnect.ConnectionIntent]) async -> [Data: Data] { + let needed = AppConnect.ownerIdsNeeded(snapshot: snapshot, intents: intents) + guard !needed.isEmpty else { return [:] } + let groups = Set(snapshot.keys.compactMap { key -> Data? in + guard case .contractGroup(let id) = key.bound else { return nil } + return id + }).intersection(needed) + let started = ContinuousClock.now + let owners = await memory.owners( + contracts: needed.subtracting(groups), groups: groups, network: network, + readContract: readContract, readGroup: readGroup) + let elapsed = (ContinuousClock.now - started).formatted(.units(allowed: [.milliseconds])) + PlatformDashConnectDataSource.logger.info( + "🔗 DASHCONNECT :: owners for the projection: \(owners.count, privacy: .public) of \(needed.count, privacy: .public) known, in \(elapsed, privacy: .public)") + return owners + } + } + + /// Owners from the process-wide memory, the rest read from Platform off + /// the main actor. + private static func ownerReader(context: Context) -> OwnerReader { + let sdk = context.sdk + return OwnerReader( + network: "\(context.network)", memory: ownerMemory, + readContract: { try await sdk.dataContractGetOffMain(id: $0.toBase58String()) }, + readGroup: { try await sdk.getContractGroupInfo(contractGroupId: $0.toBase58String()) }) + } + + /// The projection of `snapshot` with the owners it needs that are known. + /// A key whose owner is unknown keeps its own row. + static func projectWithOwners( + _ snapshot: AppConnect.IdentitySnapshot, intents: [AppConnect.ConnectionIntent], owners: OwnerReader + ) async -> AppConnect.Projection { + let known = await owners.knownOwners(for: snapshot, intents: intents) + return AppConnect.project([snapshot], intents: intents, owners: known) + } + + /// What a disconnect of one app submits on one read of the identity, and + /// what its result reports. + struct PlannedDisconnect { + var plan: AppConnect.DisconnectPlan + /// The read it is planned on. + var snapshot: AppConnect.IdentitySnapshot + /// The keys it turns off: the app's, the listed unrecorded ones it + /// still offers (`offered`), and the fences it adds. + var appKeysOff: Int + /// The unrecorded keys it offers to turn off, DashPay profile keys + /// no intent names among them. + var offered: Set + var notChecked: Int + var notAttributable: Int + /// Offered keys the question did not list: they stay on. + var leftAfterQuestion: Int + } + + /// The disconnect of `appId` on `snapshot`, with the owners it needs + /// that are known: none for an app with no intent on the identity, whose + /// row keeps its contract's keys whatever their owner. `unrecordedKeyIds`: + /// the keys the user's question listed, nil before the question; only + /// those still offered are turned off. `fences`: the wallet's fence keys + /// still live. + static func plannedDisconnect( + appId: Data, snapshot: AppConnect.IdentitySnapshot, intents: [AppConnect.ConnectionIntent], + unrecordedKeyIds: Set?, fences: [UInt32], owners reader: OwnerReader + ) async -> PlannedDisconnect { + let hasIntent = intents.contains { $0.appId == appId && $0.identityId == snapshot.identityId } + let owners = hasIntent ? await reader.knownOwners(for: snapshot, intents: intents) : [:] + var plan = AppConnect.disconnectPlan( + appId: appId, snapshot: snapshot, intents: intents, owners: owners, listedUnrecordedKeyIds: unrecordedKeyIds) + // DashPay profile keys no intent names are no one app's: no record + // proves which app was given one, on this device or another. A + // disconnect turns off everything that may be the app's, so they + // are offered with any app's, on the user's confirm. + let profileKeys = Set(AppConnect.project([snapshot], intents: intents, owners: owners) + .unrecordedProfileKeyIds[snapshot.identityId] ?? []) + let profileKeysOff = unrecordedKeyIds.map { profileKeys.intersection($0) } ?? [] + let appKeysOff = Set(plan.disable).union(profileKeysOff).count + plan.fence.count + plan.disable = AppConnect.disableOrder(appKeyIds: plan.disable, otherKeyIds: Array(profileKeysOff) + fences) + let offered = Set(plan.offeredUnrecorded).union(profileKeys) + return PlannedDisconnect( + plan: plan, snapshot: snapshot, appKeysOff: appKeysOff, offered: offered, + notChecked: plan.notChecked.count, notAttributable: plan.notAttributable.count, + leftAfterQuestion: unrecordedKeyIds.map { offered.subtracting($0).count } ?? 0) + } + /// Puts the App Connect rows of `stores` in step with what `snapshot` /// and the intents show. private func refreshRows(from snapshot: AppConnect.IdentitySnapshot, context: Context) async { let stores = context.stores - let all = stores.intents.load() - let projection = AppConnect.project([snapshot], intents: all) + let change = await Self.refreshedRows( + snapshot: snapshot, intents: stores.intents.load(), owners: Self.ownerReader(context: context), at: now()) + await updateRows(in: stores, change) + } + + /// The change a refresh makes to the stored rows: the projection of + /// `snapshot` with the owners it needs that are known, applied to the + /// rows as `rows(_:after:of:intents:at:)` does. + static func refreshedRows( + snapshot: AppConnect.IdentitySnapshot, intents all: [AppConnect.ConnectionIntent], owners: OwnerReader, + at updatedAt: Date + ) async -> ([DAppConnection]) -> [DAppConnection] { + let projection = await projectWithOwners(snapshot, intents: all, owners: owners) let elsewhere = all.filter { $0.identityId != snapshot.identityId && $0.closedAt == nil } - let updatedAt = now() - await updateRows(in: stores) { rows in - Self.rows(rows, after: projection, of: snapshot.identityId, intents: elsewhere, at: updatedAt) - } + return { rows($0, after: projection, of: snapshot.identityId, intents: elsewhere, at: updatedAt) } } /// `rows` with the App Connect connections of `projection`, the read of @@ -1206,7 +1372,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { AppConnect.disconnectPlan( appId: plan.appId, snapshot: snapshot, intents: intents.filter { $0.connectionId == connectionId }, - includeUnrecorded: false) + owners: [:], listedUnrecordedKeyIds: nil) } ?? AppConnect.DisconnectPlan() let superseded = supersession.disable guard superseded.count <= AppConnect.maxKeysDisabledPerUpdate else { @@ -1947,14 +2113,14 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } @discardableResult - func disconnect(id: String, scope: String?, includingUnrecorded: Bool) async throws -> DashConnectDisconnectResult { - try await gated { try await disconnectInTurn(id: id, scope: scope, includingUnrecorded: includingUnrecorded) } + func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult { + try await gated { try await disconnectInTurn(id: id, scope: scope, unrecordedKeyIds: unrecordedKeyIds) } } private func disconnectInTurn( id: String, scope: String?, - includingUnrecorded: Bool + unrecordedKeyIds: Set? ) async throws -> DashConnectDisconnectResult { guard let stores = await showActiveWalletRows() else { throw DashConnectPlatformError.noWallet @@ -1974,13 +2140,14 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { guard !stores.intents.hasUnreadableRows(identityId: context.identityId) else { throw DashConnectPlatformError.intentsUnreadable } - var planned = try await disconnectPlan(appId: appId, includingUnrecorded: includingUnrecorded, context: context) + var planned = try await disconnectPlan(appId: appId, unrecordedKeyIds: unrecordedKeyIds, context: context) // The PIN is asked for only when there is something to sign. if !planned.plan.isEmpty { try await authorize() context = try await contextAfterAuthorization(matching: context) - // Read again: the prompt can take any time. - planned = try await disconnectPlan(appId: appId, includingUnrecorded: includingUnrecorded, context: context) + // Read again: the prompt can take any time. Owners still + // unknown are read again; a known one comes from memory. + planned = try await disconnectPlan(appId: appId, unrecordedKeyIds: unrecordedKeyIds, context: context) } let plan = planned.plan let signer = KeychainSigner(modelContainer: context.modelContainer) @@ -2029,47 +2196,42 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { }) { throw DashConnectPlatformError.grantOnAnotherIdentity } - return DashConnectDisconnectResult( - keysTurnedOff: planned.appKeysOff, - unrecordedKeysLeft: includingUnrecorded ? 0 : planned.unrecordedLeft, - keysNotChecked: planned.unplaced, + return Self.disconnectResult( + of: planned, listed: unrecordedKeyIds, // Keys a read of another identity saw stay, and so does the row. keysOnAnotherIdentity: rows(in: stores).first { $0.id == id }?.seenOn .subtracting([context.identityId.toBase58String()]).isEmpty == false) } + /// What a disconnect planned as `planned` reports. The offered keys are + /// reported only before the question (`listed` nil): the user's answer + /// to it passes them back. + static func disconnectResult( + of planned: PlannedDisconnect, listed: Set?, keysOnAnotherIdentity: Bool + ) -> DashConnectDisconnectResult { + DashConnectDisconnectResult( + keysTurnedOff: planned.appKeysOff, + offeredUnrecordedKeyIds: listed == nil ? planned.offered : [], + keysNotChecked: planned.notChecked, + keysNotAttributable: planned.notAttributable, + keysLeftAfterQuestion: planned.leftAfterQuestion, + keysOnAnotherIdentity: keysOnAnotherIdentity) + } + /// What a disconnect of `appId` submits on the active identity, from a - /// fresh read, and how many keys no intent names it leaves when - /// `includingUnrecorded` is off. + /// fresh read and the owners it needs (`plannedDisconnect`). private func disconnectPlan( appId: Data, - includingUnrecorded: Bool, + unrecordedKeyIds: Set?, context: Context - ) async throws -> ( - plan: AppConnect.DisconnectPlan, snapshot: AppConnect.IdentitySnapshot, - appKeysOff: Int, unrecordedLeft: Int, unplaced: Int - ) { + ) async throws -> PlannedDisconnect { let snapshot = try await identitySnapshot(context: context).snapshot let all = context.stores.intents.load() - var plan = AppConnect.disconnectPlan( - appId: appId, snapshot: snapshot, intents: all, includeUnrecorded: includingUnrecorded) - // The same intents as the plan, so the keys counted are the keys it - // would turn off. - let projection = AppConnect.project([snapshot], intents: all) - let unrecordedAppKeys = projection.connections.first { $0.appId == appId }? - .unrecordedKeyIds[context.identityId] ?? [] - // DashPay profile keys no intent names are no one app's: no record - // proves which app was given one, on this device or another. A - // disconnect turns off everything that may be the app's, so they - // are offered with any app's, on the user's confirm. - let profileKeys = projection.unrecordedProfileKeyIds[context.identityId] ?? [] - let profileKeysOff = includingUnrecorded ? profileKeys : [] - let appKeysOff = Set(plan.disable).union(profileKeysOff).count + plan.fence.count // A fence an earlier try added and could not turn off yet. let fences = try await liveFenceKeyIds(snapshot: snapshot, intents: all, context: context) - plan.disable = AppConnect.disableOrder(appKeyIds: plan.disable, otherKeyIds: profileKeysOff + fences) - return (plan, snapshot, appKeysOff, Set(unrecordedAppKeys).union(profileKeys).count, - projection.unplacedKeyIds[context.identityId]?.count ?? 0) + return await Self.plannedDisconnect( + appId: appId, snapshot: snapshot, intents: all, unrecordedKeyIds: unrecordedKeyIds, fences: fences, + owners: Self.ownerReader(context: context)) } /// The ids of this wallet's fence keys that are still live: a fence is diff --git a/DashWallet/Sources/UI/DashConnect/Components/ConnectionsMessageDialog.swift b/DashWallet/Sources/UI/DashConnect/Components/ConnectionsMessageDialog.swift new file mode 100644 index 0000000000..846c416444 --- /dev/null +++ b/DashWallet/Sources/UI/DashConnect/Components/ConnectionsMessageDialog.swift @@ -0,0 +1,95 @@ +// +// ConnectionsMessageDialog.swift +// DashWallet +// +// Copyright © 2026 Dash Core Group. All rights reserved. +// +// Licensed under the MIT License (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://opensource.org/licenses/MIT +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +import DashUIKit +import SwiftUI + +/// The disconnect question (SCR-03) and result (SCR-04) on Connections, as +/// DashUIKit's `ModalDialog`. The wording comes from the view model; this only +/// lays the message out: its paragraphs, and «Turn them off» / «Leave them» +/// for a question, «OK» otherwise. Every other Connections message shows here +/// too, with the warning icon unless it is a plain success. +enum ConnectionsMessageDialog { + static func dialog( + for message: ConnectionsScreenMessage, + turnOff: @escaping (DAppConnection, Set) -> Void, + dismiss: @escaping () -> Void + ) -> ModalDialog { + let paragraphs = message.text.components(separatedBy: "\n\n") + let icon: ModalDialog.Icon? = message.kind == .success ? nil : .warning + guard let connection = message.unrecordedKeysOf else { + return ModalDialog( + icon: icon, heading: message.title, paragraphs: paragraphs, + primaryAction: .init(title: NSLocalizedString("OK", comment: ""), handler: dismiss)) + } + let keys = message.unrecordedKeyIds + return ModalDialog( + icon: icon, heading: message.title, paragraphs: paragraphs, + primaryAction: .init(title: NSLocalizedString("Turn them off", comment: "DashConnect"), role: .destructive) { + turnOff(connection, keys) + }, + secondaryAction: .init(title: NSLocalizedString("Leave them", comment: "DashConnect"), handler: dismiss)) + } +} + +// MARK: - Previews + +private enum PreviewText { + static let offered = "Disconnected. Keys this wallet did not record giving are still on your identity (2): keys of this app from " + + "another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" + static let offeredNothingOff = "This wallet did not record giving the keys this app holds on your identity (2): they come from " + + "another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" + static let notChecked = "This wallet could not tell yet which app holds some keys on your identity (1), so it left them on. Open Connections again later to check them." + static let notAttributable = "Some keys on your identity (1) may belong to another app of the same developer, so this wallet left " + + "them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." + static let left = "Disconnected. Some keys of this app are still on your identity (1). Disconnect it again to turn them off." + static let anotherIdentity = "This app has a key on another identity of this wallet. Switch to that identity to turn it off." + static let error = "Could not disconnect: The network did not answer." + static let busy = "Finish the request on screen, then disconnect the app again." + static let purchased = "Token purchase completed." +} + +private func dialogPreview(_ kind: ConnectionsScreenMessage.Kind, _ paragraphs: [String], offers: Bool = false) -> some View { + let message = ConnectionsScreenMessage( + kind: kind, text: paragraphs.joined(separator: "\n\n"), + unrecordedKeysOf: offers ? MockDashConnectDataSource.sample(.active) : nil, unrecordedKeyIds: offers ? [20, 21] : []) + return ZStack { + Color.dash.backgroundOverlay.ignoresSafeArea() + ConnectionsMessageDialog.dialog(for: message, turnOff: { _, _ in }, dismiss: {}) + .padding(.horizontal, 20) + } +} + +#Preview("SCR-03 default") { dialogPreview(.question, [PreviewText.offered], offers: true) } +#Preview("SCR-03 nothing turned off") { dialogPreview(.question, [PreviewText.offeredNothingOff], offers: true) } +#Preview("SCR-03 with warnings") { + dialogPreview(.question, [PreviewText.offered, PreviewText.notChecked, PreviewText.notAttributable], offers: true) +} +#Preview("SCR-04 not checked") { dialogPreview(.warning, [PreviewText.notChecked]) } +#Preview("SCR-04 not attributable") { dialogPreview(.warning, [PreviewText.notAttributable]) } +#Preview("SCR-04 left after question") { dialogPreview(.warning, [PreviewText.left]) } +#Preview("SCR-04 combined") { + dialogPreview(.warning, [PreviewText.notChecked, PreviewText.notAttributable, PreviewText.left, PreviewText.anotherIdentity]) +} +#Preview("SCR-04 another identity") { dialogPreview(.error, [PreviewText.anotherIdentity]) } +#Preview("SCR-04 error") { dialogPreview(.error, [PreviewText.error]) } +#Preview("SCR-04 busy") { dialogPreview(.error, [PreviewText.busy]) } +#Preview("Success, no icon") { dialogPreview(.success, [PreviewText.purchased]) } +#Preview("SCR-03 dark") { + dialogPreview(.question, [PreviewText.offered, PreviewText.notAttributable], offers: true).preferredColorScheme(.dark) +} diff --git a/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift b/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift index 9237070f7a..6f6bc1bb85 100644 --- a/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift +++ b/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift @@ -72,31 +72,27 @@ struct ConnectionsScreen: View { .background(Color.primaryBackground) .clipShape(RoundedRectangle(cornerRadius: 16, style: .continuous)) } - } - .background(Color.primaryBackground) - .navigationBarHidden(true) - .task { await viewModel.refreshConnections() } - .alert(item: messageBinding) { message in - if let connection = message.unrecordedKeysOf { - return Alert( - title: Text(message.title), - message: Text(message.text), - primaryButton: .destructive(Text(NSLocalizedString("Turn them off", comment: "DashConnect"))) { + + if let message = viewModel.message { + // The question and the result of a disconnect (SCR-03, SCR-04), + // and every other message, above the progress: a refusal while + // a request runs shows at once. + Color.dash.backgroundOverlay + .ignoresSafeArea() + + ConnectionsMessageDialog.dialog( + for: message, + turnOff: { connection, keys in viewModel.message = nil - viewModel.disconnect(connection, includingUnrecorded: true) + viewModel.disconnect(connection, unrecordedKeyIds: keys) }, - secondaryButton: .cancel(Text(NSLocalizedString("Leave them", comment: "DashConnect"))) { - viewModel.message = nil - }) + dismiss: { viewModel.message = nil }) + .padding(.horizontal, 20) } - return Alert( - title: Text(message.title), - message: Text(message.text), - dismissButton: .default(Text(NSLocalizedString("OK", comment: ""))) { - viewModel.message = nil - } - ) } + .background(Color.primaryBackground) + .navigationBarHidden(true) + .task { await viewModel.refreshConnections() } .sheet(isPresented: isApproveSheetPresented) { if let request = viewModel.pendingRequest { approveSheet(for: request) @@ -174,13 +170,6 @@ struct ConnectionsScreen: View { ) } - private var messageBinding: Binding { - Binding( - get: { viewModel.message }, - set: { viewModel.message = $0 } - ) - } - // MARK: - Actions private func showScanner() { @@ -254,3 +243,14 @@ struct ConnectionsScreen: View { ) ) } + +#Preview("Busy refusal over progress") { + let viewModel = ConnectionsViewModel( + dataSource: MockDashConnectDataSource(initial: [MockDashConnectDataSource.sample(.active)]), + featureUnavailable: false + ) + viewModel.isProcessingStateTransition = true + viewModel.message = ConnectionsScreenMessage( + kind: .error, text: "Finish the current DashConnect request first, then try again.") + return ConnectionsScreen(vc: UINavigationController(), viewModel: viewModel) +} diff --git a/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift b/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift index 7790868af6..ab73bf2829 100644 --- a/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift +++ b/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift @@ -25,6 +25,9 @@ struct ConnectionsScreenMessage: Identifiable, Equatable { enum Kind: String { case error case success + /// A result that went through but left something the user should + /// know about, such as the keys a disconnect left on. + case warning /// A question the user answers from the message itself. case question } @@ -34,6 +37,8 @@ struct ConnectionsScreenMessage: Identifiable, Equatable { /// A connection the user can also turn its unrecorded keys off for, /// from the same message. var unrecordedKeysOf: DAppConnection? = nil + /// The unrecorded keys the message offers to turn off: only these go. + var unrecordedKeyIds: Set = [] var id: String { "\(kind.rawValue):\(text)" @@ -43,7 +48,7 @@ struct ConnectionsScreenMessage: Identifiable, Equatable { switch kind { case .error: return NSLocalizedString("Error", comment: "") - case .success: + case .success, .warning: return NSLocalizedString("Success", comment: "DashConnect") case .question: return NSLocalizedString("Keys left on your identity", comment: "DashConnect: title of the question after a disconnect") @@ -379,13 +384,13 @@ final class ConnectionsViewModel: ObservableObject { } func disconnect(_ connection: DAppConnection) { - disconnect(connection, includingUnrecorded: false) + disconnect(connection, unrecordedKeyIds: nil) } - /// `includingUnrecorded`: also turn off the live keys of the app, and the + /// `unrecordedKeyIds`: also turn off these live keys of the app, and /// DashPay profile keys, that no approval of this wallet names. The user - /// is asked for that separately, after a disconnect left some. - func disconnect(_ connection: DAppConnection, includingUnrecorded: Bool) { + /// is asked for that separately, after a disconnect offered them. + func disconnect(_ connection: DAppConnection, unrecordedKeyIds: Set?) { // Disconnecting an App Connect connection signs an identity update, // which takes seconds. It must not overlap anything else that signs // one or touches the same records: a second tap, an approval on @@ -395,7 +400,7 @@ final class ConnectionsViewModel: ObservableObject { !isResolvingRequest, pendingRequest == nil, pendingTokenPurchase == nil else { // Asked for from the message after a disconnect: say why nothing // happened rather than nothing. - if includingUnrecorded { + if unrecordedKeyIds != nil { message = ConnectionsScreenMessage( kind: .error, text: NSLocalizedString( @@ -410,7 +415,26 @@ final class ConnectionsViewModel: ObservableObject { defer { self.isDisconnecting = false } do { let result = try await self.dataSource.disconnect( - id: connection.id, scope: connection.scope, includingUnrecorded: includingUnrecorded) + id: connection.id, scope: connection.scope, unrecordedKeyIds: unrecordedKeyIds) + // Keys left on that may be the app's: said with the question + // too, so leaving the keys still shows them. + var warnings: [String] = [] + if result.keysNotChecked > 0 { + warnings.append(String.localizedStringWithFormat( + NSLocalizedString( + "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them.", + comment: "DashConnect: after a disconnect that found keys whose app is not known yet"), + result.keysNotChecked)) + } + if result.keysNotAttributable > 0 { + // swiftlint:disable line_length + warnings.append(String.localizedStringWithFormat( + NSLocalizedString( + "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it.", + comment: "DashConnect: after a disconnect that left keys another app of the same developer may hold"), + result.keysNotAttributable)) + // swiftlint:enable line_length + } if result.unrecordedKeysLeft > 0 { let text = result.keysTurnedOff > 0 ? NSLocalizedString( @@ -421,27 +445,28 @@ final class ConnectionsViewModel: ObservableObject { comment: "DashConnect: a disconnect of an app whose keys no approval of this wallet names") self.message = ConnectionsScreenMessage( kind: .question, - text: String.localizedStringWithFormat(text, result.unrecordedKeysLeft), - unrecordedKeysOf: connection) - } else if result.keysOnAnotherIdentity || result.keysNotChecked > 0 { - var texts: [String] = [] - if result.keysNotChecked > 0 { - texts.append(String.localizedStringWithFormat( - NSLocalizedString( - "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them.", - comment: "DashConnect: after a disconnect that found keys whose app is not known yet"), - result.keysNotChecked)) - } - if result.keysOnAnotherIdentity { - texts.append(DashConnectPlatformError.grantOnAnotherIdentity.localizedDescription) - } - // Nothing turned off here and the app still has keys - // elsewhere: as when its approval on another identity is - // open, that is not a success. - self.message = ConnectionsScreenMessage( - kind: result.keysOnAnotherIdentity && result.keysTurnedOff == 0 ? .error : .success, - text: texts.joined(separator: "\n\n")) + text: ([String.localizedStringWithFormat(text, result.unrecordedKeysLeft)] + warnings).joined(separator: "\n\n"), + unrecordedKeysOf: connection, + unrecordedKeyIds: result.offeredUnrecordedKeyIds) + return + } + var texts = warnings + if result.keysLeftAfterQuestion > 0 { + texts.append(String.localizedStringWithFormat( + NSLocalizedString( + "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off.", + comment: "DashConnect: after turning off the keys a question listed, keys of the app found since stay on"), + result.keysLeftAfterQuestion)) + } + if result.keysOnAnotherIdentity { + texts.append(DashConnectPlatformError.grantOnAnotherIdentity.localizedDescription) } + guard !texts.isEmpty else { return } + // Nothing turned off here and the app still has keys only + // elsewhere: as when its approval on another identity is + // open, that is not a success. + let onlyElsewhere = result.keysOnAnotherIdentity && texts.count == 1 && result.keysTurnedOff == 0 + self.message = ConnectionsScreenMessage(kind: onlyElsewhere ? .error : .warning, text: texts.joined(separator: "\n\n")) } catch { self.message = ConnectionsScreenMessage( kind: .error, diff --git a/DashWallet/Sources/UI/Explore Dash/Views/DashSpend/DashSpendPayScreen.swift b/DashWallet/Sources/UI/Explore Dash/Views/DashSpend/DashSpendPayScreen.swift index a3897f671c..c440827610 100644 --- a/DashWallet/Sources/UI/Explore Dash/Views/DashSpend/DashSpendPayScreen.swift +++ b/DashWallet/Sources/UI/Explore Dash/Views/DashSpend/DashSpendPayScreen.swift @@ -156,7 +156,7 @@ struct DashSpendPayScreen: View { } if showErrorDialog { - ModalDialog( + LegacyModalDialog( style: .error, icon: .system("exclamationmark.triangle.fill"), heading: errorTitle, @@ -170,7 +170,7 @@ struct DashSpendPayScreen: View { } if showCustomErrorDialog { - ModalDialog( + LegacyModalDialog( style: .error, icon: .system("exclamationmark.triangle.fill"), heading: errorTitle, diff --git a/DashWallet/Sources/UI/Home/HomeViewController.swift b/DashWallet/Sources/UI/Home/HomeViewController.swift index c3cd35653c..9c370e9a13 100644 --- a/DashWallet/Sources/UI/Home/HomeViewController.swift +++ b/DashWallet/Sources/UI/Home/HomeViewController.swift @@ -358,7 +358,7 @@ class HomeViewController: DWBasePayViewController, NavigationBarDisplayable { DWLogger.log("HomeViewController: sweep invoked from Home popup (\(amount))") self.viewModel.showCoinJoinSweepDialog = false Task { @MainActor in - // The post-sync popup (ModalDialog) is mid-dismissal here — + // The post-sync popup (LegacyModalDialog) is mid-dismissal here — // its wrapper calls dismiss(animated:) immediately before // running this action. Presenting the PIN now races that // dismissal: DSAuthenticationManager.presentController: diff --git a/DashWallet/Sources/UI/SwiftUI Components/Dialogs/ModalDialog.swift b/DashWallet/Sources/UI/SwiftUI Components/Dialogs/ModalDialog.swift index 22c0b0b293..ab48c1ec6f 100644 --- a/DashWallet/Sources/UI/SwiftUI Components/Dialogs/ModalDialog.swift +++ b/DashWallet/Sources/UI/SwiftUI Components/Dialogs/ModalDialog.swift @@ -18,7 +18,9 @@ import SwiftUI import DashUIKit -struct ModalDialog: View { +/// The app's own dialog, kept for the screens that already use it. New screens use +/// DashUIKit's `ModalDialog`; moving these is dashpay/dashwallet-ios#1355. +struct LegacyModalDialog: View { enum Style { case regular case warning @@ -139,7 +141,7 @@ struct ModalDialog: View { extension UIViewController { func showModalDialog( - style: ModalDialog.Style = .regular, + style: LegacyModalDialog.Style = .regular, icon: IconName? = nil, heading: String, textBlock1: String? = nil, @@ -154,7 +156,7 @@ extension UIViewController { buttonsOrientation: Axis = .vertical, buttonsStyle: ButtonsGroup.Style = .regular ) { - let dialog = ModalDialog( + let dialog = LegacyModalDialog( style: style, icon: icon, heading: heading, @@ -192,7 +194,7 @@ extension UIViewController { @MainActor @discardableResult func showModalDialog( - style: ModalDialog.Style = .regular, + style: LegacyModalDialog.Style = .regular, icon: IconName? = nil, heading: String, textBlock1: String? = nil, @@ -206,7 +208,7 @@ extension UIViewController { buttonsStyle: ButtonsGroup.Style = .regular ) async -> Bool { await withCheckedContinuation { continuation in - let dialog = ModalDialog( + let dialog = LegacyModalDialog( style: style, icon: icon, heading: heading, diff --git a/DashWallet/ar.lproj/Localizable.strings b/DashWallet/ar.lproj/Localizable.strings index 0d568be3f1..96cd24e949 100644 --- a/DashWallet/ar.lproj/Localizable.strings +++ b/DashWallet/ar.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/bg.lproj/Localizable.strings b/DashWallet/bg.lproj/Localizable.strings index 64724e8238..4568bb6da1 100644 --- a/DashWallet/bg.lproj/Localizable.strings +++ b/DashWallet/bg.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/ca.lproj/Localizable.strings b/DashWallet/ca.lproj/Localizable.strings index 940243d66c..86055fa625 100644 --- a/DashWallet/ca.lproj/Localizable.strings +++ b/DashWallet/ca.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/cs.lproj/Localizable.strings b/DashWallet/cs.lproj/Localizable.strings index 51d785d044..2a568cba5f 100644 --- a/DashWallet/cs.lproj/Localizable.strings +++ b/DashWallet/cs.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/da.lproj/Localizable.strings b/DashWallet/da.lproj/Localizable.strings index c936dc5efc..61f1ac4de0 100644 --- a/DashWallet/da.lproj/Localizable.strings +++ b/DashWallet/da.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/de.lproj/Localizable.strings b/DashWallet/de.lproj/Localizable.strings index 5937f1c831..6344a1b04c 100644 --- a/DashWallet/de.lproj/Localizable.strings +++ b/DashWallet/de.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Rabatt"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/el.lproj/Localizable.strings b/DashWallet/el.lproj/Localizable.strings index acc24e4b69..965817050e 100644 --- a/DashWallet/el.lproj/Localizable.strings +++ b/DashWallet/el.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Έκπτωση"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/en.lproj/Localizable.strings b/DashWallet/en.lproj/Localizable.strings index b5cff9bd67..fd4d35673f 100644 --- a/DashWallet/en.lproj/Localizable.strings +++ b/DashWallet/en.lproj/Localizable.strings @@ -1770,6 +1770,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4956,6 +4959,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5900,7 +5906,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/eo.lproj/Localizable.strings b/DashWallet/eo.lproj/Localizable.strings index ce1ff1688c..50fc8d691f 100644 --- a/DashWallet/eo.lproj/Localizable.strings +++ b/DashWallet/eo.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/es.lproj/Localizable.strings b/DashWallet/es.lproj/Localizable.strings index dfe9aa57c9..17252143cc 100644 --- a/DashWallet/es.lproj/Localizable.strings +++ b/DashWallet/es.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Descuento"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/et.lproj/Localizable.strings b/DashWallet/et.lproj/Localizable.strings index 8b525a41c7..1bc7e6f9fa 100644 --- a/DashWallet/et.lproj/Localizable.strings +++ b/DashWallet/et.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/fa.lproj/Localizable.strings b/DashWallet/fa.lproj/Localizable.strings index 1b1318dda5..a2506d6465 100644 --- a/DashWallet/fa.lproj/Localizable.strings +++ b/DashWallet/fa.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "تخفیف"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/fi.lproj/Localizable.strings b/DashWallet/fi.lproj/Localizable.strings index 8fc6efa48c..a6c3eec10f 100644 --- a/DashWallet/fi.lproj/Localizable.strings +++ b/DashWallet/fi.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/fil.lproj/Localizable.strings b/DashWallet/fil.lproj/Localizable.strings index 3543562a51..0027348fe8 100644 --- a/DashWallet/fil.lproj/Localizable.strings +++ b/DashWallet/fil.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Diskwento"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/fr.lproj/Localizable.strings b/DashWallet/fr.lproj/Localizable.strings index 51ce7232b4..e6b81ef1c3 100644 --- a/DashWallet/fr.lproj/Localizable.strings +++ b/DashWallet/fr.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Réduction"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/hr.lproj/Localizable.strings b/DashWallet/hr.lproj/Localizable.strings index f81020ada2..773d1e5b66 100644 --- a/DashWallet/hr.lproj/Localizable.strings +++ b/DashWallet/hr.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/hu.lproj/Localizable.strings b/DashWallet/hu.lproj/Localizable.strings index e7e1be2ae2..ec8f18edb5 100644 --- a/DashWallet/hu.lproj/Localizable.strings +++ b/DashWallet/hu.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/id.lproj/Localizable.strings b/DashWallet/id.lproj/Localizable.strings index e355903d78..e593a02fb7 100644 --- a/DashWallet/id.lproj/Localizable.strings +++ b/DashWallet/id.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Diskon"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/it.lproj/Localizable.strings b/DashWallet/it.lproj/Localizable.strings index 0a4e851461..2deccbc077 100644 --- a/DashWallet/it.lproj/Localizable.strings +++ b/DashWallet/it.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Sconto"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/ja.lproj/Localizable.strings b/DashWallet/ja.lproj/Localizable.strings index 73634d08cc..902ef09670 100644 --- a/DashWallet/ja.lproj/Localizable.strings +++ b/DashWallet/ja.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "割引"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/ko.lproj/Localizable.strings b/DashWallet/ko.lproj/Localizable.strings index fe672700dd..5872249d87 100644 --- a/DashWallet/ko.lproj/Localizable.strings +++ b/DashWallet/ko.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "할인"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/mk.lproj/Localizable.strings b/DashWallet/mk.lproj/Localizable.strings index 10462e390d..e2f2837da8 100644 --- a/DashWallet/mk.lproj/Localizable.strings +++ b/DashWallet/mk.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/ms.lproj/Localizable.strings b/DashWallet/ms.lproj/Localizable.strings index 6d6ef8f695..00ea904e64 100644 --- a/DashWallet/ms.lproj/Localizable.strings +++ b/DashWallet/ms.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/nb.lproj/Localizable.strings b/DashWallet/nb.lproj/Localizable.strings index 0bbf02f60b..a21a6ca3bd 100644 --- a/DashWallet/nb.lproj/Localizable.strings +++ b/DashWallet/nb.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/nl.lproj/Localizable.strings b/DashWallet/nl.lproj/Localizable.strings index 53be4d9926..7d2d658d58 100644 --- a/DashWallet/nl.lproj/Localizable.strings +++ b/DashWallet/nl.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Korting"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/pl.lproj/Localizable.strings b/DashWallet/pl.lproj/Localizable.strings index 3137af9c2c..cf1350076f 100644 --- a/DashWallet/pl.lproj/Localizable.strings +++ b/DashWallet/pl.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Zniżka"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/pt.lproj/Localizable.strings b/DashWallet/pt.lproj/Localizable.strings index de84babd81..3b8a045efa 100644 --- a/DashWallet/pt.lproj/Localizable.strings +++ b/DashWallet/pt.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Desconto"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/ro.lproj/Localizable.strings b/DashWallet/ro.lproj/Localizable.strings index ee59c9fd2a..ced4d2d152 100644 --- a/DashWallet/ro.lproj/Localizable.strings +++ b/DashWallet/ro.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/ru.lproj/Localizable.strings b/DashWallet/ru.lproj/Localizable.strings index f174c7da99..7e7d0cb704 100644 --- a/DashWallet/ru.lproj/Localizable.strings +++ b/DashWallet/ru.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Скидка"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/sk.lproj/Localizable.strings b/DashWallet/sk.lproj/Localizable.strings index 60c0e2d381..e74ee6faf3 100644 --- a/DashWallet/sk.lproj/Localizable.strings +++ b/DashWallet/sk.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Zľava"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/sl.lproj/Localizable.strings b/DashWallet/sl.lproj/Localizable.strings index 5585c0b46f..6610c84ccc 100644 --- a/DashWallet/sl.lproj/Localizable.strings +++ b/DashWallet/sl.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/sl_SI.lproj/Localizable.strings b/DashWallet/sl_SI.lproj/Localizable.strings index 5001d5d335..49be9f503d 100644 --- a/DashWallet/sl_SI.lproj/Localizable.strings +++ b/DashWallet/sl_SI.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/sq.lproj/Localizable.strings b/DashWallet/sq.lproj/Localizable.strings index cf88adbdae..e1a5c1fe04 100644 --- a/DashWallet/sq.lproj/Localizable.strings +++ b/DashWallet/sq.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/sr.lproj/Localizable.strings b/DashWallet/sr.lproj/Localizable.strings index 6ff5a092f5..63adbfd3cd 100644 --- a/DashWallet/sr.lproj/Localizable.strings +++ b/DashWallet/sr.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/sv.lproj/Localizable.strings b/DashWallet/sv.lproj/Localizable.strings index 9563ef944f..1b02dac596 100644 --- a/DashWallet/sv.lproj/Localizable.strings +++ b/DashWallet/sv.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/th.lproj/Localizable.strings b/DashWallet/th.lproj/Localizable.strings index 121f232440..b3c4a61a91 100644 --- a/DashWallet/th.lproj/Localizable.strings +++ b/DashWallet/th.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/tr.lproj/Localizable.strings b/DashWallet/tr.lproj/Localizable.strings index 148aace12c..319dfb35e6 100644 --- a/DashWallet/tr.lproj/Localizable.strings +++ b/DashWallet/tr.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "İndirim"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/uk.lproj/Localizable.strings b/DashWallet/uk.lproj/Localizable.strings index 4743eb6ab4..a859a2f2f8 100644 --- a/DashWallet/uk.lproj/Localizable.strings +++ b/DashWallet/uk.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Знижка"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/vi.lproj/Localizable.strings b/DashWallet/vi.lproj/Localizable.strings index 73534ac372..9af25e2704 100644 --- a/DashWallet/vi.lproj/Localizable.strings +++ b/DashWallet/vi.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/zh-Hans.lproj/Localizable.strings b/DashWallet/zh-Hans.lproj/Localizable.strings index f368b6dc3c..2d4454d159 100644 --- a/DashWallet/zh-Hans.lproj/Localizable.strings +++ b/DashWallet/zh-Hans.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/zh-Hant-TW.lproj/Localizable.strings b/DashWallet/zh-Hant-TW.lproj/Localizable.strings index c4b6c83886..c0a424840d 100644 --- a/DashWallet/zh-Hant-TW.lproj/Localizable.strings +++ b/DashWallet/zh-Hant-TW.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; @@ -4957,6 +4960,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5901,7 +5907,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/zh.lproj/Localizable.strings b/DashWallet/zh.lproj/Localizable.strings index 8401ebda4f..96b84597b3 100644 --- a/DashWallet/zh.lproj/Localizable.strings +++ b/DashWallet/zh.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "折扣"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWallet/zh_TW.lproj/Localizable.strings b/DashWallet/zh_TW.lproj/Localizable.strings index 61001fd25c..b5a81935e6 100644 --- a/DashWallet/zh_TW.lproj/Localizable.strings +++ b/DashWallet/zh_TW.lproj/Localizable.strings @@ -1771,6 +1771,9 @@ /* DashConnect: after a disconnect that left keys no approval of this wallet names */ "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?" = "Disconnected. Keys this wallet did not record giving are still on your identity (%d): keys of this app from another device or from before a restore, or DashPay profile keys no connection holds. Turn them off too?"; +/* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ +"Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; + /* DashSpend confirmation */ "Discount" = "折扣"; @@ -4955,6 +4958,9 @@ /* Maya */ "Some coins are not available because of the halted chain" = "Some coins are not available because of the halted chain"; +/* DashConnect: after a disconnect that left keys another app of the same developer may hold */ +"Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it." = "Some keys on your identity (%d) may belong to another app of the same developer, so this wallet left them on. Each one shows on its own row in Connections; disconnect it there if you no longer need it."; + /* CoinJoin */ "Some of your CoinJoin funds were moved. Please try again to move the rest." = "Some of your CoinJoin funds were moved. Please try again to move the rest."; @@ -5899,7 +5905,7 @@ "This wallet could not save the approval, so nothing was sent. Try again." = "This wallet could not save the approval, so nothing was sent. Try again."; /* DashConnect: after a disconnect that found keys whose app is not known yet */ -"This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d). The connection stays listed; open Connections again later to check them."; +"This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them." = "This wallet could not tell yet which app holds some keys on your identity (%d), so it left them on. Open Connections again later to check them."; /* DashConnect: a disconnect of an app whose keys no approval of this wallet names */ "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?" = "This wallet did not record giving the keys this app holds on your identity (%d): they come from another device, from before a restore, or are DashPay profile keys no connection holds. Turn them off?"; diff --git a/DashWalletTests/DashConnect/AppConnectProjectionTests.swift b/DashWalletTests/DashConnect/AppConnectProjectionTests.swift index 5a8828aa3e..beaac43ad6 100644 --- a/DashWalletTests/DashConnect/AppConnectProjectionTests.swift +++ b/DashWalletTests/DashConnect/AppConnectProjectionTests.swift @@ -58,6 +58,14 @@ final class AppConnectProjectionTests: XCTestCase { Snapshot(identityId: identity, revision: revision, keys: keys, platformTime: time) } + /// The plan of a disconnect whose question listed every unrecorded key + /// it offered, as the user confirms it. + private static func planTurningOffOffered(appId: Data, snapshot: Snapshot, intents: [Intent]) -> AppConnect.DisconnectPlan { + let asked = AppConnect.disconnectPlan(appId: appId, snapshot: snapshot, intents: intents, owners: [:], listedUnrecordedKeyIds: nil) + return AppConnect.disconnectPlan( + appId: appId, snapshot: snapshot, intents: intents, owners: [:], listedUnrecordedKeyIds: Set(asked.offeredUnrecorded)) + } + // MARK: Status of one intent func testStatusOfAnIntentFollowsItsAuthKeysOnPlatform() { @@ -162,7 +170,7 @@ final class AppConnectProjectionTests: XCTestCase { XCTAssertEqual(projection.connections.first?.unrecordedKeyIds, [Self.identity: [20]]) XCTAssertEqual(projection.unrecordedProfileKeyIds, [Self.identity: [20]]) XCTAssertEqual( - AppConnect.disconnectPlan(appId: Self.dashPay, snapshot: snapshot, intents: [], includeUnrecorded: true).disable, + Self.planTurningOffOffered(appId: Self.dashPay, snapshot: snapshot, intents: []).disable, [20]) } @@ -211,7 +219,7 @@ final class AppConnectProjectionTests: XCTestCase { Self.onPlatform(Self.authKey(14), data: Data(repeating: 9, count: 20)), ]) let plan = AppConnect.disconnectPlan( - appId: Self.app, snapshot: snapshot, intents: [landed, waiting, dead], includeUnrecorded: false) + appId: Self.app, snapshot: snapshot, intents: [landed, waiting, dead], owners: [:], listedUnrecordedKeyIds: nil) XCTAssertEqual(plan.disable, [10, 11]) XCTAssertEqual(plan.fence, [12]) XCTAssertEqual(plan.deleteResponses, [landed.id]) @@ -221,7 +229,7 @@ final class AppConnectProjectionTests: XCTestCase { let intent = Self.intent([Self.authKey(10), Self.authKey(11)]) let plan = AppConnect.disconnectPlan( appId: Self.app, snapshot: Self.snapshot([Self.onPlatform(Self.authKey(10))]), intents: [intent], - includeUnrecorded: false) + owners: [:], listedUnrecordedKeyIds: nil) XCTAssertEqual(plan.disable, [10]) XCTAssertEqual(plan.fence, [11]) } @@ -231,10 +239,10 @@ final class AppConnectProjectionTests: XCTestCase { let stray = Self.onPlatform(Self.authKey(20)) let snapshot = Self.snapshot([Self.onPlatform(Self.authKey(10)), stray]) XCTAssertEqual( - AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], includeUnrecorded: false).disable, + AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], owners: [:], listedUnrecordedKeyIds: nil).disable, [10]) XCTAssertEqual( - AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], includeUnrecorded: true).disable, + Self.planTurningOffOffered(appId: Self.app, snapshot: snapshot, intents: [intent]).disable, [10, 20]) } @@ -244,7 +252,7 @@ final class AppConnectProjectionTests: XCTestCase { let otherIdentity = Self.intent([Self.authKey(12)], identity: Self.otherIdentity) let snapshot = Self.snapshot([Self.onPlatform(Self.authKey(10)), Self.onPlatform(Self.authKey(11))]) let plan = AppConnect.disconnectPlan( - appId: Self.app, snapshot: snapshot, intents: [mine, otherApps, otherIdentity], includeUnrecorded: false) + appId: Self.app, snapshot: snapshot, intents: [mine, otherApps, otherIdentity], owners: [:], listedUnrecordedKeyIds: nil) XCTAssertEqual(plan, AppConnect.DisconnectPlan(disable: [10])) } @@ -456,7 +464,7 @@ final class AppConnectProjectionTests: XCTestCase { for app in [Self.app, Self.otherApp] { XCTAssertEqual(projection.connections.first { $0.appId == app }?.unrecordedKeyIds[Self.identity], [20]) XCTAssertEqual( - AppConnect.disconnectPlan(appId: app, snapshot: snapshot, intents: [mine, theirs], includeUnrecorded: true).disable, + Self.planTurningOffOffered(appId: app, snapshot: snapshot, intents: [mine, theirs]).disable, [20]) } } @@ -473,7 +481,7 @@ final class AppConnectProjectionTests: XCTestCase { } for app in [Self.app, Self.otherApp] { XCTAssertEqual( - AppConnect.disconnectPlan(appId: app, snapshot: Self.snapshot([stray]), intents: [mine, gone], includeUnrecorded: true).disable, + Self.planTurningOffOffered(appId: app, snapshot: Self.snapshot([stray]), intents: [mine, gone]).disable, [20], "a disconnect of either app turns it off") } } @@ -484,7 +492,7 @@ final class AppConnectProjectionTests: XCTestCase { let snapshot = Self.snapshot([Self.onPlatform(a), Self.onPlatform(b, data: Data(repeating: 9, count: 20))]) let projection = AppConnect.project([snapshot], intents: [intent]) XCTAssertEqual(projection.connections.first?.status, .active(expiresAt: Self.now + 1000), "the app keeps a row") - let plan = AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], includeUnrecorded: false) + let plan = AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], owners: [:], listedUnrecordedKeyIds: nil) XCTAssertEqual(plan.disable, [10]) XCTAssertEqual(plan.fence, []) } @@ -523,7 +531,7 @@ final class AppConnectProjectionTests: XCTestCase { let snapshot = Self.snapshot([Self.onPlatform(a), Self.onPlatform(b, data: Data(repeating: 9, count: 20))]) XCTAssertEqual(AppConnect.status(of: intent, in: snapshot), .expired) XCTAssertEqual( - AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], includeUnrecorded: false).disable, + AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], owners: [:], listedUnrecordedKeyIds: nil).disable, [10]) let off = Self.snapshot([Self.onPlatform(a, disabledAt: 1), Self.onPlatform(b, data: Data(repeating: 9, count: 20))]) XCTAssertEqual(AppConnect.status(of: intent, in: off), .neverLanded, "nothing enabled is left") @@ -637,7 +645,7 @@ final class AppConnectProjectionTests: XCTestCase { let snapshot = Self.snapshot([other]) XCTAssertEqual(AppConnect.status(of: intent, in: snapshot), .neverLanded) XCTAssertEqual( - AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], includeUnrecorded: false).fence, + AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], owners: [:], listedUnrecordedKeyIds: nil).fence, []) } @@ -742,6 +750,223 @@ final class AppConnectProjectionTests: XCTestCase { XCTAssertEqual(Set(ids), [left.id, otherApp.id], "closed and not removed, on this identity, of any app") } + // MARK: Owners + + private static let sibling = Data(repeating: 0xC1, count: 32) + private static let siblingGroup = Data(repeating: 0xC2, count: 32) + private static let withdrawals = Data.identifier(fromBase58: "4fJLR2GYTPFdomuTVvNy3VRrvWgvkKPzqehEBpNf2nk6")! + + /// The owners asked about are those of the apps with an intent on the + /// identity and of the bounds of unrecorded keys no intent names by + /// contract, never of a system contract. + func testTheOwnersNeededAreTheAppsHereAndTheBoundsOfUnrecordedKeysNoIntentNames() { + let own = Self.authKey(10) + let x = Self.intent([own]) + let z = Self.intent([Self.authKey(11, bound: .singleContract(Self.sibling))], app: Self.otherApp) + let elsewhere = Self.intent([Self.authKey(12, bound: .singleContract(Self.sibling))], identity: Self.otherIdentity) + func stray(_ bound: AppConnect.StoredBound, boundKnown: Bool = true, expiresAt: UInt64? = AppConnectProjectionTests.now + 1000) -> AppConnect.PlatformKey { + Self.onPlatform(Self.authKey(20, bound: bound, expiresAt: expiresAt), boundKnown: boundKnown) + } + struct Case { + let name: String + let keys: [AppConnect.PlatformKey] + let intents: [Intent] + let expected: Set + init(_ name: String, _ keys: [AppConnect.PlatformKey], _ intents: [Intent], _ expected: Set) { + (self.name, self.keys, self.intents, self.expected) = (name, keys, intents, expected) + } + } + let cases: [Case] = [ + Case("a key on a sibling contract", [Self.onPlatform(own), stray(.singleContract(Self.sibling))], [x], [Self.app, Self.sibling]), + Case("a key on a contract an intent of another app here names", [stray(.singleContract(Self.sibling))], [x, z], []), + Case("a key on a contract only an intent on another identity names", [stray(.singleContract(Self.sibling))], [x, elsewhere], []), + Case("a key on a document type of a sibling", [stray(.documentType(contractId: Self.sibling, name: "note"))], [x], [Self.app, Self.sibling]), + Case("a key on a contract group", [stray(.contractGroup(Self.siblingGroup))], [x], [Self.app, Self.siblingGroup]), + Case("a DashPay profile key", [stray(.documentType(contractId: Self.dashPay, name: "profile"))], [x], []), + Case("a key on another system contract", [stray(.singleContract(Self.withdrawals))], [x], []), + Case("a key whose bound the store does not hold", [stray(.singleContract(Self.sibling), boundKnown: false)], [x], []), + Case("a key not in an App Connect shape", [stray(.singleContract(Self.sibling), expiresAt: nil)], [x], []), + Case("no unrecorded key", [Self.onPlatform(own)], [x], []), + Case("a key on the contract of an app whose intent is on another identity", [stray(.singleContract(Self.app))], [Self.intent([own], identity: Self.otherIdentity)], []), + Case("an app with an intent only on another identity", [stray(.singleContract(Self.sibling))], [Self.intent([own], identity: Self.otherIdentity)], []), + Case("no intent at all", [stray(.singleContract(Self.sibling))], [], []), + ] + for c in cases { + XCTAssertEqual(AppConnect.ownerIdsNeeded(snapshot: Self.snapshot(c.keys), intents: c.intents), c.expected, c.name) + } + } + + private static let ownerX = Data(repeating: 0x0A, count: 32) + private static let ownerW = Data(repeating: 0x0B, count: 32) + private static let sibling2 = Data(repeating: 0xC3, count: 32) + + /// The one owner rule: a key joins app X only on a known match no other + /// app here shares, and an unknown owner is never a match or a mismatch. + func testTheOwnerRuleAttributesOnlyOnAKnownMatchNoOtherAppShares() { + let x = Self.app, z = Self.otherApp, y = Self.sibling, system = AppConnect.systemContractOwnerId + struct Case { + let name: String + let owners: [Data: Data] + let apps: Set + let expected: AppConnect.OwnerOutcome + init(_ name: String, _ owners: [Data: Data], _ apps: Set, _ expected: AppConnect.OwnerOutcome) { + (self.name, self.owners, self.apps, self.expected) = (name, owners, apps, expected) + } + } + let cases: [Case] = [ + Case("known match, no other app", [y: Self.ownerX, x: Self.ownerX], [x], .attributed), + Case("known match, other app of another owner", [y: Self.ownerX, x: Self.ownerX, z: Self.ownerW], [x, z], .attributed), + Case("known mismatch", [y: Self.ownerW, x: Self.ownerX], [x], .notThisApp), + Case("bound owner unknown", [x: Self.ownerX], [x], .notChecked), + Case("app owner unknown", [y: Self.ownerX], [x], .notChecked), + Case("app owner unknown, bound of another known owner", [y: Self.ownerW], [x], .notChecked), + Case("both unknown", [:], [x], .notChecked), + Case("another app here has the same owner", [y: Self.ownerX, x: Self.ownerX, z: Self.ownerX], [x, z], .notAttributable), + Case("another app here has an unknown owner", [y: Self.ownerX, x: Self.ownerX], [x, z], .notChecked), + Case("bound owned by the system", [y: system, x: system], [x], .notThisApp), + Case("bound owned by the system, app owner unknown", [y: system], [x], .notThisApp), + ] + for c in cases { + XCTAssertEqual(AppConnect.ownerOutcome(of: y, for: x, among: c.apps, owners: c.owners), c.expected, c.name) + } + } + + /// An unrecorded key no intent names by contract shows on the row of the + /// one app it is attributed to, and on its own contract's row otherwise. + func testAnUnrecordedKeyShowsUnderTheAppItIsAttributedToAndOnItsOwnRowOtherwise() { + let x = Self.intent([Self.authKey(10)]) + let z = Self.intent([Self.authKey(11, bound: .singleContract(Self.otherApp))], app: Self.otherApp) + let onY = Self.onPlatform(Self.authKey(20, bound: .singleContract(Self.sibling))) + let onYDoc = Self.onPlatform(Self.authKey(20, bound: .documentType(contractId: Self.sibling, name: "note"))) + let onGroup = Self.onPlatform(Self.authKey(20, bound: .contractGroup(Self.siblingGroup))) + let onY2 = Self.onPlatform(Self.authKey(21, bound: .singleContract(Self.sibling2))) + let onWithdrawals = Self.onPlatform(Self.authKey(20, bound: .singleContract(Self.withdrawals))) + let match: [Data: Data] = [Self.sibling: Self.ownerX, Self.app: Self.ownerX] + struct Case { + let name: String + let keys: [AppConnect.PlatformKey] + let intents: [Intent] + let owners: [Data: Data] + let rows: [Data: [UInt32]] + init(_ name: String, _ keys: [AppConnect.PlatformKey], _ intents: [Intent], _ owners: [Data: Data], _ rows: [Data: [UInt32]]) { + (self.name, self.keys, self.intents, self.owners, self.rows) = (name, keys, intents, owners, rows) + } + } + let cases: [Case] = [ + Case("no owners: as today", [onY], [x], [:], [Self.sibling: [20]]), + Case("known match (AC-03)", [onY], [x], match, [Self.app: [20]]), + Case("known match on a document type", [onYDoc], [x], match, [Self.app: [20]]), + Case("known match on a contract group", [onGroup], [x], [Self.siblingGroup: Self.ownerX, Self.app: Self.ownerX], [Self.app: [20]]), + Case("bound owner unknown (AC-05)", [onY], [x], [Self.app: Self.ownerX], [Self.sibling: [20]]), + Case("known mismatch (AC-06)", [onY], [x], [Self.sibling: Self.ownerW, Self.app: Self.ownerX], [Self.sibling: [20]]), + Case("two apps of one owner (AC-07)", [onY], [x, z], match.merging([Self.otherApp: Self.ownerX]) { a, _ in a }, [Self.sibling: [20]]), + Case("another app's owner unknown (AC-12)", [onY], [x, z], match, [Self.sibling: [20]]), + Case("other app of another owner", [onY], [x, z], match.merging([Self.otherApp: Self.ownerW]) { a, _ in a }, [Self.app: [20]]), + Case("bound owned by the system (AC-09)", [onY], [x], [Self.sibling: AppConnect.systemContractOwnerId, Self.app: Self.ownerX], [Self.sibling: [20]]), + Case("no intent of that owner (AC-10)", [onY, onY2], [], [Self.sibling: Self.ownerX, Self.sibling2: Self.ownerX], [Self.sibling: [20], Self.sibling2: [21]]), + Case("system contract of the app's owner (AC-09)", [onWithdrawals], [x], [Self.withdrawals: Self.ownerX, Self.app: Self.ownerX], [:]), + ] + for c in cases { + let projection = AppConnect.project([Self.snapshot(c.keys)], intents: c.intents, owners: c.owners) + let rows = Dictionary(uniqueKeysWithValues: projection.connections.compactMap { row in + row.unrecordedKeyIds[Self.identity].map { (row.appId, $0) } + }) + XCTAssertEqual(rows, c.rows, c.name) + } + } + + /// A disconnect of X turns off only its intent keys and the unrecorded + /// keys the question listed that are still X's, and sorts every other + /// key that may be X's into what the result reports. + func testADisconnectTurnsOffOnlyListedKeysStillTheAppsAndReportsTheRest() { + let own = Self.authKey(10) + let x = Self.intent([own]), z = Self.intent([Self.authKey(11, bound: .singleContract(Self.otherApp))], app: Self.otherApp) + func onY(_ bound: AppConnect.StoredBound = .singleContract(AppConnectProjectionTests.sibling), disabledAt: UInt64? = nil, boundKnown: Bool = true) -> AppConnect.PlatformKey { + Self.onPlatform(Self.authKey(20, bound: bound), disabledAt: disabledAt, boundKnown: boundKnown) + } + let match: [Data: Data] = [Self.sibling: Self.ownerX, Self.app: Self.ownerX] + struct Case { + let name: String + let keys: [AppConnect.PlatformKey] + let intents: [Intent] + let owners: [Data: Data] + let listed: Set? + /// disable, offered, notChecked, notAttributable, leftAfterQuestion + let expected: [[UInt32]] + init(_ name: String, _ keys: [AppConnect.PlatformKey], _ intents: [Intent], _ owners: [Data: Data], + _ listed: Set?, _ expected: [[UInt32]]) { + (self.name, self.keys, self.intents, self.owners, self.listed, self.expected) = (name, keys, intents, owners, listed, expected) + } + } + let cases: [Case] = [ + Case("AC-01 question: offered, none turned off", [Self.onPlatform(own), onY()], [x], match, nil, [[10], [20], [], [], []]), + Case("AC-01 confirmed", [Self.onPlatform(own), onY()], [x], match, [20], [[10, 20], [20], [], [], []]), + Case("AC-01 document type", [Self.onPlatform(own), onY(.documentType(contractId: Self.sibling, name: "note"))], [x], match, [20], + [[10, 20], [20], [], [], []]), + Case("AC-02 contract group", [Self.onPlatform(own), onY(.contractGroup(Self.siblingGroup))], [x], + [Self.siblingGroup: Self.ownerX, Self.app: Self.ownerX], [20], [[10, 20], [20], [], [], []]), + Case("AC-04 owner unread", [Self.onPlatform(own), onY()], [x], [Self.app: Self.ownerX], nil, [[10], [], [20], [], []]), + Case("AC-04 owner unread after the question listed it", [Self.onPlatform(own), onY()], [x], [Self.app: Self.ownerX], [20], + [[10], [], [20], [], []]), + Case("AC-06 another owner", [Self.onPlatform(own), onY()], [x], [Self.sibling: Self.ownerW, Self.app: Self.ownerX], [20], + [[10], [], [], [], []]), + Case("AC-07 two apps of one owner", [Self.onPlatform(own), onY()], [x, z], match.merging([Self.otherApp: Self.ownerX]) { a, _ in a }, nil, + [[10], [], [], [20], []]), + Case("AC-08 attributed only after the question", [Self.onPlatform(own), onY()], [x], match, [], [[10], [20], [], [], [20]]), + Case("AC-11 unplaced key", [Self.onPlatform(own), onY(boundKnown: false)], [x], match, [20], [[10], [], [20], [], []]), + Case("AC-12 another app's owner unknown", [Self.onPlatform(own), onY()], [x, z], match, nil, [[10], [], [20], [], []]), + Case("a listed key no longer live", [Self.onPlatform(own), onY(disabledAt: 1)], [x], match, [20], [[10], [], [], [], []]), + Case("a listed id no key has", [Self.onPlatform(own)], [x], match, [20, 99], [[10], [], [], [], []]), + Case("only unknown owners still turn off the app's keys", [Self.onPlatform(own), onY()], [x], [:], [20], [[10], [], [20], [], []]), + Case("AC-09 system contract of the app's owner", [Self.onPlatform(own), onY(.singleContract(Self.withdrawals))], [x], + [Self.withdrawals: Self.ownerX, Self.app: Self.ownerX], [20], [[10], [], [], [], []]), + ] + for c in cases { + let plan = AppConnect.disconnectPlan( + appId: Self.app, snapshot: Self.snapshot(c.keys), intents: c.intents, owners: c.owners, listedUnrecordedKeyIds: c.listed) + XCTAssertEqual( + [plan.disable, plan.offeredUnrecorded, plan.notChecked, plan.notAttributable, plan.leftAfterQuestion], c.expected, c.name) + XCTAssertTrue(Set(plan.disable).isSubset(of: Set(x.keys.map(\.id)).union(c.listed ?? [])), "\(c.name): nothing beyond the list") + } + } + + /// A row whose app has no intent on the identity is the contract the + /// user named: its disconnect offers every key placed on that contract, + /// whatever owner has been read since the row was shown, and turns off + /// only the listed ones. + func testADisconnectOfARowWithoutAnIntentOffersItsKeysWhateverTheirOwner() { + let own = Self.authKey(10) + let x = Self.intent([own]) + let onY = Self.onPlatform(Self.authKey(20, bound: .singleContract(Self.sibling))) + let onY2 = Self.onPlatform(Self.authKey(21, bound: .singleContract(Self.sibling2))) + let match: [Data: Data] = [Self.sibling: Self.ownerX, Self.app: Self.ownerX] + struct Case { + let name: String + let keys: [AppConnect.PlatformKey] + let intents: [Intent] + let owners: [Data: Data] + let listed: Set? + /// disable, offered + let expected: [[UInt32]] + init(_ name: String, _ keys: [AppConnect.PlatformKey], _ intents: [Intent], _ owners: [Data: Data], + _ listed: Set?, _ expected: [[UInt32]]) { + (self.name, self.keys, self.intents, self.owners, self.listed, self.expected) = (name, keys, intents, owners, listed, expected) + } + } + let cases: [Case] = [ + Case("owner unread when shown, read now: question", [Self.onPlatform(own), onY], [x], match, nil, [[], [20]]), + Case("owner unread when shown, read now: confirmed", [Self.onPlatform(own), onY], [x], match, [20], [[20], [20]]), + Case("owner still unread", [Self.onPlatform(own), onY], [x], [Self.app: Self.ownerX], [20], [[20], [20]]), + Case("another owner", [Self.onPlatform(own), onY], [x], [Self.sibling: Self.ownerW, Self.app: Self.ownerX], [20], [[20], [20]]), + Case("no intent here (AC-10)", [onY, onY2], [], [:], [20], [[20], [20]]), + ] + for c in cases { + let plan = AppConnect.disconnectPlan( + appId: Self.sibling, snapshot: Self.snapshot(c.keys), intents: c.intents, owners: c.owners, listedUnrecordedKeyIds: c.listed) + XCTAssertEqual([plan.disable, plan.offeredUnrecorded], c.expected, c.name) + } + } + /// A key on the identity whose bound the store does not hold may be /// bound elsewhere: the update is not taken as landed until it does, so /// the response is not published. The row still counts the key as live. diff --git a/DashWalletTests/DashConnect/DashConnectStoreTests.swift b/DashWalletTests/DashConnect/DashConnectStoreTests.swift index 6a90f3a617..e326d5f0cd 100644 --- a/DashWalletTests/DashConnect/DashConnectStoreTests.swift +++ b/DashWalletTests/DashConnect/DashConnectStoreTests.swift @@ -209,7 +209,7 @@ final class DashConnectStoreTests: XCTestCase { store: store ) - try await first.disconnect(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", scope: nil, includingUnrecorded: false) + try await first.disconnect(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", scope: nil, unrecordedKeyIds: nil) let second = MockDashConnectDataSource(store: store) XCTAssertEqual(second.connectionsSnapshot, []) diff --git a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift index a824bc5f4b..1c3fface3a 100644 --- a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift @@ -594,21 +594,97 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { let spy = PurchaseApprovalSpy() let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false) - spy.disconnectResult = DashConnectDisconnectResult(unrecordedKeysLeft: 2) + spy.disconnectResult = DashConnectDisconnectResult(offeredUnrecordedKeyIds: [20, 21]) viewModel.disconnect(Self.connection) await waitUntil { !viewModel.isDisconnecting && spy.disconnectedIds.count == 1 } XCTAssertEqual(viewModel.message?.text.contains("2"), true) XCTAssertEqual(viewModel.message?.unrecordedKeysOf, Self.connection) - XCTAssertEqual(spy.disconnectedIncludingUnrecorded, [false]) + XCTAssertEqual(viewModel.message?.unrecordedKeyIds, [20, 21], "the message keeps the offered keys") + XCTAssertEqual(spy.disconnectedUnrecordedKeyIds, [nil]) + let offered = viewModel.message?.unrecordedKeyIds viewModel.message = nil spy.disconnectResult = DashConnectDisconnectResult() - viewModel.disconnect(Self.connection, includingUnrecorded: true) + viewModel.disconnect(Self.connection, unrecordedKeyIds: offered) await waitUntil { !viewModel.isDisconnecting && spy.disconnectedIds.count == 2 } - XCTAssertEqual(spy.disconnectedIncludingUnrecorded, [false, true]) + XCTAssertEqual(spy.disconnectedUnrecordedKeyIds, [nil, [20, 21]], "the answer passes back exactly the offered keys") XCTAssertNil(viewModel.message) } + /// The message a disconnect result words, its paragraphs in order. + private func message(after result: DashConnectDisconnectResult) async -> ConnectionsScreenMessage? { + let spy = PurchaseApprovalSpy() + let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false) + spy.disconnectResult = result + viewModel.disconnect(Self.connection) + await waitUntil { !viewModel.isDisconnecting && spy.disconnectedIds.count == 1 } + return viewModel.message + } + + private static let notChecked = "could not tell yet which app holds some keys" + private static let notAttributable = "may belong to another app of the same developer" + private static let leftAfterQuestion = "Disconnect it again to turn them off" + + private static func paragraphs(_ message: ConnectionsScreenMessage?) -> [String] { + message?.text.components(separatedBy: "\n\n") ?? [] + } + + /// SCR-03 with-warnings: the question carries the warnings, so leaving + /// the keys still shows them. + func testTheQuestionCarriesTheWarnings() async { + let message = await message(after: DashConnectDisconnectResult( + keysTurnedOff: 1, offeredUnrecordedKeyIds: [20], keysNotChecked: 2, keysNotAttributable: 3)) + let paragraphs = Self.paragraphs(message) + XCTAssertEqual(message?.kind, .question) + guard paragraphs.count == 3 else { return XCTFail("paragraphs: \(paragraphs)") } + XCTAssertTrue(paragraphs[0].contains("Turn them off too?")) + XCTAssertTrue(paragraphs[1].contains(Self.notChecked) && paragraphs[1].contains("(2)")) + XCTAssertTrue(paragraphs[2].contains(Self.notAttributable) && paragraphs[2].contains("(3)")) + } + + /// SCR-04 not-attributable: its own text, pointing to the key's row, + /// without a retry hint. + func testAKeyNotAttributableIsReportedWithoutARetryHint() async { + let message = await message(after: DashConnectDisconnectResult(keysTurnedOff: 1, keysNotAttributable: 1)) + XCTAssertEqual(message?.kind, .warning) + XCTAssertEqual(Self.paragraphs(message).count, 1) + XCTAssertTrue(message?.text.contains(Self.notAttributable) == true) + XCTAssertTrue(message?.text.contains("its own row") == true) + XCTAssertFalse(message?.text.contains("again later") == true) + } + + /// SCR-04 left-after-question: a key attributed only after the question + /// stays on, and the result says so. + func testAKeyLeftAfterTheQuestionIsReported() async { + let message = await message(after: DashConnectDisconnectResult(keysTurnedOff: 2, keysLeftAfterQuestion: 1)) + XCTAssertEqual(message?.kind, .warning) + XCTAssertTrue(message?.text.contains(Self.leftAfterQuestion) == true) + XCTAssertTrue(message?.text.contains("(1)") == true) + } + + /// SCR-04 combined: not checked, not attributable, left after the + /// question, another identity, in that order; a finding besides the + /// other identity keeps the success heading. + func testSeveralFindingsAreWordedInOrder() async { + let message = await message(after: DashConnectDisconnectResult( + keysNotChecked: 1, keysNotAttributable: 1, keysLeftAfterQuestion: 1, keysOnAnotherIdentity: true)) + let paragraphs = Self.paragraphs(message) + guard paragraphs.count == 4 else { return XCTFail("paragraphs: \(paragraphs)") } + XCTAssertTrue(paragraphs[0].contains(Self.notChecked)) + XCTAssertTrue(paragraphs[1].contains(Self.notAttributable)) + XCTAssertTrue(paragraphs[2].contains(Self.leftAfterQuestion)) + XCTAssertEqual(paragraphs[3], DashConnectPlatformError.grantOnAnotherIdentity.localizedDescription) + XCTAssertEqual(message?.kind, .warning) + XCTAssertEqual(message?.title, "Success") + } + + /// The error heading stays for keys on another identity alone with + /// nothing turned off. + func testKeysOnlyOnAnotherIdentityWithNothingTurnedOffAreAnError() async { + let message = await message(after: DashConnectDisconnectResult(keysOnAnotherIdentity: true)) + XCTAssertEqual(message?.kind, .error) + } + /// With the login unresolved the sheet's action asks again and approves /// nothing. func testAnUnresolvedLoginIsAskedForAgainInsteadOfApproved() async { @@ -893,7 +969,7 @@ private final class PurchaseApprovalSpy: DashConnectDataSource { private var storedDisconnectFailure: Error? private var storedDisconnectedIds: [String] = [] private var storedDisconnectedScopes: [String?] = [] - private var storedDisconnectedIncludingUnrecorded: [Bool] = [] + private var storedDisconnectedUnrecordedKeyIds: [Set?] = [] var disconnectFailure: Error? { get { lock.withLock { storedDisconnectFailure } } @@ -908,8 +984,8 @@ private final class PurchaseApprovalSpy: DashConnectDataSource { lock.withLock { storedDisconnectedScopes } } - var disconnectedIncludingUnrecorded: [Bool] { - lock.withLock { storedDisconnectedIncludingUnrecorded } + var disconnectedUnrecordedKeyIds: [Set?] { + lock.withLock { storedDisconnectedUnrecordedKeyIds } } private var storedDisconnectResult = DashConnectDisconnectResult() @@ -920,11 +996,11 @@ private final class PurchaseApprovalSpy: DashConnectDataSource { set { lock.withLock { storedDisconnectResult = newValue } } } - func disconnect(id: String, scope: String?, includingUnrecorded: Bool) async throws -> DashConnectDisconnectResult { + func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult { let (failure, result) = lock.withLock { () -> (Error?, DashConnectDisconnectResult) in storedDisconnectedIds.append(id) storedDisconnectedScopes.append(scope) - storedDisconnectedIncludingUnrecorded.append(includingUnrecorded) + storedDisconnectedUnrecordedKeyIds.append(unrecordedKeyIds) return (storedDisconnectFailure, storedDisconnectResult) } if let failure { throw failure } @@ -993,7 +1069,7 @@ private final class LoginApprovalSpy: DashConnectDataSource { throw PurchaseSpyError.unsupported } - func disconnect(id: String, scope: String?, includingUnrecorded: Bool) async throws -> DashConnectDisconnectResult { + func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult { throw PurchaseSpyError.unsupported } @@ -1123,7 +1199,7 @@ final class AppConnectLoginTests: XCTestCase { active.idHex = "wallet-b" connections.save([other]) - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } XCTAssertEqual(Self.shownRows(dataSource).map(\.id), [other.id], "the list shows the wallet that is active") XCTAssertEqual(connections.load(), [other]) @@ -1139,7 +1215,7 @@ final class AppConnectLoginTests: XCTestCase { active.idHex = "wallet-b" connections.save([row]) - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } XCTAssertEqual(connections.load().map(\.status), [.active]) } @@ -1163,14 +1239,14 @@ final class AppConnectLoginTests: XCTestCase { center.post(name: SwiftDashSDKWalletState.activeWalletDidChangeNotification, object: nil) await fulfillment(of: [moved], timeout: 2) - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } await dataSource.remove(id: shown[0].id, scope: shown[0].scope) XCTAssertEqual(connections.load(), [row], "the new wallet's row for the same app is untouched") // The row the new list shows is this wallet's own. let current = Self.shownRows(dataSource) await Self.expectNotWalletChanged { - try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, includingUnrecorded: false) + try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, unrecordedKeyIds: nil) } } @@ -1202,12 +1278,12 @@ final class AppConnectLoginTests: XCTestCase { // The same wallet and devnet name, pointed at other nodes. endpoint.url = "https://quorums.two.example" - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } XCTAssertEqual(connections.load().map(\.status), [.active]) let current = Self.shownRows(dataSource) XCTAssertNotEqual(current[0].scope, shown[0].scope) await Self.expectNotWalletChanged { - try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, includingUnrecorded: false) + try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, unrecordedKeyIds: nil) } } @@ -1216,7 +1292,7 @@ final class AppConnectLoginTests: XCTestCase { let row = Self.row(status: .active) let (dataSource, connections) = makeScopedDataSource(active: active, rows: [row]) - await Self.expectWalletChanged { try await dataSource.disconnect(id: row.id, scope: nil, includingUnrecorded: false) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: row.id, scope: nil, unrecordedKeyIds: nil) } await dataSource.remove(id: row.id, scope: nil) XCTAssertEqual(connections.load(), [row]) @@ -1303,7 +1379,7 @@ final class AppConnectLoginTests: XCTestCase { // when it ends is what is checked. let log = OperationLog() let disconnect = Task { - _ = try? await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) + _ = try? await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) await log.add("disconnect ended") } try await Task.sleep(nanoseconds: 100_000_000) @@ -1336,7 +1412,7 @@ final class AppConnectLoginTests: XCTestCase { await fulfillment(of: [otherStarted], timeout: 2) let disconnect = Task { - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } } try? await Task.sleep(nanoseconds: 100_000_000) active.idHex = "wallet-b" @@ -1392,7 +1468,7 @@ final class AppConnectLoginTests: XCTestCase { let (dataSource, _) = makeScopedDataSource(active: active) do { - try await dataSource.disconnect(id: Self.row(status: .active).id, scope: nil, includingUnrecorded: false) + try await dataSource.disconnect(id: Self.row(status: .active).id, scope: nil, unrecordedKeyIds: nil) XCTFail("disconnected with no wallet") } catch { guard case DashConnectPlatformError.noWallet = error else { @@ -1536,3 +1612,460 @@ final class AppConnectLoginTests: XCTestCase { return Data(bytes) } } + +/// The owners of contracts and contract groups, read from Platform and +/// remembered for the app's run: a known owner is never read again, and a +/// read that fails leaves the owner unknown, to be read again. +final class AppConnectOwnerMemoryTests: XCTestCase { + private static let contract = Data(repeating: 0xC1, count: 32) + private static let group = Data(repeating: 0xC2, count: 32) + private static let owner = Data(repeating: 0x0A, count: 32) + + /// Counts reads per id and answers with what the test sets. + private final class Reads: @unchecked Sendable { + private let lock = NSLock() + private var counts: [Data: Int] = [:] + var answer: (Data) throws -> [String: Any] = { _ in [:] } + + func read(_ id: Data) throws -> [String: Any] { + lock.lock() + counts[id, default: 0] += 1 + let answer = self.answer + lock.unlock() + return try answer(id) + } + + func count(_ id: Data) -> Int { + lock.lock() + defer { lock.unlock() } + return counts[id] ?? 0 + } + } + + private func owners( + _ memory: PlatformDashConnectDataSource.OwnerMemory, _ reads: Reads, network: String = "testnet", + contracts: Set = [contract], groups: Set = [] + ) async -> [Data: Data] { + await memory.owners( + contracts: contracts, groups: groups, network: network, + readContract: { try reads.read($0) }, readGroup: { try reads.read($0) }) + } + + func testAKnownOwnerIsNeverReadAgain() async { + let memory = PlatformDashConnectDataSource.OwnerMemory(), reads = Reads() + reads.answer = { _ in ["ownerId": Self.owner.toBase58String()] } + let first = await owners(memory, reads, groups: [Self.group]) + let second = await owners(memory, reads, groups: [Self.group]) + XCTAssertEqual(first, [Self.contract: Self.owner, Self.group: Self.owner]) + XCTAssertEqual(second, first) + XCTAssertEqual(reads.count(Self.contract), 1) + XCTAssertEqual(reads.count(Self.group), 1) + } + + func testAContractOwnerIsReadFromEitherOwnerField() async { + let memory = PlatformDashConnectDataSource.OwnerMemory(), reads = Reads() + reads.answer = { _ in ["$ownerId": Self.owner.toBase58String()] } + let known = await owners(memory, reads) + XCTAssertEqual(known, [Self.contract: Self.owner]) + } + + func testAnOwnerThatCouldNotBeReadStaysUnknownAndIsReadAgain() async { + let failures: [(String, (Data) throws -> [String: Any])] = [ + ("network error", { _ in throw SDKError.timeout("slow") }), + ("not found", { _ in throw SDKError.notFound("behind") }), + ("no readable owner", { _ in ["ownerId": 7] }), + ] + for (name, failure) in failures { + let memory = PlatformDashConnectDataSource.OwnerMemory(), reads = Reads() + reads.answer = failure + let unknown = await owners(memory, reads, groups: [Self.group]) + XCTAssertEqual(unknown, [:], name) + reads.answer = { _ in ["ownerId": Self.owner.toBase58String()] } + let known = await owners(memory, reads, groups: [Self.group]) + XCTAssertEqual(known, [Self.contract: Self.owner, Self.group: Self.owner], name) + XCTAssertEqual(reads.count(Self.contract), 2, name) + XCTAssertEqual(reads.count(Self.group), 2, name) + } + } + + func testAnOwnerKnownOnOneNetworkIsReadAgainOnAnother() async { + let memory = PlatformDashConnectDataSource.OwnerMemory(), reads = Reads() + reads.answer = { _ in ["ownerId": Self.owner.toBase58String()] } + _ = await owners(memory, reads, network: "testnet") + _ = await owners(memory, reads, network: "mainnet") + XCTAssertEqual(reads.count(Self.contract), 2) + } +} + +/// A Connections refresh and a disconnect read the owners they need and +/// place unrecorded keys with the ones they know (`projectWithOwners`, +/// `plannedDisconnect`). +final class AppConnectRefreshOwnersTests: XCTestCase { + private static let identity = Data(repeating: 0x01, count: 32) + private static let app = Data(repeating: 0xA1, count: 32) + private static let sibling = Data(repeating: 0xC1, count: 32) + private static let sibling2 = Data(repeating: 0xC3, count: 32) + private static let owner = Data(repeating: 0x0A, count: 32) + private static let otherApp = Data(repeating: 0xA2, count: 32) + private static let group = Data(repeating: 0xC2, count: 32) + + private static func key( + _ id: UInt32, on contract: Data, bound: AppConnect.StoredBound? = nil, boundKnown: Bool = true + ) -> AppConnect.PlatformKey { + AppConnect.PlatformKey( + id: id, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, + data: Data(repeating: UInt8(id), count: 20), readOnly: false, + bound: boundKnown ? bound ?? .singleContract(contract) : nil, boundKnown: boundKnown, + totalBudget: 1000, expiresAt: 1_800_000_001_000, disabledAt: nil) + } + + private static func intent(_ key: AppConnect.PlatformKey, app: Data = app) -> AppConnect.ConnectionIntent { + AppConnect.ConnectionIntent( + id: UUID(), identityId: identity, appId: app, appLabel: "App", appUrl: "", requestHash: Data(repeating: 0xEE, count: 20), + connectionId: nil, + keys: [AppConnect.IntendedKey( + id: key.id, purpose: key.purpose, securityLevel: key.securityLevel, keyType: key.keyType, data: key.data, + readOnly: false, bound: key.bound, totalBudget: key.totalBudget, expiresAt: key.expiresAt)], + sentEncryptionKeyIds: [], disables: [], + response: AppConnect.ResponseValues(appEphemeralPubKeyHash: "ee", walletEphemeralPubKey: "02", encryptedPayload: "00"), + responseDocumentId: nil, responseRemoved: true, createdAt: Date(timeIntervalSince1970: 0), closedAt: nil) + } + + private final class Reader: @unchecked Sendable { + private let lock = NSLock() + private var reads: [Data: Int] = [:] + var failing: Set = [] + /// The owner each id reads as; any other id reads as `owner`. + var owners: [Data: Data] = [:] + + func read(_ id: Data) throws -> [String: Any] { + lock.lock() + defer { lock.unlock() } + reads[id, default: 0] += 1 + if failing.contains(id) { throw SDKError.timeout("slow") } + return ["ownerId": (owners[id] ?? AppConnectRefreshOwnersTests.owner).toBase58String()] + } + + var total: Int { + lock.lock() + defer { lock.unlock() } + return reads.values.reduce(0, +) + } + } + + private static func ownerReader( + _ memory: PlatformDashConnectDataSource.OwnerMemory, _ reader: Reader + ) -> PlatformDashConnectDataSource.OwnerReader { + .init(network: "testnet", memory: memory, readContract: { try reader.read($0) }, readGroup: { try reader.read($0) }) + } + + private static func rows( + _ keys: [AppConnect.PlatformKey], _ intents: [AppConnect.ConnectionIntent], + memory: PlatformDashConnectDataSource.OwnerMemory, reader: Reader + ) async -> [Data: [UInt32]] { + let snapshot = AppConnect.IdentitySnapshot(identityId: identity, revision: 1, keys: keys, platformTime: nil) + let projection = await PlatformDashConnectDataSource.projectWithOwners(snapshot, intents: intents, owners: ownerReader(memory, reader)) + return Dictionary(uniqueKeysWithValues: projection.connections.map { ($0.appId, $0.unrecordedKeyIds[identity] ?? []) }) + } + + func testAKeyOfTheAppsOwnerJoinsItsRow() async { + let own = Self.key(10, on: Self.app) + let rows = await Self.rows([own, Self.key(20, on: Self.sibling)], [Self.intent(own)], memory: .init(), reader: Reader()) + XCTAssertEqual(rows, [Self.app: [20]], "AC-03: one row for the app, none for the sibling") + } + + func testAKeyWhoseOwnerCouldNotBeReadMovesOnceALaterRefreshReadsIt() async { + let own = Self.key(10, on: Self.app) + let memory = PlatformDashConnectDataSource.OwnerMemory(), reader = Reader() + reader.failing = [Self.sibling] + let first = await Self.rows([own, Self.key(20, on: Self.sibling)], [Self.intent(own)], memory: memory, reader: reader) + XCTAssertEqual(first, [Self.app: [], Self.sibling: [20]], "AC-05: a separate row while unknown") + reader.failing = [] + let second = await Self.rows([own, Self.key(20, on: Self.sibling)], [Self.intent(own)], memory: memory, reader: reader) + XCTAssertEqual(second, [Self.app: [20]], "AC-05: moves once read") + XCTAssertEqual(reader.total, 3, "the app's owner is not read again") + } + + func testWithoutAnIntentKeysOfOneOwnerKeepTheirOwnRows() async { + let rows = await Self.rows([Self.key(20, on: Self.sibling), Self.key(21, on: Self.sibling2)], [], memory: .init(), reader: Reader()) + XCTAssertEqual(rows, [Self.sibling: [20], Self.sibling2: [21]], "AC-10") + } + + func testNoUnrecordedKeyReadsNoOwner() async { + let own = Self.key(10, on: Self.app), reader = Reader() + _ = await Self.rows([own], [Self.intent(own)], memory: .init(), reader: reader) + XCTAssertEqual(reader.total, 0) + } + + private static func planned( + _ keys: [AppConnect.PlatformKey], _ intents: [AppConnect.ConnectionIntent], listed: Set?, + memory: PlatformDashConnectDataSource.OwnerMemory = .init(), reader: Reader = Reader(), appId: Data = app + ) async -> PlatformDashConnectDataSource.PlannedDisconnect { + let snapshot = AppConnect.IdentitySnapshot(identityId: identity, revision: 1, keys: keys, platformTime: nil) + return await PlatformDashConnectDataSource.plannedDisconnect( + appId: appId, snapshot: snapshot, intents: intents, unrecordedKeyIds: listed, fences: [], owners: ownerReader(memory, reader)) + } + + /// QG-2: the question listed one key; an owner read that fails before the + /// PIN and succeeds after attributes a second key, which stays on. + func testADisconnectTurnsOffOnlyTheKeysTheQuestionListed() async { + let own = Self.key(10, on: Self.app) + let keys = [own, Self.key(20, on: Self.sibling), Self.key(21, on: Self.sibling2)] + let memory = PlatformDashConnectDataSource.OwnerMemory(), reader = Reader() + reader.failing = [Self.sibling2] + let beforePin = await Self.planned(keys, [Self.intent(own)], listed: [20], memory: memory, reader: reader) + XCTAssertEqual(Set(beforePin.plan.disable), [10, 20]) + reader.failing = [] + let afterPin = await Self.planned(keys, [Self.intent(own)], listed: [20], memory: memory, reader: reader) + XCTAssertEqual(Set(afterPin.plan.disable), [10, 20], "nothing beyond the listed keys") + XCTAssertEqual(afterPin.appKeysOff, 2, "the keys counted are the keys turned off") + XCTAssertEqual(afterPin.leftAfterQuestion, 1) + } + + /// AC-01, AC-02: a key of the app's owner on a sibling contract, a + /// document type of it or a contract group is offered, then turned off + /// and counted. + func testAKeyOfTheAppsOwnerIsOfferedThenTurnedOffAndCounted() async { + let own = Self.key(10, on: Self.app) + for (name, stray) in [ + ("contract", Self.key(20, on: Self.sibling)), + ("document type", Self.key(20, on: Self.sibling, bound: .documentType(contractId: Self.sibling, name: "note"))), + ("contract group", Self.key(20, on: Self.group, bound: .contractGroup(Self.group))), + ] { + let asked = await Self.planned([own, stray], [Self.intent(own)], listed: nil) + XCTAssertEqual(asked.offered, [20], name) + XCTAssertEqual(asked.plan.disable, [10], name) + let confirmed = await Self.planned([own, stray], [Self.intent(own)], listed: asked.offered) + XCTAssertEqual(Set(confirmed.plan.disable), [10, 20], name) + XCTAssertEqual(confirmed.appKeysOff, 2, name) + XCTAssertEqual([confirmed.notChecked, confirmed.notAttributable, confirmed.leftAfterQuestion], [0, 0, 0], name) + } + } + + /// AC-04, AC-11, AC-12: the disconnect still turns off the app's keys, + /// and reports the key that could not be checked. + func testAKeyThatCouldNotBeCheckedStaysOnAndIsReported() async { + let own = Self.key(10, on: Self.app) + let z = Self.intent(Self.key(11, on: Self.otherApp), app: Self.otherApp) + struct Case { + let name: String + let keys: [AppConnect.PlatformKey] + let intents: [AppConnect.ConnectionIntent] + let failing: Set + } + let cases = [ + Case(name: "AC-04 owner unread", keys: [own, Self.key(20, on: Self.sibling)], intents: [Self.intent(own)], failing: [Self.sibling]), + Case(name: "AC-11 unplaced", keys: [own, Self.key(20, on: Self.sibling, boundKnown: false)], intents: [Self.intent(own)], failing: []), + Case(name: "AC-12 other app's owner unread", keys: [own, Self.key(20, on: Self.sibling)], intents: [Self.intent(own), z], + failing: [Self.otherApp]), + ] + for c in cases { + let name = c.name + let reader = Reader() + reader.failing = c.failing + let result = await Self.planned(c.keys, c.intents, listed: [20], reader: reader) + XCTAssertEqual(result.plan.disable, [10], name) + XCTAssertEqual(result.notChecked, 1, name) + XCTAssertEqual(result.appKeysOff, 1, name) + } + } + + /// DashPay profile keys no intent names are offered with any app's + /// disconnect, and turned off only when listed. + func testAProfileKeyIsOfferedAndTurnedOffOnlyWhenListed() async { + let own = Self.key(10, on: Self.app) + let dashPay = Data.identifier(fromBase58: AppConnect.dashPayContractId)! + let profile = Self.key(30, on: dashPay, bound: .documentType(contractId: dashPay, name: "profile")) + let asked = await Self.planned([own, profile], [Self.intent(own)], listed: nil) + XCTAssertEqual(asked.offered, [30]) + XCTAssertEqual(asked.plan.disable, [10]) + let confirmed = await Self.planned([own, profile], [Self.intent(own)], listed: [30]) + XCTAssertEqual(confirmed.plan.disable, [30, 10], "other keys before the app's") + XCTAssertEqual(confirmed.appKeysOff, 2) + let unlisted = await Self.planned([own, profile], [Self.intent(own)], listed: []) + XCTAssertEqual(unlisted.plan.disable, [10]) + XCTAssertEqual(unlisted.leftAfterQuestion, 1) + } +} + +/// The refresh and the disconnect of the data source on a real +/// `UserDefaults` store, with owners scripted per id: what is stored, what +/// is planned to be turned off, and what the result reports. +extension AppConnectRefreshOwnersTests { + private static func disabled(_ key: AppConnect.PlatformKey) -> AppConnect.PlatformKey { + AppConnect.PlatformKey( + id: key.id, purpose: key.purpose, securityLevel: key.securityLevel, keyType: key.keyType, data: key.data, + readOnly: key.readOnly, bound: key.bound, boundKnown: key.boundKnown, totalBudget: key.totalBudget, + expiresAt: key.expiresAt, disabledAt: 1) + } + + /// A store on a throwaway suite, removed when the test ends. + private func makeStore() -> UserDefaultsDashConnectStore { + let suiteName = "AppConnectRefreshOwnersTests.\(UUID().uuidString)" + let defaults = UserDefaults(suiteName: suiteName)! + addTeardownBlock { defaults.removePersistentDomain(forName: suiteName) } + return UserDefaultsDashConnectStore( + defaults: defaults, network: .testnet, walletIdHexProvider: { "wallet" }, devnetNameProvider: { nil }) + } + + /// Refreshes `store` from a read of `keys`, as the data source does, and + /// returns the stored rows by id. + @discardableResult + private static func refresh( + _ store: UserDefaultsDashConnectStore, _ keys: [AppConnect.PlatformKey], _ intents: [AppConnect.ConnectionIntent], + memory: PlatformDashConnectDataSource.OwnerMemory, reader: Reader + ) async -> [Data: DAppConnection] { + let snapshot = AppConnect.IdentitySnapshot(identityId: identity, revision: 1, keys: keys, platformTime: nil) + let change = await PlatformDashConnectDataSource.refreshedRows( + snapshot: snapshot, intents: intents, owners: ownerReader(memory, reader), at: Date(timeIntervalSince1970: 0)) + store.save(change(store.load())) + return Dictionary(uniqueKeysWithValues: store.load().map { (Data.identifier(fromBase58: $0.id)!, $0) }) + } + + /// AC-03, AC-05: a failing owner read stores a row for Y; the next + /// refresh with the owner read stores the key under X and no row for Y. + func testARefreshStoresASiblingKeyUnderTheAppOnceItsOwnerIsRead() async { + let store = makeStore(), memory = PlatformDashConnectDataSource.OwnerMemory(), reader = Reader() + let own = Self.key(10, on: Self.app) + let keys = [own, Self.key(20, on: Self.sibling)] + reader.failing = [Self.sibling] + let before = await Self.refresh(store, keys, [Self.intent(own)], memory: memory, reader: reader) + XCTAssertEqual(Set(before.keys), [Self.app, Self.sibling], "AC-05: an unread owner keeps its own row") + reader.failing = [] + let after = await Self.refresh(store, keys, [Self.intent(own)], memory: memory, reader: reader) + XCTAssertEqual(Set(after.keys), [Self.app], "AC-03: no row named by Y") + XCTAssertEqual(after[Self.app]?.seenOn, [Self.identity.toBase58String()], "the key shows under X") + } + + /// AC-06: a key of another owner stays on its own stored row, and X's + /// disconnect never plans it. + func testADisconnectNeverPlansAKeyOfAnotherOwnerAndItsRowStays() async { + let store = makeStore(), memory = PlatformDashConnectDataSource.OwnerMemory(), reader = Reader() + reader.owners = [Self.sibling: Data(repeating: 0x0B, count: 32)] + let own = Self.key(10, on: Self.app), onW = Self.key(20, on: Self.sibling) + await Self.refresh(store, [own, onW], [Self.intent(own)], memory: memory, reader: reader) + let asked = await Self.planned([own, onW], [Self.intent(own)], listed: nil, memory: memory, reader: reader) + XCTAssertEqual(asked.offered, []) + let confirmed = await Self.planned([own, onW], [Self.intent(own)], listed: [20], memory: memory, reader: reader) + XCTAssertEqual(confirmed.plan.disable, [10], "the key on W is never submitted") + let after = await Self.refresh(store, [Self.disabled(own), onW], [Self.intent(own)], memory: memory, reader: reader) + XCTAssertEqual(Set(after.keys), [Self.sibling], "W's row stays stored") + } + + /// AC-10: after a fresh-restore refresh both rows are stored; a + /// disconnect of one plans only its key, and the other row stays. + func testWithoutAnIntentADisconnectOfOneRowTurnsOffOnlyItsKey() async { + let store = makeStore(), memory = PlatformDashConnectDataSource.OwnerMemory(), reader = Reader() + let onY = Self.key(20, on: Self.sibling), onY2 = Self.key(21, on: Self.sibling2) + let rows = await Self.refresh(store, [onY, onY2], [], memory: memory, reader: reader) + XCTAssertEqual(Set(rows.keys), [Self.sibling, Self.sibling2]) + let asked = await Self.planned([onY, onY2], [], listed: nil, memory: memory, reader: reader, appId: Self.sibling) + XCTAssertEqual(asked.offered, [20]) + let confirmed = await Self.planned([onY, onY2], [], listed: asked.offered, memory: memory, reader: reader, appId: Self.sibling) + XCTAssertEqual(confirmed.plan.disable, [20]) + let after = await Self.refresh(store, [Self.disabled(onY), onY2], [], memory: memory, reader: reader) + XCTAssertEqual(Set(after.keys), [Self.sibling2]) + XCTAssertEqual(reader.total, 0, "no owner decides anything without an intent") + } + + /// The row the user saw for Y because its owner could not be read: its + /// disconnect still offers and turns off Y's key once the owner reads as + /// X's. + func testARowShownForAnUnreadOwnerStillTurnsOffItsKeyOnceTheOwnerIsRead() async { + let store = makeStore(), memory = PlatformDashConnectDataSource.OwnerMemory(), reader = Reader() + let own = Self.key(10, on: Self.app), onY = Self.key(20, on: Self.sibling) + reader.failing = [Self.sibling] + let shown = await Self.refresh(store, [own, onY], [Self.intent(own)], memory: memory, reader: reader) + XCTAssertNotNil(shown[Self.sibling]) + reader.failing = [] + let readsAtRefresh = reader.total + let asked = await Self.planned([own, onY], [Self.intent(own)], listed: nil, memory: memory, reader: reader, appId: Self.sibling) + XCTAssertEqual(asked.offered, [20]) + let confirmed = await Self.planned( + [own, onY], [Self.intent(own)], listed: asked.offered, memory: memory, reader: reader, appId: Self.sibling) + XCTAssertEqual(confirmed.plan.disable, [20]) + XCTAssertEqual(confirmed.appKeysOff, 1) + XCTAssertEqual(reader.total, readsAtRefresh, "no owner decides anything for a row with no intent") + } + + /// What a disconnect reports from its plan: the offered keys only before + /// the question, and every count as planned. + func testTheDisconnectResultReportsThePlan() async { + let own = Self.key(10, on: Self.app) + let z = Self.intent(Self.key(11, on: Self.otherApp), app: Self.otherApp) + let keys = [own, Self.key(20, on: Self.sibling), Self.key(21, on: Self.sibling2, boundKnown: false)] + let reader = Reader() + reader.owners = [Self.otherApp: Data(repeating: 0x0B, count: 32)] + let asked = await Self.planned(keys, [Self.intent(own), z], listed: nil, reader: reader) + XCTAssertEqual( + PlatformDashConnectDataSource.disconnectResult(of: asked, listed: nil, keysOnAnotherIdentity: true), + DashConnectDisconnectResult( + keysTurnedOff: 1, offeredUnrecordedKeyIds: [20], keysNotChecked: 1, keysNotAttributable: 0, + keysLeftAfterQuestion: 0, keysOnAnotherIdentity: true)) + let confirmed = await Self.planned(keys, [Self.intent(own), z], listed: [], reader: reader) + XCTAssertEqual( + PlatformDashConnectDataSource.disconnectResult(of: confirmed, listed: [], keysOnAnotherIdentity: false), + DashConnectDisconnectResult( + keysTurnedOff: 1, offeredUnrecordedKeyIds: [], keysNotChecked: 1, keysNotAttributable: 0, + keysLeftAfterQuestion: 1, keysOnAnotherIdentity: false)) + } +} + +/// The disconnect question and result on Connections, as DashUIKit's +/// `ModalDialog` (SCR-03, SCR-04). +@MainActor +final class ConnectionsMessageDialogTests: XCTestCase { + private static let connection = MockDashConnectDataSource.sample(.active) + + /// SCR-03: «Leave them» above a destructive «Turn them off», which passes + /// back exactly the offered keys. + func testAQuestionOffersToTurnOffExactlyTheOfferedKeys() { + var turnedOff: (DAppConnection, Set)? + var dismissed = false + let message = ConnectionsScreenMessage( + kind: .question, text: "Question.\n\nWarning.", unrecordedKeysOf: Self.connection, unrecordedKeyIds: [20, 21]) + + let dialog = ConnectionsMessageDialog.dialog( + for: message, turnOff: { turnedOff = ($0, $1) }, dismiss: { dismissed = true }) + + XCTAssertEqual(dialog.icon, .warning) + XCTAssertEqual(dialog.heading, message.title) + XCTAssertEqual(dialog.paragraphs, ["Question.", "Warning."]) + XCTAssertEqual(dialog.primaryAction.title, "Turn them off") + XCTAssertEqual(dialog.primaryAction.role, .destructive) + XCTAssertEqual(dialog.secondaryAction?.title, "Leave them") + dialog.primaryAction.handler() + XCTAssertEqual(turnedOff?.0, Self.connection) + XCTAssertEqual(turnedOff?.1, [20, 21]) + XCTAssertFalse(dismissed) + dialog.secondaryAction?.handler() + XCTAssertTrue(dismissed) + } + + /// SCR-04: one «OK», which only dismisses. + func testAResultHasOneOKButtonThatDismisses() { + var dismissed = false + let message = ConnectionsScreenMessage(kind: .warning, text: "Not checked.\n\nNot attributable.") + + let dialog = ConnectionsMessageDialog.dialog( + for: message, turnOff: { _, _ in XCTFail("a result turns nothing off") }, dismiss: { dismissed = true }) + + XCTAssertEqual(dialog.icon, .warning) + XCTAssertEqual(dialog.heading, message.title) + XCTAssertEqual(dialog.paragraphs, ["Not checked.", "Not attributable."]) + XCTAssertEqual(dialog.primaryAction.title, "OK") + XCTAssertEqual(dialog.primaryAction.role, .regular) + XCTAssertNil(dialog.secondaryAction) + dialog.primaryAction.handler() + XCTAssertTrue(dismissed) + } + /// Only a plain success comes without the warning icon: a token purchase + /// that completed is no warning. + func testTheIconFollowsTheKindOfTheMessage() { + let icons = [ConnectionsScreenMessage.Kind.success, .warning, .error, .question].map { kind in + ConnectionsMessageDialog.dialog( + for: ConnectionsScreenMessage(kind: kind, text: "Text."), turnOff: { _, _ in }, dismiss: {}).icon + } + XCTAssertEqual(icons, [nil, .warning, .warning, .warning]) + } +} diff --git a/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md new file mode 100644 index 0000000000..969867d6eb --- /dev/null +++ b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md @@ -0,0 +1,57 @@ +# 0032 — Pass the owners read from Platform into the pure App Connect projection + +- **Status:** Proposed +- **Date:** 2026-11-10 +- **Feature record:** [../features/app-connect-owner-attribution/adr/0001-pass-owners-read-from-platform-into-the-pure-projection.md](../features/app-connect-owner-attribution/adr/0001-pass-owners-read-from-platform-into-the-pure-projection.md) +- **Deciders:** romchornyi (owner), with Claude during the design pass + +## Context + +Since #1301 the wallet links an unrecorded key to an App Connect app only through the contracts the app's connection intents name (`AppConnect.project`, `contractsOfApp`). A key on a sibling binding granted on another device, or before a reinstall or restore, lands on a separate row, and a disconnect of the app leaves it on while reporting no access left (#1346). The base of #1301 read contract and group owners inside the data source during a disconnect (`ownedByOwner`, removed in 3415560d1). The projection is pure and table-tested (ADR-0027); it now needs to know who owns a contract or a contract group. + +## Decision drivers + +- The rows, the count the "Turn them off?" question shows and the keys a disconnect turns off must agree (spec AC-08; SAD §1 quality goal 2). +- No key is attributed without a known owner match, and an unknown owner never counts as a match or a mismatch (spec §6 NFR "Keys attributed without a known owner match: 0"; CONTEXT invariants; repo guardrail 3). +- Table tests of the projection over known, mismatched and unknown owners, without a network (spec §6 NFR measurement). +- ADR-0027: the data source reads Platform, the projection decides. + +## Considered options + +1. **Owners as an input of the pure projection** — the data source reads the owners the projection needs and passes them to `project` / `disconnectPlan`; a missing entry is unknown. +2. **The projection reads through a closure** — `project` becomes `async` and takes a `readOwner` closure, as `appConnectOwnership` takes `readContract` / `readGroup`. +3. **Attribution in the data source after the projection** — the projection stays as it is and the data source moves keys from separate rows into an app's row by owner, as `ownedByOwner` did before #1301. + +## Decision outcome + +**Chosen:** option 1, because one pure owner rule, called by both projection functions, decides rows, question counts and the disconnect plan, so they cannot drift (option 3 splits the rule across two places, the drift class #1272 suffered), and it keeps the projection synchronous and network-free (option 2 makes every projection test async and couples row building to the network). + +- A small pure function lists the ids whose owner the projection needs: the app contract of every App Connect app with a connection intent on the active identity, and the bound contract or contract group of every unrecorded key that no intent names by contract and that is not on a system contract (`AppConnect.systemContractIds`, the DashPay contract). A document-type bound is asked about by its contract. +- The data source reads those owners it does not know yet, reusing the owner parsing of `appConnectOwnership` (promoted, not copied, per repo guardrail 1), and passes a map from id to owner; an id it could not read is absent, which means unknown. +- One pure helper applies the owner rule, and both `project` (rows and the counts the question shows) and `disconnectPlan` (the keys a disconnect turns off) call it, so they cannot disagree. +- For a disconnect of app X, an unrecorded key is considered only while it may be X's: unless the owner of its bound and the owner of X's contract are both known and differ (AC-06: such a key is neither turned off nor counted). An owner equal to `AppConnect.systemContractOwnerId` never matches (AC-09). A key it considers has exactly one outcome: + - **attributed to X** — the owner of its bound is known and equals the known owner of X's contract, and the owner of every other App Connect app with a connection intent on the identity is known and differs. The key joins X's row and its disconnect (AC-01..AC-03). + - **cannot attribute to X alone** — the owner of its bound is known and equals the known owner of X's contract, and another App Connect app with an intent on the identity has that same known owner. The key stays on its separate row, and the result says so without suggesting a retry (AC-07). + - **could not be checked** — every other case in which it may be X's: the owner of its bound is unknown (AC-04, AC-05), the owner of X's contract is unknown, or the owner matches X while the owner of another app with an intent is unknown (AC-12). The key stays on its separate row and the result does not report that X has no access left. +- On Connections, an unrecorded key shows in an app's row only when it is attributed to that app; otherwise it stays on its separate row (CONTEXT invariant: never hidden). +- ADR-0031's clause that a live key whose bound the store cannot read stops the whole disconnect no longer describes the code of #1301; it is amended in ADR-0031 itself on #1301, and an unplaced key counts as "could not be checked" here (AC-11). + +## Consequences + +**Positive** +- The rows, the question's count and the disconnect plan come from one owner rule and one owner map. +- Every attribution rule is covered by synchronous table tests. + +**Negative** +- The data source needs one more pure step, listing the ids to read, before it can project. +- A Connections refresh waits for the owner reads it needs, within the spec §6 budget (≤ 1 s p95 for up to 4 distinct contracts and contract groups). + +**Neutral** +- The projection's result grows two counts (could not be checked, cannot attribute to this app alone) that the result alert and the question word separately. +- Moving the projection to a shared implementation for both wallets later (ADR-0027 Neutral) now also moves the owner rule. + +## Links + +- Spec: [../features/app-connect-owner-attribution/spec.md](../features/app-connect-owner-attribution/spec.md) (US-01, US-02, US-04, US-05; AC-01..AC-07, AC-09..AC-12) +- SAD: [../features/app-connect-owner-attribution/sad.md](../features/app-connect-owner-attribution/sad.md) §4 +- Related ADR: [0033](0033-turn-off-only-the-unrecorded-keys-the-question-listed.md); [ADR-0027](0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md), [ADR-0031](0031-turn-off-unattributed-dashpay-profile-keys-with-any-disconnect.md) diff --git a/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md b/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md new file mode 100644 index 0000000000..79376b46df --- /dev/null +++ b/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md @@ -0,0 +1,50 @@ +# 0033 — Turn off only the unrecorded keys the question listed + +- **Status:** Proposed +- **Date:** 2026-11-10 +- **Feature record:** [../features/app-connect-owner-attribution/adr/0002-turn-off-only-the-unrecorded-keys-the-question-listed.md](../features/app-connect-owner-attribution/adr/0002-turn-off-only-the-unrecorded-keys-the-question-listed.md) +- **Deciders:** romchornyi (owner), with Claude during the design pass + +## Context + +A disconnect that leaves unrecorded keys of the app asks "Turn them off?" with their count. "Turn them off" calls `disconnect(id:scope:includingUnrecorded: true)`, which builds the plan again from a fresh read after a second PIN. With owner attribution (ADR-0032) the set can grow between the question and the PIN: an owner read that failed before can succeed now. The key that joined would be turned off without the wallet user having been asked about it. + +## Decision drivers + +- When the wallet user was asked to turn off a number of unrecorded keys, the disconnect turns off no key beyond the ones that question counted (spec AC-08; SAD §1 quality goal 2). +- The keys a disconnect turns off are exactly the keys its result counts (AC-08). +- No hidden state between two calls that a later read cannot rebuild (ADR-0027). + +## Considered options + +1. **Carry the listed key ids through the question** — the disconnect result carries the ids of the unrecorded keys it offers, the view model passes them back, and the plan after the PIN is the fresh read intersected with them. +2. **Compare counts only** — keep the flag, pass the count; when the count after the PIN differs, turn nothing off and ask the wallet user to try again. +3. **The data source remembers what it offered** — it keeps the offered set in memory per app between the two calls; the interface does not change. + +## Decision outcome + +**Chosen:** option 1, because consent becomes an exact set the wallet user saw: option 2 cannot tell one key leaving and another joining apart and can loop on errors, and option 3 keeps a stored conclusion between calls with no clear point at which it ends (an alert dismissed, a wallet switch). + +- `DashConnectDisconnectResult` carries the offered unrecorded key ids with their count; the "Turn them off?" message keeps them next to the connection it already holds. +- `DashConnectDataSource.disconnect` takes the listed ids in place of `includingUnrecorded: Bool`; the first disconnect passes none. +- After the PIN, the plan turns off the listed keys that are still live and still the app's; a key the fresh read attributes to the app but the list lacks stays on, and the result says access is left instead of reporting none. + +## Consequences + +**Positive** +- The wallet user's "Turn them off" covers exactly the keys they were told about. +- The rule is testable directly on the plan. + +**Negative** +- The data source protocol, its mock and the view model change signature. +- A key that joins after the question needs another disconnect to be turned off. + +**Neutral** +- A listed key that is gone or no longer the app's by the time of the PIN is simply not turned off. +- For a row whose app has no intent on the identity, the app's keys are those placed on the row's contract: an owner read since the row was shown does not take a listed key away from it (review 2026-11-11 round 2). + +## Links + +- Spec: [../features/app-connect-owner-attribution/spec.md](../features/app-connect-owner-attribution/spec.md) (US-01, AC-08) +- SAD: [../features/app-connect-owner-attribution/sad.md](../features/app-connect-owner-attribution/sad.md) §4 +- Related ADR: [0032](0032-pass-owners-read-from-platform-into-the-pure-projection.md); [ADR-0027](0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md) diff --git a/docs/adr/README.md b/docs/adr/README.md index 04c124df52..bc787ad617 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -24,6 +24,8 @@ where they disagree, ADR-0001 wins. | [0029](0029-allow-a-new-app-connect-approval-while-another-is-confirming.md) | Allow a new App Connect approval while another one is still confirming | platform | Proposed | | | [0030](0030-show-an-app-connect-connection-whose-response-was-not-published-as-not-delivered.md) | Show an App Connect connection whose response was not published as Not delivered | platform | Proposed | | | [0031](0031-turn-off-unattributed-dashpay-profile-keys-with-any-disconnect.md) | Turn off unattributed DashPay profile keys with any disconnect | keys | Proposed | | +| [0032](0032-pass-owners-read-from-platform-into-the-pure-projection.md) | Pass the owners read from Platform into the pure App Connect projection | platform | Proposed | | +| [0033](0033-turn-off-only-the-unrecorded-keys-the-question-listed.md) | Turn off only the unrecorded keys the question listed | keys | Proposed | | Areas: `spv`, `platform`, `keys`, `storage`, `coinjoin`, `payments`, `ui`, `build`, `process`. Each ADR takes one; a new Area is added to this list in the PR that first needs it. diff --git a/docs/design-system.md b/docs/design-system.md index ae16401d9b..d27c68206e 100644 --- a/docs/design-system.md +++ b/docs/design-system.md @@ -89,6 +89,7 @@ are legacy — qualify `DashUIKit.` where names clash. | TransactionView | `UIK: Components/Transaction/TransactionView.swift:29` | default | transaction row | | Criteria | `UIK: Components/Criteria.swift:107` | criterion states `:39` | validation checklist | | SystemMessageView | `UIK: Components/SystemMessageView.swift:20`; Figma `60:208` | with / without buttons, closable | inline notice | +| ModalDialog | `UIK: Components/ModalDialog.swift:23`; Figma `Dialogue` (`110:3283` two buttons, `110:2968` one) | one / two buttons, destructive role, no icon, long text scrolls | dialog card the host presents over a dim; master only | | Toast | `UIK: Components/Toast.swift:53` | styles `:35` (warning / info / error / success / copied / loading / noInternet) | | | Error / Loading / Success illustrations | `UIK: Components/Illustrations/ErrorIllustration.swift:20`, `LoadingIllustration.swift:25`, `SuccessIllustration.swift:20` | — | result screens | | LoadingSpinner | `UIK: Components/Illustrations/LoadingIllustration.swift:54` | — | | @@ -99,7 +100,7 @@ are legacy — qualify `DashUIKit.` where names clash. | Gap | Decision | Interim | |---|---|---| -| Modal dialog | **Add to DashUIKit.** A screen that needs it declares `NEW: ModalDialog`. | app's `DashWallet/Sources/UI/SwiftUI Components/Dialogs/ModalDialog.swift:21` stays for existing screens only | +| Modal dialog | **Closed:** DashUIKit `ModalDialog` (dashpay/DashUIKit#60). | the app's `LegacyModalDialog` (`DashWallet/Sources/UI/SwiftUI Components/Dialogs/ModalDialog.swift:23`) stays for existing screens; moving them is dashpay/dashwallet-ios#1355 | | Stepper | **Add to DashUIKit.** Colors exist (`UIK: Foundation/Color+DashUI.swift:161`, `stepper*`); the view does not. | — | | Generic text field | Open — no screen needs it yet. Decide when one does. | app's `DashWallet/Sources/UI/SwiftUI Components/TextInput.swift:21` | | Empty state | Feature-scoped in this repo, composed from DashUIKit parts (illustration + text + `DashButton`). | — | From 7230f62a8efa6fb6c650329d45cd0a54b3e03b79 Mon Sep 17 00:00:00 2001 From: romchornyi Date: Wed, 11 Nov 2026 12:39:28 +0200 Subject: [PATCH 2/9] docs(adr): drop the private feature-record links from ADR-0032 and ADR-0033 Co-Authored-By: Claude Opus 5.5 SDD-Published-From: 7e2731702728501fed49de40bcc3eb2866d15c47 --- ...32-pass-owners-read-from-platform-into-the-pure-projection.md | 1 - ...0033-turn-off-only-the-unrecorded-keys-the-question-listed.md | 1 - 2 files changed, 2 deletions(-) diff --git a/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md index 969867d6eb..02197a184a 100644 --- a/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md +++ b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md @@ -2,7 +2,6 @@ - **Status:** Proposed - **Date:** 2026-11-10 -- **Feature record:** [../features/app-connect-owner-attribution/adr/0001-pass-owners-read-from-platform-into-the-pure-projection.md](../features/app-connect-owner-attribution/adr/0001-pass-owners-read-from-platform-into-the-pure-projection.md) - **Deciders:** romchornyi (owner), with Claude during the design pass ## Context diff --git a/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md b/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md index 79376b46df..4cc461556d 100644 --- a/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md +++ b/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md @@ -2,7 +2,6 @@ - **Status:** Proposed - **Date:** 2026-11-10 -- **Feature record:** [../features/app-connect-owner-attribution/adr/0002-turn-off-only-the-unrecorded-keys-the-question-listed.md](../features/app-connect-owner-attribution/adr/0002-turn-off-only-the-unrecorded-keys-the-question-listed.md) - **Deciders:** romchornyi (owner), with Claude during the design pass ## Context From 8b6c87dfedb100afdd36ba5cf5695d80f2ebf7ab Mon Sep 17 00:00:00 2001 From: romchornyi Date: Wed, 11 Nov 2026 13:46:14 +0200 Subject: [PATCH 3/9] fix(dashpay): bind offered keys to their identity and report what stays on from the read after the update A key id is unique only within an identity: the keys a disconnect offers now travel with the identity they were read on, and a disconnect with listed keys is refused while another identity is active, before the PIN and after it. What stays on is told from the read after the update, the one the rows are refreshed from, so a key that landed during the update is reported (AC-08). ADR-0032 and ADR-0033 link the PR and issue instead of private records. Co-Authored-By: Claude Opus 5.5 SDD-Published-From: b99b438876fd3b3beab6997c16ba9035e7e3804f --- .../DashConnect/DashConnectDataSource.swift | 9 +- .../DashConnect/DashConnectModels.swift | 14 ++- .../PlatformDashConnectDataSource.swift | 41 +++++-- .../Components/ConnectionsMessageDialog.swift | 8 +- .../UI/DashConnect/ConnectionsScreen.swift | 2 +- .../UI/DashConnect/ConnectionsViewModel.swift | 17 +-- .../DashConnect/DashConnectStoreTests.swift | 2 +- .../PlatformDashConnectDataSourceTests.swift | 108 ++++++++++++------ ...-from-platform-into-the-pure-projection.md | 3 +- ...the-unrecorded-keys-the-question-listed.md | 5 +- 10 files changed, 140 insertions(+), 69 deletions(-) diff --git a/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift index 015fe68e14..979014a75b 100644 --- a/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift @@ -47,8 +47,9 @@ protocol DashConnectDataSource { /// connection then stays. Keys no approval of this wallet names (the /// app's from another device or from before a restore, DashPay profile /// keys no app can be told to hold) are turned off only when listed in - /// `unrecordedKeyIds`, the ids the result of a disconnect without them - /// offered (nil: none listed); only those still the app's go. The + /// `unrecordedKeys`, what the result of a disconnect without them + /// offered (nil: none listed); only those still the app's go, and none + /// when the active identity is not the one they were offered on. The /// connection also stays, and that is thrown, while an approval of the /// app on another identity of the wallet is not done. /// @@ -56,7 +57,7 @@ protocol DashConnectDataSource { /// both calls act only while it still names the wallet they would act /// on. @discardableResult - func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult + func disconnect(id: String, scope: String?, unrecordedKeys: DashConnectOfferedKeys?) async throws -> DashConnectDisconnectResult func remove(id: String, scope: String?) async /// Puts the App Connect rows in step with the active identity's keys on /// Platform. Best effort: a failed read leaves the rows as they were. @@ -278,7 +279,7 @@ final class MockDashConnectDataSource: DashConnectDataSource { } @discardableResult - func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult { + func disconnect(id: String, scope: String?, unrecordedKeys: DashConnectOfferedKeys?) async throws -> DashConnectDisconnectResult { persistAndSend(subject.value.filter { $0.id != id }) return DashConnectDisconnectResult() } diff --git a/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift b/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift index 1621e6a2b5..839322d76a 100644 --- a/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift +++ b/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift @@ -214,8 +214,9 @@ struct DashConnectDisconnectResult: Equatable { /// off only when the user asks, offered by a disconnect without listed /// keys: keys on the app's contracts or of its owner, given on another /// device or before a restore, and DashPay profile keys no app can be - /// told to hold. The user's answer passes them back. - var offeredUnrecordedKeyIds: Set = [] + /// told to hold. The user's answer passes them back, with the identity + /// they are on. Nil when nothing is offered. + var offeredUnrecordedKeys: DashConnectOfferedKeys? = nil /// Live App Connect keys that may be the app's but could not be checked: /// their bound is not in the key store yet, or an owner that decides /// whose they are could not be read. None of them was turned off. @@ -231,7 +232,14 @@ struct DashConnectDisconnectResult: Equatable { /// the active one. var keysOnAnotherIdentity = false - var unrecordedKeysLeft: Int { offeredUnrecordedKeyIds.count } + var unrecordedKeysLeft: Int { offeredUnrecordedKeys?.keyIds.count ?? 0 } +} + +/// Unrecorded keys a disconnect offered to turn off. A key id is unique only +/// within its identity, so the ids go with the identity they were read on. +struct DashConnectOfferedKeys: Equatable { + let identityId: Data + let keyIds: Set } /// A pending request derived from a scanned login QR code. diff --git a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift index e851a78f4c..d35b1c10fe 100644 --- a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift @@ -2113,14 +2113,14 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } @discardableResult - func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult { - try await gated { try await disconnectInTurn(id: id, scope: scope, unrecordedKeyIds: unrecordedKeyIds) } + func disconnect(id: String, scope: String?, unrecordedKeys: DashConnectOfferedKeys?) async throws -> DashConnectDisconnectResult { + try await gated { try await disconnectInTurn(id: id, scope: scope, unrecordedKeys: unrecordedKeys) } } private func disconnectInTurn( id: String, scope: String?, - unrecordedKeyIds: Set? + unrecordedKeys: DashConnectOfferedKeys? ) async throws -> DashConnectDisconnectResult { guard let stores = await showActiveWalletRows() else { throw DashConnectPlatformError.noWallet @@ -2140,11 +2140,14 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { guard !stores.intents.hasUnreadableRows(identityId: context.identityId) else { throw DashConnectPlatformError.intentsUnreadable } + try Self.requireOffered(unrecordedKeys, on: context.identityId) + let unrecordedKeyIds = unrecordedKeys?.keyIds var planned = try await disconnectPlan(appId: appId, unrecordedKeyIds: unrecordedKeyIds, context: context) // The PIN is asked for only when there is something to sign. if !planned.plan.isEmpty { try await authorize() context = try await contextAfterAuthorization(matching: context) + try Self.requireOffered(unrecordedKeys, on: context.identityId) // Read again: the prompt can take any time. Owners still // unknown are read again; a known one comes from memory. planned = try await disconnectPlan(appId: appId, unrecordedKeyIds: unrecordedKeyIds, context: context) @@ -2181,6 +2184,11 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } } await refreshRows(from: after, context: context) + // What stays on is told from the read after the update, as the rows + // are: a key that landed during the update is reported too. + let remaining = after == planned.snapshot ? planned : await Self.plannedDisconnect( + appId: appId, snapshot: after, intents: stores.intents.load(), unrecordedKeyIds: unrecordedKeyIds, fences: [], + owners: Self.ownerReader(context: context)) // A key turned off is checked on the read after the update; one that // still shows live means that read is behind, or a new key landed. @@ -2197,24 +2205,33 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { throw DashConnectPlatformError.grantOnAnotherIdentity } return Self.disconnectResult( - of: planned, listed: unrecordedKeyIds, + of: planned, remaining: remaining, listed: unrecordedKeyIds, identityId: context.identityId, // Keys a read of another identity saw stay, and so does the row. keysOnAnotherIdentity: rows(in: stores).first { $0.id == id }?.seenOn .subtracting([context.identityId.toBase58String()]).isEmpty == false) } - /// What a disconnect planned as `planned` reports. The offered keys are - /// reported only before the question (`listed` nil): the user's answer - /// to it passes them back. + /// Throws `walletChanged` when keys offered on one identity would be + /// turned off while another is active: their ids could name its keys. + static func requireOffered(_ offered: DashConnectOfferedKeys?, on identityId: Data) throws { + if let offered, offered.identityId != identityId { throw DashConnectPlatformError.walletChanged } + } + + /// What a disconnect planned as `planned` reports: the keys it turned + /// off, and what stays on as `remaining`, the same disconnect planned on + /// the read after the update. The offered keys are reported only before + /// the question (`listed` nil): the user's answer to it passes them back. static func disconnectResult( - of planned: PlannedDisconnect, listed: Set?, keysOnAnotherIdentity: Bool + of planned: PlannedDisconnect, remaining: PlannedDisconnect, listed: Set?, identityId: Data, + keysOnAnotherIdentity: Bool ) -> DashConnectDisconnectResult { DashConnectDisconnectResult( keysTurnedOff: planned.appKeysOff, - offeredUnrecordedKeyIds: listed == nil ? planned.offered : [], - keysNotChecked: planned.notChecked, - keysNotAttributable: planned.notAttributable, - keysLeftAfterQuestion: planned.leftAfterQuestion, + offeredUnrecordedKeys: listed == nil && !remaining.offered.isEmpty + ? DashConnectOfferedKeys(identityId: identityId, keyIds: remaining.offered) : nil, + keysNotChecked: remaining.notChecked, + keysNotAttributable: remaining.notAttributable, + keysLeftAfterQuestion: remaining.leftAfterQuestion, keysOnAnotherIdentity: keysOnAnotherIdentity) } diff --git a/DashWallet/Sources/UI/DashConnect/Components/ConnectionsMessageDialog.swift b/DashWallet/Sources/UI/DashConnect/Components/ConnectionsMessageDialog.swift index 846c416444..a70116bd17 100644 --- a/DashWallet/Sources/UI/DashConnect/Components/ConnectionsMessageDialog.swift +++ b/DashWallet/Sources/UI/DashConnect/Components/ConnectionsMessageDialog.swift @@ -27,17 +27,16 @@ import SwiftUI enum ConnectionsMessageDialog { static func dialog( for message: ConnectionsScreenMessage, - turnOff: @escaping (DAppConnection, Set) -> Void, + turnOff: @escaping (DAppConnection, DashConnectOfferedKeys) -> Void, dismiss: @escaping () -> Void ) -> ModalDialog { let paragraphs = message.text.components(separatedBy: "\n\n") let icon: ModalDialog.Icon? = message.kind == .success ? nil : .warning - guard let connection = message.unrecordedKeysOf else { + guard let connection = message.unrecordedKeysOf, let keys = message.unrecordedKeys else { return ModalDialog( icon: icon, heading: message.title, paragraphs: paragraphs, primaryAction: .init(title: NSLocalizedString("OK", comment: ""), handler: dismiss)) } - let keys = message.unrecordedKeyIds return ModalDialog( icon: icon, heading: message.title, paragraphs: paragraphs, primaryAction: .init(title: NSLocalizedString("Turn them off", comment: "DashConnect"), role: .destructive) { @@ -67,7 +66,8 @@ private enum PreviewText { private func dialogPreview(_ kind: ConnectionsScreenMessage.Kind, _ paragraphs: [String], offers: Bool = false) -> some View { let message = ConnectionsScreenMessage( kind: kind, text: paragraphs.joined(separator: "\n\n"), - unrecordedKeysOf: offers ? MockDashConnectDataSource.sample(.active) : nil, unrecordedKeyIds: offers ? [20, 21] : []) + unrecordedKeysOf: offers ? MockDashConnectDataSource.sample(.active) : nil, + unrecordedKeys: offers ? DashConnectOfferedKeys(identityId: Data(repeating: 1, count: 32), keyIds: [20, 21]) : nil) return ZStack { Color.dash.backgroundOverlay.ignoresSafeArea() ConnectionsMessageDialog.dialog(for: message, turnOff: { _, _ in }, dismiss: {}) diff --git a/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift b/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift index 6f6bc1bb85..8e6208113e 100644 --- a/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift +++ b/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift @@ -84,7 +84,7 @@ struct ConnectionsScreen: View { for: message, turnOff: { connection, keys in viewModel.message = nil - viewModel.disconnect(connection, unrecordedKeyIds: keys) + viewModel.disconnect(connection, unrecordedKeys: keys) }, dismiss: { viewModel.message = nil }) .padding(.horizontal, 20) diff --git a/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift b/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift index ab73bf2829..f1b11afe26 100644 --- a/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift +++ b/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift @@ -37,8 +37,9 @@ struct ConnectionsScreenMessage: Identifiable, Equatable { /// A connection the user can also turn its unrecorded keys off for, /// from the same message. var unrecordedKeysOf: DAppConnection? = nil - /// The unrecorded keys the message offers to turn off: only these go. - var unrecordedKeyIds: Set = [] + /// The unrecorded keys the message offers to turn off: only these go, + /// and only while their identity is the active one. + var unrecordedKeys: DashConnectOfferedKeys? = nil var id: String { "\(kind.rawValue):\(text)" @@ -384,13 +385,13 @@ final class ConnectionsViewModel: ObservableObject { } func disconnect(_ connection: DAppConnection) { - disconnect(connection, unrecordedKeyIds: nil) + disconnect(connection, unrecordedKeys: nil) } - /// `unrecordedKeyIds`: also turn off these live keys of the app, and + /// `unrecordedKeys`: also turn off these live keys of the app, and /// DashPay profile keys, that no approval of this wallet names. The user /// is asked for that separately, after a disconnect offered them. - func disconnect(_ connection: DAppConnection, unrecordedKeyIds: Set?) { + func disconnect(_ connection: DAppConnection, unrecordedKeys: DashConnectOfferedKeys?) { // Disconnecting an App Connect connection signs an identity update, // which takes seconds. It must not overlap anything else that signs // one or touches the same records: a second tap, an approval on @@ -400,7 +401,7 @@ final class ConnectionsViewModel: ObservableObject { !isResolvingRequest, pendingRequest == nil, pendingTokenPurchase == nil else { // Asked for from the message after a disconnect: say why nothing // happened rather than nothing. - if unrecordedKeyIds != nil { + if unrecordedKeys != nil { message = ConnectionsScreenMessage( kind: .error, text: NSLocalizedString( @@ -415,7 +416,7 @@ final class ConnectionsViewModel: ObservableObject { defer { self.isDisconnecting = false } do { let result = try await self.dataSource.disconnect( - id: connection.id, scope: connection.scope, unrecordedKeyIds: unrecordedKeyIds) + id: connection.id, scope: connection.scope, unrecordedKeys: unrecordedKeys) // Keys left on that may be the app's: said with the question // too, so leaving the keys still shows them. var warnings: [String] = [] @@ -447,7 +448,7 @@ final class ConnectionsViewModel: ObservableObject { kind: .question, text: ([String.localizedStringWithFormat(text, result.unrecordedKeysLeft)] + warnings).joined(separator: "\n\n"), unrecordedKeysOf: connection, - unrecordedKeyIds: result.offeredUnrecordedKeyIds) + unrecordedKeys: result.offeredUnrecordedKeys) return } var texts = warnings diff --git a/DashWalletTests/DashConnect/DashConnectStoreTests.swift b/DashWalletTests/DashConnect/DashConnectStoreTests.swift index e326d5f0cd..675ead3d2c 100644 --- a/DashWalletTests/DashConnect/DashConnectStoreTests.swift +++ b/DashWalletTests/DashConnect/DashConnectStoreTests.swift @@ -209,7 +209,7 @@ final class DashConnectStoreTests: XCTestCase { store: store ) - try await first.disconnect(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", scope: nil, unrecordedKeyIds: nil) + try await first.disconnect(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", scope: nil, unrecordedKeys: nil) let second = MockDashConnectDataSource(store: store) XCTAssertEqual(second.connectionsSnapshot, []) diff --git a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift index 1c3fface3a..7897293e8f 100644 --- a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift @@ -594,20 +594,21 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { let spy = PurchaseApprovalSpy() let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false) - spy.disconnectResult = DashConnectDisconnectResult(offeredUnrecordedKeyIds: [20, 21]) + let offeredKeys = DashConnectOfferedKeys(identityId: Data(repeating: 0x01, count: 32), keyIds: [20, 21]) + spy.disconnectResult = DashConnectDisconnectResult(offeredUnrecordedKeys: offeredKeys) viewModel.disconnect(Self.connection) await waitUntil { !viewModel.isDisconnecting && spy.disconnectedIds.count == 1 } XCTAssertEqual(viewModel.message?.text.contains("2"), true) XCTAssertEqual(viewModel.message?.unrecordedKeysOf, Self.connection) - XCTAssertEqual(viewModel.message?.unrecordedKeyIds, [20, 21], "the message keeps the offered keys") - XCTAssertEqual(spy.disconnectedUnrecordedKeyIds, [nil]) + XCTAssertEqual(viewModel.message?.unrecordedKeys, offeredKeys, "the message keeps the offered keys and their identity") + XCTAssertEqual(spy.disconnectedUnrecordedKeys, [nil]) - let offered = viewModel.message?.unrecordedKeyIds + let offered = viewModel.message?.unrecordedKeys viewModel.message = nil spy.disconnectResult = DashConnectDisconnectResult() - viewModel.disconnect(Self.connection, unrecordedKeyIds: offered) + viewModel.disconnect(Self.connection, unrecordedKeys: offered) await waitUntil { !viewModel.isDisconnecting && spy.disconnectedIds.count == 2 } - XCTAssertEqual(spy.disconnectedUnrecordedKeyIds, [nil, [20, 21]], "the answer passes back exactly the offered keys") + XCTAssertEqual(spy.disconnectedUnrecordedKeys, [nil, offeredKeys], "the answer passes back exactly the offered keys, with their identity") XCTAssertNil(viewModel.message) } @@ -633,7 +634,8 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { /// the keys still shows them. func testTheQuestionCarriesTheWarnings() async { let message = await message(after: DashConnectDisconnectResult( - keysTurnedOff: 1, offeredUnrecordedKeyIds: [20], keysNotChecked: 2, keysNotAttributable: 3)) + keysTurnedOff: 1, offeredUnrecordedKeys: DashConnectOfferedKeys(identityId: Data(repeating: 0x01, count: 32), keyIds: [20]), + keysNotChecked: 2, keysNotAttributable: 3)) let paragraphs = Self.paragraphs(message) XCTAssertEqual(message?.kind, .question) guard paragraphs.count == 3 else { return XCTFail("paragraphs: \(paragraphs)") } @@ -969,7 +971,7 @@ private final class PurchaseApprovalSpy: DashConnectDataSource { private var storedDisconnectFailure: Error? private var storedDisconnectedIds: [String] = [] private var storedDisconnectedScopes: [String?] = [] - private var storedDisconnectedUnrecordedKeyIds: [Set?] = [] + private var storedDisconnectedUnrecordedKeys: [DashConnectOfferedKeys?] = [] var disconnectFailure: Error? { get { lock.withLock { storedDisconnectFailure } } @@ -984,8 +986,8 @@ private final class PurchaseApprovalSpy: DashConnectDataSource { lock.withLock { storedDisconnectedScopes } } - var disconnectedUnrecordedKeyIds: [Set?] { - lock.withLock { storedDisconnectedUnrecordedKeyIds } + var disconnectedUnrecordedKeys: [DashConnectOfferedKeys?] { + lock.withLock { storedDisconnectedUnrecordedKeys } } private var storedDisconnectResult = DashConnectDisconnectResult() @@ -996,11 +998,11 @@ private final class PurchaseApprovalSpy: DashConnectDataSource { set { lock.withLock { storedDisconnectResult = newValue } } } - func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult { + func disconnect(id: String, scope: String?, unrecordedKeys: DashConnectOfferedKeys?) async throws -> DashConnectDisconnectResult { let (failure, result) = lock.withLock { () -> (Error?, DashConnectDisconnectResult) in storedDisconnectedIds.append(id) storedDisconnectedScopes.append(scope) - storedDisconnectedUnrecordedKeyIds.append(unrecordedKeyIds) + storedDisconnectedUnrecordedKeys.append(unrecordedKeys) return (storedDisconnectFailure, storedDisconnectResult) } if let failure { throw failure } @@ -1069,7 +1071,7 @@ private final class LoginApprovalSpy: DashConnectDataSource { throw PurchaseSpyError.unsupported } - func disconnect(id: String, scope: String?, unrecordedKeyIds: Set?) async throws -> DashConnectDisconnectResult { + func disconnect(id: String, scope: String?, unrecordedKeys: DashConnectOfferedKeys?) async throws -> DashConnectDisconnectResult { throw PurchaseSpyError.unsupported } @@ -1199,7 +1201,7 @@ final class AppConnectLoginTests: XCTestCase { active.idHex = "wallet-b" connections.save([other]) - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeys: nil) } XCTAssertEqual(Self.shownRows(dataSource).map(\.id), [other.id], "the list shows the wallet that is active") XCTAssertEqual(connections.load(), [other]) @@ -1215,7 +1217,7 @@ final class AppConnectLoginTests: XCTestCase { active.idHex = "wallet-b" connections.save([row]) - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeys: nil) } XCTAssertEqual(connections.load().map(\.status), [.active]) } @@ -1239,14 +1241,14 @@ final class AppConnectLoginTests: XCTestCase { center.post(name: SwiftDashSDKWalletState.activeWalletDidChangeNotification, object: nil) await fulfillment(of: [moved], timeout: 2) - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeys: nil) } await dataSource.remove(id: shown[0].id, scope: shown[0].scope) XCTAssertEqual(connections.load(), [row], "the new wallet's row for the same app is untouched") // The row the new list shows is this wallet's own. let current = Self.shownRows(dataSource) await Self.expectNotWalletChanged { - try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, unrecordedKeyIds: nil) + try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, unrecordedKeys: nil) } } @@ -1278,12 +1280,12 @@ final class AppConnectLoginTests: XCTestCase { // The same wallet and devnet name, pointed at other nodes. endpoint.url = "https://quorums.two.example" - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeys: nil) } XCTAssertEqual(connections.load().map(\.status), [.active]) let current = Self.shownRows(dataSource) XCTAssertNotEqual(current[0].scope, shown[0].scope) await Self.expectNotWalletChanged { - try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, unrecordedKeyIds: nil) + try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, unrecordedKeys: nil) } } @@ -1292,7 +1294,7 @@ final class AppConnectLoginTests: XCTestCase { let row = Self.row(status: .active) let (dataSource, connections) = makeScopedDataSource(active: active, rows: [row]) - await Self.expectWalletChanged { try await dataSource.disconnect(id: row.id, scope: nil, unrecordedKeyIds: nil) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: row.id, scope: nil, unrecordedKeys: nil) } await dataSource.remove(id: row.id, scope: nil) XCTAssertEqual(connections.load(), [row]) @@ -1379,7 +1381,7 @@ final class AppConnectLoginTests: XCTestCase { // when it ends is what is checked. let log = OperationLog() let disconnect = Task { - _ = try? await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) + _ = try? await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeys: nil) await log.add("disconnect ended") } try await Task.sleep(nanoseconds: 100_000_000) @@ -1412,7 +1414,7 @@ final class AppConnectLoginTests: XCTestCase { await fulfillment(of: [otherStarted], timeout: 2) let disconnect = Task { - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeyIds: nil) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, unrecordedKeys: nil) } } try? await Task.sleep(nanoseconds: 100_000_000) active.idHex = "wallet-b" @@ -1468,7 +1470,7 @@ final class AppConnectLoginTests: XCTestCase { let (dataSource, _) = makeScopedDataSource(active: active) do { - try await dataSource.disconnect(id: Self.row(status: .active).id, scope: nil, unrecordedKeyIds: nil) + try await dataSource.disconnect(id: Self.row(status: .active).id, scope: nil, unrecordedKeys: nil) XCTFail("disconnected with no wallet") } catch { guard case DashConnectPlatformError.noWallet = error else { @@ -1710,13 +1712,13 @@ final class AppConnectRefreshOwnersTests: XCTestCase { private static let group = Data(repeating: 0xC2, count: 32) private static func key( - _ id: UInt32, on contract: Data, bound: AppConnect.StoredBound? = nil, boundKnown: Bool = true + _ id: UInt32, on contract: Data, bound: AppConnect.StoredBound? = nil, boundKnown: Bool = true, disabledAt: UInt64? = nil ) -> AppConnect.PlatformKey { AppConnect.PlatformKey( id: id, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, data: Data(repeating: UInt8(id), count: 20), readOnly: false, bound: boundKnown ? bound ?? .singleContract(contract) : nil, boundKnown: boundKnown, - totalBudget: 1000, expiresAt: 1_800_000_001_000, disabledAt: nil) + totalBudget: 1000, expiresAt: 1_800_000_001_000, disabledAt: disabledAt) } private static func intent(_ key: AppConnect.PlatformKey, app: Data = app) -> AppConnect.ConnectionIntent { @@ -1998,17 +2000,58 @@ extension AppConnectRefreshOwnersTests { reader.owners = [Self.otherApp: Data(repeating: 0x0B, count: 32)] let asked = await Self.planned(keys, [Self.intent(own), z], listed: nil, reader: reader) XCTAssertEqual( - PlatformDashConnectDataSource.disconnectResult(of: asked, listed: nil, keysOnAnotherIdentity: true), + PlatformDashConnectDataSource.disconnectResult(of: asked, remaining: asked, listed: nil, identityId: Self.identity, keysOnAnotherIdentity: true), DashConnectDisconnectResult( - keysTurnedOff: 1, offeredUnrecordedKeyIds: [20], keysNotChecked: 1, keysNotAttributable: 0, + keysTurnedOff: 1, offeredUnrecordedKeys: DashConnectOfferedKeys(identityId: Self.identity, keyIds: [20]), + keysNotChecked: 1, keysNotAttributable: 0, keysLeftAfterQuestion: 0, keysOnAnotherIdentity: true)) let confirmed = await Self.planned(keys, [Self.intent(own), z], listed: [], reader: reader) XCTAssertEqual( - PlatformDashConnectDataSource.disconnectResult(of: confirmed, listed: [], keysOnAnotherIdentity: false), + PlatformDashConnectDataSource.disconnectResult(of: confirmed, remaining: confirmed, listed: [], identityId: Self.identity, keysOnAnotherIdentity: false), DashConnectDisconnectResult( - keysTurnedOff: 1, offeredUnrecordedKeyIds: [], keysNotChecked: 1, keysNotAttributable: 0, + keysTurnedOff: 1, offeredUnrecordedKeys: nil, keysNotChecked: 1, keysNotAttributable: 0, keysLeftAfterQuestion: 1, keysOnAnotherIdentity: false)) } + + /// What stays on is told from the read after the update: a key of the + /// app that first shows there is reported, before the question as + /// offered and after it as left on, while the keys turned off are those + /// the plan before the update turned off. + func testAKeyFirstSeenOnTheReadAfterTheUpdateIsReportedAsStillOn() async { + let own = Self.key(10, on: Self.app) + let ownOff = Self.key(10, on: Self.app, disabledAt: 1) + let listedOff = Self.key(20, on: Self.app, disabledAt: 1) + let landed = Self.key(21, on: Self.app) + let intents = [Self.intent(own)] + + let asked = await Self.planned([own], intents, listed: nil) + let askedAfter = await Self.planned([ownOff, landed], intents, listed: nil) + let first = PlatformDashConnectDataSource.disconnectResult( + of: asked, remaining: askedAfter, listed: nil, identityId: Self.identity, keysOnAnotherIdentity: false) + XCTAssertEqual(first.keysTurnedOff, 1) + XCTAssertEqual(first.offeredUnrecordedKeys, DashConnectOfferedKeys(identityId: Self.identity, keyIds: [21])) + + let confirmed = await Self.planned([own, Self.key(20, on: Self.app)], intents, listed: [20]) + let confirmedAfter = await Self.planned([ownOff, listedOff, landed], intents, listed: [20]) + let second = PlatformDashConnectDataSource.disconnectResult( + of: confirmed, remaining: confirmedAfter, listed: [20], identityId: Self.identity, keysOnAnotherIdentity: false) + XCTAssertEqual(second.keysTurnedOff, 2, "the keys the update turned off") + XCTAssertEqual(second.keysLeftAfterQuestion, 1, "AC-08: the key that landed during the update stays on and is said") + XCTAssertNil(second.offeredUnrecordedKeys) + } + + /// A key id is unique only within an identity: keys offered on one + /// identity are never turned off while another is active, even when it + /// has keys with the same ids. Checked before the PIN and after it. + func testOfferedKeysOfAnotherIdentityAreRefusedEvenWithTheSameKeyIds() { + let other = Data(repeating: 0x0E, count: 32) + let offered = DashConnectOfferedKeys(identityId: Self.identity, keyIds: [20]) + XCTAssertNoThrow(try PlatformDashConnectDataSource.requireOffered(offered, on: Self.identity)) + XCTAssertNoThrow(try PlatformDashConnectDataSource.requireOffered(nil, on: other), "nothing offered, nothing to check") + XCTAssertThrowsError(try PlatformDashConnectDataSource.requireOffered(offered, on: other)) { error in + guard case DashConnectPlatformError.walletChanged = error else { return XCTFail("\(error)") } + } + } } /// The disconnect question and result on Connections, as DashUIKit's @@ -2020,10 +2063,11 @@ final class ConnectionsMessageDialogTests: XCTestCase { /// SCR-03: «Leave them» above a destructive «Turn them off», which passes /// back exactly the offered keys. func testAQuestionOffersToTurnOffExactlyTheOfferedKeys() { - var turnedOff: (DAppConnection, Set)? + var turnedOff: (DAppConnection, DashConnectOfferedKeys)? var dismissed = false + let offered = DashConnectOfferedKeys(identityId: Data(repeating: 0x01, count: 32), keyIds: [20, 21]) let message = ConnectionsScreenMessage( - kind: .question, text: "Question.\n\nWarning.", unrecordedKeysOf: Self.connection, unrecordedKeyIds: [20, 21]) + kind: .question, text: "Question.\n\nWarning.", unrecordedKeysOf: Self.connection, unrecordedKeys: offered) let dialog = ConnectionsMessageDialog.dialog( for: message, turnOff: { turnedOff = ($0, $1) }, dismiss: { dismissed = true }) @@ -2036,7 +2080,7 @@ final class ConnectionsMessageDialogTests: XCTestCase { XCTAssertEqual(dialog.secondaryAction?.title, "Leave them") dialog.primaryAction.handler() XCTAssertEqual(turnedOff?.0, Self.connection) - XCTAssertEqual(turnedOff?.1, [20, 21]) + XCTAssertEqual(turnedOff?.1, offered) XCTAssertFalse(dismissed) dialog.secondaryAction?.handler() XCTAssertTrue(dismissed) diff --git a/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md index 02197a184a..8c90a21b4d 100644 --- a/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md +++ b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md @@ -51,6 +51,5 @@ Since #1301 the wallet links an unrecorded key to an App Connect app only throug ## Links -- Spec: [../features/app-connect-owner-attribution/spec.md](../features/app-connect-owner-attribution/spec.md) (US-01, US-02, US-04, US-05; AC-01..AC-07, AC-09..AC-12) -- SAD: [../features/app-connect-owner-attribution/sad.md](../features/app-connect-owner-attribution/sad.md) §4 - Related ADR: [0033](0033-turn-off-only-the-unrecorded-keys-the-question-listed.md); [ADR-0027](0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md), [ADR-0031](0031-turn-off-unattributed-dashpay-profile-keys-with-any-disconnect.md) +- PR: #1364; issue #1346; the #1301 review thread it answers: r4513114671 diff --git a/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md b/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md index 4cc461556d..f5e94b860e 100644 --- a/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md +++ b/docs/adr/0033-turn-off-only-the-unrecorded-keys-the-question-listed.md @@ -27,6 +27,8 @@ A disconnect that leaves unrecorded keys of the app asks "Turn them off?" with t - `DashConnectDisconnectResult` carries the offered unrecorded key ids with their count; the "Turn them off?" message keeps them next to the connection it already holds. - `DashConnectDataSource.disconnect` takes the listed ids in place of `includingUnrecorded: Bool`; the first disconnect passes none. - After the PIN, the plan turns off the listed keys that are still live and still the app's; a key the fresh read attributes to the app but the list lacks stays on, and the result says access is left instead of reporting none. +- A key id is unique only within an identity, so the offered ids go with the identity they were read on (`DashConnectOfferedKeys`). A disconnect with listed keys runs only while that identity is the active one, checked before the PIN and after it; otherwise it is refused as a wallet or identity change. +- What stays on (offered, left after the question, not checked, not attributable) is told from the read after the update, the read the rows are refreshed from; the count of keys turned off is the plan's. ## Consequences @@ -44,6 +46,5 @@ A disconnect that leaves unrecorded keys of the app asks "Turn them off?" with t ## Links -- Spec: [../features/app-connect-owner-attribution/spec.md](../features/app-connect-owner-attribution/spec.md) (US-01, AC-08) -- SAD: [../features/app-connect-owner-attribution/sad.md](../features/app-connect-owner-attribution/sad.md) §4 - Related ADR: [0032](0032-pass-owners-read-from-platform-into-the-pure-projection.md); [ADR-0027](0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md) +- PR: #1364; issue #1346; the #1301 review thread it answers: r4513114671 From 0ff9f554411e8dbcec35d46b521262ee1fa2f8dc Mon Sep 17 00:00:00 2001 From: romchornyi Date: Wed, 11 Nov 2026 19:09:33 +0200 Subject: [PATCH 4/9] fix(dashpay): settle a disconnect's rows and result on one owner read After a disconnect the Connections rows and what the result says stays on were worked out from two owner reads. A failed read is tried again, so the rows could give a sibling-contract key its own row while the result told the user to disconnect the app again, with no row left to do it from; and an unchanged identity reused the plan from before the PIN. Both now come from one read of the owners on the read after the update (settledDisconnect), on every path. Co-Authored-By: Claude Opus 5.5 --- .../PlatformDashConnectDataSource.swift | 51 +++++++++++++++++-- .../PlatformDashConnectDataSourceTests.swift | 35 +++++++++++++ 2 files changed, 81 insertions(+), 5 deletions(-) diff --git a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift index d35b1c10fe..09a30e50f2 100644 --- a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift @@ -1004,6 +1004,19 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { ) async -> PlannedDisconnect { let hasIntent = intents.contains { $0.appId == appId && $0.identityId == snapshot.identityId } let owners = hasIntent ? await reader.knownOwners(for: snapshot, intents: intents) : [:] + return plannedDisconnect( + appId: appId, snapshot: snapshot, intents: intents, unrecordedKeyIds: unrecordedKeyIds, fences: fences, + knownOwners: owners) + } + + /// `plannedDisconnect` with owners already read (`knownOwners`), so a + /// caller can plan and refresh the rows from the same owners. + static func plannedDisconnect( + appId: Data, snapshot: AppConnect.IdentitySnapshot, intents: [AppConnect.ConnectionIntent], + unrecordedKeyIds: Set?, fences: [UInt32], knownOwners known: [Data: Data] + ) -> PlannedDisconnect { + let hasIntent = intents.contains { $0.appId == appId && $0.identityId == snapshot.identityId } + let owners = hasIntent ? known : [:] var plan = AppConnect.disconnectPlan( appId: appId, snapshot: snapshot, intents: intents, owners: owners, listedUnrecordedKeyIds: unrecordedKeyIds) // DashPay profile keys no intent names are no one app's: no record @@ -1043,6 +1056,33 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { return { rows($0, after: projection, of: snapshot.identityId, intents: elsewhere, at: updatedAt) } } + /// What a disconnect leaves on `after`, the read after its update: the + /// change to the rows and what stays on (`remaining`), both from one read + /// of the owners. Owners read apart could differ, a failed read being + /// tried again, and the result could then name a row the list no longer + /// has, or call a key unchecked that the rows place. + static func settledDisconnect( + appId: Data, after: AppConnect.IdentitySnapshot, intents: [AppConnect.ConnectionIntent], + unrecordedKeyIds: Set?, owners reader: OwnerReader, at updatedAt: Date + ) async -> (rows: ([DAppConnection]) -> [DAppConnection], remaining: PlannedDisconnect) { + let known = await reader.knownOwners(for: after, intents: intents) + return ( + refreshedRows(snapshot: after, intents: intents, knownOwners: known, at: updatedAt), + plannedDisconnect( + appId: appId, snapshot: after, intents: intents, unrecordedKeyIds: unrecordedKeyIds, fences: [], + knownOwners: known)) + } + + /// `refreshedRows` with owners already read (`knownOwners`). + static func refreshedRows( + snapshot: AppConnect.IdentitySnapshot, intents all: [AppConnect.ConnectionIntent], knownOwners: [Data: Data], + at updatedAt: Date + ) -> ([DAppConnection]) -> [DAppConnection] { + let projection = AppConnect.project([snapshot], intents: all, owners: knownOwners) + let elsewhere = all.filter { $0.identityId != snapshot.identityId && $0.closedAt == nil } + return { rows($0, after: projection, of: snapshot.identityId, intents: elsewhere, at: updatedAt) } + } + /// `rows` with the App Connect connections of `projection`, the read of /// `identityId`: an app with live keys or an update that may still land /// has a row; one whose keys are all off, or whose update never landed, @@ -2183,12 +2223,13 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { await deleteResponses(of: Array(ids), responseContractId: responseContractId, context: context, signer: signer) } } - await refreshRows(from: after, context: context) // What stays on is told from the read after the update, as the rows - // are: a key that landed during the update is reported too. - let remaining = after == planned.snapshot ? planned : await Self.plannedDisconnect( - appId: appId, snapshot: after, intents: stores.intents.load(), unrecordedKeyIds: unrecordedKeyIds, fences: [], - owners: Self.ownerReader(context: context)) + // are, and from the same owners. A key that landed during the update + // is reported too. + let (rowsAfter, remaining) = await Self.settledDisconnect( + appId: appId, after: after, intents: stores.intents.load(), unrecordedKeyIds: unrecordedKeyIds, + owners: Self.ownerReader(context: context), at: now()) + await updateRows(in: stores, rowsAfter) // A key turned off is checked on the read after the update; one that // still shows live means that read is behind, or a new key landed. diff --git a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift index 7897293e8f..62ef781e39 100644 --- a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift @@ -1737,6 +1737,8 @@ final class AppConnectRefreshOwnersTests: XCTestCase { private let lock = NSLock() private var reads: [Data: Int] = [:] var failing: Set = [] + /// Ids whose next read fails, and only that one. + var failingOnce: Set = [] /// The owner each id reads as; any other id reads as `owner`. var owners: [Data: Data] = [:] @@ -1745,6 +1747,7 @@ final class AppConnectRefreshOwnersTests: XCTestCase { defer { lock.unlock() } reads[id, default: 0] += 1 if failing.contains(id) { throw SDKError.timeout("slow") } + if failingOnce.remove(id) != nil { throw SDKError.timeout("slow") } return ["ownerId": (owners[id] ?? AppConnectRefreshOwnersTests.owner).toBase58String()] } @@ -2040,6 +2043,38 @@ extension AppConnectRefreshOwnersTests { XCTAssertNil(second.offeredUnrecordedKeys) } + /// The rows and what stays on after a disconnect come from one read of + /// the owners: whether the owner of a key on a sibling contract reads, + /// does not, or fails once and then reads, a result that says a key of + /// the app stays on keeps the app's row, and a key the rows give a row of + /// its own is reported as not checked. The read here is also the one a + /// disconnect with nothing to submit settles on. + func testTheRowsAndWhatStaysOnAfterADisconnectComeFromTheSameOwners() async { + let own = Self.key(10, on: Self.app), onY = Self.key(20, on: Self.sibling) + let intents = [Self.intent(own)] + let after = AppConnect.IdentitySnapshot( + identityId: Self.identity, revision: 2, keys: [Self.disabled(own), onY], platformTime: nil) + for (ownerReads, failsOnce) in [(false, false), (true, false), (false, true)] { + let store = makeStore(), reader = Reader() + reader.failing = [Self.sibling] + await Self.refresh(store, [own, onY], intents, memory: .init(), reader: reader) + reader.failing = ownerReads || failsOnce ? [] : [Self.sibling] + reader.failingOnce = failsOnce ? [Self.sibling] : [] + let (change, remaining) = await PlatformDashConnectDataSource.settledDisconnect( + appId: Self.app, after: after, intents: intents, unrecordedKeyIds: [], + owners: Self.ownerReader(.init(), reader), at: Date(timeIntervalSince1970: 0)) + let rows = Set(change(store.load()).compactMap { Data.identifier(fromBase58: $0.id) }) + if ownerReads { + XCTAssertEqual(remaining.leftAfterQuestion, 1, "the sibling key is the app's and stays on") + XCTAssertTrue(rows.contains(Self.app), "the row a second disconnect needs is there") + } else { + XCTAssertEqual(remaining.leftAfterQuestion, 0, "nothing of the app is said to stay on") + XCTAssertEqual(remaining.notChecked, 1, "the key with an unread owner is reported as not checked") + XCTAssertEqual(rows, [Self.sibling], "the key keeps its own row") + } + } + } + /// A key id is unique only within an identity: keys offered on one /// identity are never turned off while another is active, even when it /// has keys with the same ids. Checked before the PIN and after it. From e661639b632bed705047ccad610553ff57046885 Mon Sep 17 00:00:00 2001 From: romchornyi Date: Wed, 11 Nov 2026 21:35:43 +0200 Subject: [PATCH 5/9] fix(dashpay): report every key a confirmed disconnect leaves on, under the row that shows it After the user answered the question, the result left out a listed key that stayed on because its owner could not be read when the update was planned. Every offered key still on after settlement is now reported as left on. When the disconnected row is gone after settlement and another app's row shows those keys, the message names that row instead of asking for a second disconnect of the app. Co-Authored-By: Claude Opus 5.5 --- .../DashConnect/DashConnectModels.swift | 7 ++- .../PlatformDashConnectDataSource.swift | 51 +++++++++------ .../UI/DashConnect/ConnectionsViewModel.swift | 26 ++++++-- DashWallet/ar.lproj/Localizable.strings | 3 + DashWallet/bg.lproj/Localizable.strings | 3 + DashWallet/ca.lproj/Localizable.strings | 3 + DashWallet/cs.lproj/Localizable.strings | 3 + DashWallet/da.lproj/Localizable.strings | 3 + DashWallet/de.lproj/Localizable.strings | 3 + DashWallet/el.lproj/Localizable.strings | 3 + DashWallet/en.lproj/Localizable.strings | 3 + DashWallet/eo.lproj/Localizable.strings | 3 + DashWallet/es.lproj/Localizable.strings | 3 + DashWallet/et.lproj/Localizable.strings | 3 + DashWallet/fa.lproj/Localizable.strings | 3 + DashWallet/fi.lproj/Localizable.strings | 3 + DashWallet/fil.lproj/Localizable.strings | 3 + DashWallet/fr.lproj/Localizable.strings | 3 + DashWallet/hr.lproj/Localizable.strings | 3 + DashWallet/hu.lproj/Localizable.strings | 3 + DashWallet/id.lproj/Localizable.strings | 3 + DashWallet/it.lproj/Localizable.strings | 3 + DashWallet/ja.lproj/Localizable.strings | 3 + DashWallet/ko.lproj/Localizable.strings | 3 + DashWallet/mk.lproj/Localizable.strings | 3 + DashWallet/ms.lproj/Localizable.strings | 3 + DashWallet/nb.lproj/Localizable.strings | 3 + DashWallet/nl.lproj/Localizable.strings | 3 + DashWallet/pl.lproj/Localizable.strings | 3 + DashWallet/pt.lproj/Localizable.strings | 3 + DashWallet/ro.lproj/Localizable.strings | 3 + DashWallet/ru.lproj/Localizable.strings | 3 + DashWallet/sk.lproj/Localizable.strings | 3 + DashWallet/sl.lproj/Localizable.strings | 3 + DashWallet/sl_SI.lproj/Localizable.strings | 3 + DashWallet/sq.lproj/Localizable.strings | 3 + DashWallet/sr.lproj/Localizable.strings | 3 + DashWallet/sv.lproj/Localizable.strings | 3 + DashWallet/th.lproj/Localizable.strings | 3 + DashWallet/tr.lproj/Localizable.strings | 3 + DashWallet/uk.lproj/Localizable.strings | 3 + DashWallet/vi.lproj/Localizable.strings | 3 + DashWallet/zh-Hans.lproj/Localizable.strings | 3 + .../zh-Hant-TW.lproj/Localizable.strings | 3 + DashWallet/zh.lproj/Localizable.strings | 3 + DashWallet/zh_TW.lproj/Localizable.strings | 3 + .../PlatformDashConnectDataSourceTests.swift | 63 ++++++++++++++++++- 47 files changed, 249 insertions(+), 27 deletions(-) diff --git a/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift b/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift index 839322d76a..e315f46293 100644 --- a/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift +++ b/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift @@ -224,9 +224,12 @@ struct DashConnectDisconnectResult: Equatable { /// Live keys of the app's owner that another app with an approval here /// has too: they may be that app's, and none was turned off. var keysNotAttributable = 0 - /// Keys the disconnect found on the app's row that the user's question - /// did not list: none was turned off. + /// Keys of the app still on after the user answered the question: found + /// since it, or listed but kept out of the update because whose they + /// are could not be read then. None was turned off. var keysLeftAfterQuestion = 0 + /// The row those keys now show under, when the app's own row is gone. + var keysLeftUnder: String? = nil /// A read of another identity of this wallet saw keys of the app no /// approval names. They can be turned off only while that identity is /// the active one. diff --git a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift index 09a30e50f2..8b3e01dc1a 100644 --- a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift @@ -1060,27 +1060,29 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { /// change to the rows and what stays on (`remaining`), both from one read /// of the owners. Owners read apart could differ, a failed read being /// tried again, and the result could then name a row the list no longer - /// has, or call a key unchecked that the rows place. + /// has, or call a key unchecked that the rows place. After the question + /// (`unrecordedKeyIds` set), every offered key still on is left on, + /// listed or not: a listed key a failed owner read kept out of the + /// update is on too. `holder`: another app whose row shows some of those + /// keys, so the user can be sent there when the app's own row is gone. static func settledDisconnect( appId: Data, after: AppConnect.IdentitySnapshot, intents: [AppConnect.ConnectionIntent], unrecordedKeyIds: Set?, owners reader: OwnerReader, at updatedAt: Date - ) async -> (rows: ([DAppConnection]) -> [DAppConnection], remaining: PlannedDisconnect) { + ) async -> (rows: ([DAppConnection]) -> [DAppConnection], remaining: PlannedDisconnect, holder: Data?) { let known = await reader.knownOwners(for: after, intents: intents) + let projection = AppConnect.project([after], intents: intents, owners: known) + let elsewhere = intents.filter { $0.identityId != after.identityId && $0.closedAt == nil } + var remaining = plannedDisconnect( + appId: appId, snapshot: after, intents: intents, unrecordedKeyIds: unrecordedKeyIds, fences: [], + knownOwners: known) + if unrecordedKeyIds != nil { remaining.leftAfterQuestion = remaining.offered.count } + let left = unrecordedKeyIds == nil ? [] : remaining.offered + let holder = projection.connections.first { + $0.appId != appId && !left.isDisjoint(with: $0.unrecordedKeyIds[after.identityId] ?? []) + }?.appId return ( - refreshedRows(snapshot: after, intents: intents, knownOwners: known, at: updatedAt), - plannedDisconnect( - appId: appId, snapshot: after, intents: intents, unrecordedKeyIds: unrecordedKeyIds, fences: [], - knownOwners: known)) - } - - /// `refreshedRows` with owners already read (`knownOwners`). - static func refreshedRows( - snapshot: AppConnect.IdentitySnapshot, intents all: [AppConnect.ConnectionIntent], knownOwners: [Data: Data], - at updatedAt: Date - ) -> ([DAppConnection]) -> [DAppConnection] { - let projection = AppConnect.project([snapshot], intents: all, owners: knownOwners) - let elsewhere = all.filter { $0.identityId != snapshot.identityId && $0.closedAt == nil } - return { rows($0, after: projection, of: snapshot.identityId, intents: elsewhere, at: updatedAt) } + { rows($0, after: projection, of: after.identityId, intents: elsewhere, at: updatedAt) }, + remaining, holder) } /// `rows` with the App Connect connections of `projection`, the read of @@ -2226,10 +2228,11 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { // What stays on is told from the read after the update, as the rows // are, and from the same owners. A key that landed during the update // is reported too. - let (rowsAfter, remaining) = await Self.settledDisconnect( + let (rowsAfter, remaining, holder) = await Self.settledDisconnect( appId: appId, after: after, intents: stores.intents.load(), unrecordedKeyIds: unrecordedKeyIds, owners: Self.ownerReader(context: context), at: now()) await updateRows(in: stores, rowsAfter) + let rowsNow = rows(in: stores) // A key turned off is checked on the read after the update; one that // still shows live means that read is behind, or a new key landed. @@ -2245,11 +2248,21 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { }) { throw DashConnectPlatformError.grantOnAnotherIdentity } - return Self.disconnectResult( + var result = Self.disconnectResult( of: planned, remaining: remaining, listed: unrecordedKeyIds, identityId: context.identityId, // Keys a read of another identity saw stay, and so does the row. - keysOnAnotherIdentity: rows(in: stores).first { $0.id == id }?.seenOn + keysOnAnotherIdentity: rowsNow.first { $0.id == id }?.seenOn .subtracting([context.identityId.toBase58String()]).isEmpty == false) + result.keysLeftUnder = Self.keysLeftUnder(app: id, holder: holder, rows: rowsNow) + return result + } + + /// The name of the row the keys left on show under, when the app's own + /// row is gone: a second disconnect of the app could no longer be asked + /// for. Nil while the app's row is there. + static func keysLeftUnder(app id: String, holder: Data?, rows: [DAppConnection]) -> String? { + guard let holder, !rows.contains(where: { $0.id == id }) else { return nil } + return rows.first { $0.id == holder.toBase58String() }?.name } /// Throws `walletChanged` when keys offered on one identity would be diff --git a/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift b/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift index f1b11afe26..52a65a9430 100644 --- a/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift +++ b/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift @@ -388,6 +388,26 @@ final class ConnectionsViewModel: ObservableObject { disconnect(connection, unrecordedKeys: nil) } + /// Keys of the app left on after the question: a second disconnect of + /// the app turns them off, or, when its row is gone, the row that shows + /// them now (`holder`). + private static func keysLeftText(_ count: Int, under holder: String?) -> String { + // swiftlint:disable line_length + guard let holder else { + return String.localizedStringWithFormat( + NSLocalizedString( + "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off.", + comment: "DashConnect: after turning off the keys a question listed, keys of the app found since stay on"), + count) + } + return String.localizedStringWithFormat( + NSLocalizedString( + "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off.", + comment: "DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name"), + count, holder) + // swiftlint:enable line_length + } + /// `unrecordedKeys`: also turn off these live keys of the app, and /// DashPay profile keys, that no approval of this wallet names. The user /// is asked for that separately, after a disconnect offered them. @@ -453,11 +473,7 @@ final class ConnectionsViewModel: ObservableObject { } var texts = warnings if result.keysLeftAfterQuestion > 0 { - texts.append(String.localizedStringWithFormat( - NSLocalizedString( - "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off.", - comment: "DashConnect: after turning off the keys a question listed, keys of the app found since stay on"), - result.keysLeftAfterQuestion)) + texts.append(Self.keysLeftText(result.keysLeftAfterQuestion, under: result.keysLeftUnder)) } if result.keysOnAnotherIdentity { texts.append(DashConnectPlatformError.grantOnAnotherIdentity.localizedDescription) diff --git a/DashWallet/ar.lproj/Localizable.strings b/DashWallet/ar.lproj/Localizable.strings index 96cd24e949..6e4d2cf16f 100644 --- a/DashWallet/ar.lproj/Localizable.strings +++ b/DashWallet/ar.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/bg.lproj/Localizable.strings b/DashWallet/bg.lproj/Localizable.strings index 4568bb6da1..e372bf6591 100644 --- a/DashWallet/bg.lproj/Localizable.strings +++ b/DashWallet/bg.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/ca.lproj/Localizable.strings b/DashWallet/ca.lproj/Localizable.strings index 86055fa625..957c5f64c7 100644 --- a/DashWallet/ca.lproj/Localizable.strings +++ b/DashWallet/ca.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/cs.lproj/Localizable.strings b/DashWallet/cs.lproj/Localizable.strings index 2a568cba5f..f2b86b264d 100644 --- a/DashWallet/cs.lproj/Localizable.strings +++ b/DashWallet/cs.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/da.lproj/Localizable.strings b/DashWallet/da.lproj/Localizable.strings index 61f1ac4de0..b5af757ce7 100644 --- a/DashWallet/da.lproj/Localizable.strings +++ b/DashWallet/da.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/de.lproj/Localizable.strings b/DashWallet/de.lproj/Localizable.strings index 6344a1b04c..32e703bf0f 100644 --- a/DashWallet/de.lproj/Localizable.strings +++ b/DashWallet/de.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Rabatt"; diff --git a/DashWallet/el.lproj/Localizable.strings b/DashWallet/el.lproj/Localizable.strings index 965817050e..ef5e443806 100644 --- a/DashWallet/el.lproj/Localizable.strings +++ b/DashWallet/el.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Έκπτωση"; diff --git a/DashWallet/en.lproj/Localizable.strings b/DashWallet/en.lproj/Localizable.strings index fd4d35673f..0365af88a2 100644 --- a/DashWallet/en.lproj/Localizable.strings +++ b/DashWallet/en.lproj/Localizable.strings @@ -1773,6 +1773,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/eo.lproj/Localizable.strings b/DashWallet/eo.lproj/Localizable.strings index 50fc8d691f..3b1901ab8b 100644 --- a/DashWallet/eo.lproj/Localizable.strings +++ b/DashWallet/eo.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/es.lproj/Localizable.strings b/DashWallet/es.lproj/Localizable.strings index 17252143cc..b828a8a435 100644 --- a/DashWallet/es.lproj/Localizable.strings +++ b/DashWallet/es.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Descuento"; diff --git a/DashWallet/et.lproj/Localizable.strings b/DashWallet/et.lproj/Localizable.strings index 1bc7e6f9fa..5a220c7d45 100644 --- a/DashWallet/et.lproj/Localizable.strings +++ b/DashWallet/et.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/fa.lproj/Localizable.strings b/DashWallet/fa.lproj/Localizable.strings index a2506d6465..c1e878a3de 100644 --- a/DashWallet/fa.lproj/Localizable.strings +++ b/DashWallet/fa.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "تخفیف"; diff --git a/DashWallet/fi.lproj/Localizable.strings b/DashWallet/fi.lproj/Localizable.strings index a6c3eec10f..a3b4177e86 100644 --- a/DashWallet/fi.lproj/Localizable.strings +++ b/DashWallet/fi.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/fil.lproj/Localizable.strings b/DashWallet/fil.lproj/Localizable.strings index 0027348fe8..c97c406db4 100644 --- a/DashWallet/fil.lproj/Localizable.strings +++ b/DashWallet/fil.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Diskwento"; diff --git a/DashWallet/fr.lproj/Localizable.strings b/DashWallet/fr.lproj/Localizable.strings index e6b81ef1c3..9b430a05a7 100644 --- a/DashWallet/fr.lproj/Localizable.strings +++ b/DashWallet/fr.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Réduction"; diff --git a/DashWallet/hr.lproj/Localizable.strings b/DashWallet/hr.lproj/Localizable.strings index 773d1e5b66..3dc7a03c14 100644 --- a/DashWallet/hr.lproj/Localizable.strings +++ b/DashWallet/hr.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/hu.lproj/Localizable.strings b/DashWallet/hu.lproj/Localizable.strings index ec8f18edb5..2412b3e18f 100644 --- a/DashWallet/hu.lproj/Localizable.strings +++ b/DashWallet/hu.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/id.lproj/Localizable.strings b/DashWallet/id.lproj/Localizable.strings index e593a02fb7..1fde69a70d 100644 --- a/DashWallet/id.lproj/Localizable.strings +++ b/DashWallet/id.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Diskon"; diff --git a/DashWallet/it.lproj/Localizable.strings b/DashWallet/it.lproj/Localizable.strings index 2deccbc077..83728ee0d1 100644 --- a/DashWallet/it.lproj/Localizable.strings +++ b/DashWallet/it.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Sconto"; diff --git a/DashWallet/ja.lproj/Localizable.strings b/DashWallet/ja.lproj/Localizable.strings index 902ef09670..22e3285e71 100644 --- a/DashWallet/ja.lproj/Localizable.strings +++ b/DashWallet/ja.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "割引"; diff --git a/DashWallet/ko.lproj/Localizable.strings b/DashWallet/ko.lproj/Localizable.strings index 5872249d87..6a474c3149 100644 --- a/DashWallet/ko.lproj/Localizable.strings +++ b/DashWallet/ko.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "할인"; diff --git a/DashWallet/mk.lproj/Localizable.strings b/DashWallet/mk.lproj/Localizable.strings index e2f2837da8..293c951293 100644 --- a/DashWallet/mk.lproj/Localizable.strings +++ b/DashWallet/mk.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/ms.lproj/Localizable.strings b/DashWallet/ms.lproj/Localizable.strings index 00ea904e64..9bdab608e8 100644 --- a/DashWallet/ms.lproj/Localizable.strings +++ b/DashWallet/ms.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/nb.lproj/Localizable.strings b/DashWallet/nb.lproj/Localizable.strings index a21a6ca3bd..b5d1c82c49 100644 --- a/DashWallet/nb.lproj/Localizable.strings +++ b/DashWallet/nb.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/nl.lproj/Localizable.strings b/DashWallet/nl.lproj/Localizable.strings index 7d2d658d58..ea5f2f1416 100644 --- a/DashWallet/nl.lproj/Localizable.strings +++ b/DashWallet/nl.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Korting"; diff --git a/DashWallet/pl.lproj/Localizable.strings b/DashWallet/pl.lproj/Localizable.strings index cf1350076f..2271d86f9b 100644 --- a/DashWallet/pl.lproj/Localizable.strings +++ b/DashWallet/pl.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Zniżka"; diff --git a/DashWallet/pt.lproj/Localizable.strings b/DashWallet/pt.lproj/Localizable.strings index 3b8a045efa..f440a18dd9 100644 --- a/DashWallet/pt.lproj/Localizable.strings +++ b/DashWallet/pt.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Desconto"; diff --git a/DashWallet/ro.lproj/Localizable.strings b/DashWallet/ro.lproj/Localizable.strings index ced4d2d152..5e125fdc07 100644 --- a/DashWallet/ro.lproj/Localizable.strings +++ b/DashWallet/ro.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/ru.lproj/Localizable.strings b/DashWallet/ru.lproj/Localizable.strings index 7e7d0cb704..3896b42e4d 100644 --- a/DashWallet/ru.lproj/Localizable.strings +++ b/DashWallet/ru.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Скидка"; diff --git a/DashWallet/sk.lproj/Localizable.strings b/DashWallet/sk.lproj/Localizable.strings index e74ee6faf3..2835da94ba 100644 --- a/DashWallet/sk.lproj/Localizable.strings +++ b/DashWallet/sk.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Zľava"; diff --git a/DashWallet/sl.lproj/Localizable.strings b/DashWallet/sl.lproj/Localizable.strings index 6610c84ccc..68dc05ea23 100644 --- a/DashWallet/sl.lproj/Localizable.strings +++ b/DashWallet/sl.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/sl_SI.lproj/Localizable.strings b/DashWallet/sl_SI.lproj/Localizable.strings index 49be9f503d..3e9c8206c1 100644 --- a/DashWallet/sl_SI.lproj/Localizable.strings +++ b/DashWallet/sl_SI.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/sq.lproj/Localizable.strings b/DashWallet/sq.lproj/Localizable.strings index e1a5c1fe04..5eae66dbba 100644 --- a/DashWallet/sq.lproj/Localizable.strings +++ b/DashWallet/sq.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/sr.lproj/Localizable.strings b/DashWallet/sr.lproj/Localizable.strings index 63adbfd3cd..346fdcdf2e 100644 --- a/DashWallet/sr.lproj/Localizable.strings +++ b/DashWallet/sr.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/sv.lproj/Localizable.strings b/DashWallet/sv.lproj/Localizable.strings index 1b02dac596..05b9c8f66c 100644 --- a/DashWallet/sv.lproj/Localizable.strings +++ b/DashWallet/sv.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/th.lproj/Localizable.strings b/DashWallet/th.lproj/Localizable.strings index b3c4a61a91..70aa82b8db 100644 --- a/DashWallet/th.lproj/Localizable.strings +++ b/DashWallet/th.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/tr.lproj/Localizable.strings b/DashWallet/tr.lproj/Localizable.strings index 319dfb35e6..0bff2858d8 100644 --- a/DashWallet/tr.lproj/Localizable.strings +++ b/DashWallet/tr.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "İndirim"; diff --git a/DashWallet/uk.lproj/Localizable.strings b/DashWallet/uk.lproj/Localizable.strings index a859a2f2f8..ede8220a1f 100644 --- a/DashWallet/uk.lproj/Localizable.strings +++ b/DashWallet/uk.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Знижка"; diff --git a/DashWallet/vi.lproj/Localizable.strings b/DashWallet/vi.lproj/Localizable.strings index 9af25e2704..3af92d7040 100644 --- a/DashWallet/vi.lproj/Localizable.strings +++ b/DashWallet/vi.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/zh-Hans.lproj/Localizable.strings b/DashWallet/zh-Hans.lproj/Localizable.strings index 2d4454d159..f25ed914e2 100644 --- a/DashWallet/zh-Hans.lproj/Localizable.strings +++ b/DashWallet/zh-Hans.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/zh-Hant-TW.lproj/Localizable.strings b/DashWallet/zh-Hant-TW.lproj/Localizable.strings index c0a424840d..b97f92a6c2 100644 --- a/DashWallet/zh-Hant-TW.lproj/Localizable.strings +++ b/DashWallet/zh-Hant-TW.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "Discount"; diff --git a/DashWallet/zh.lproj/Localizable.strings b/DashWallet/zh.lproj/Localizable.strings index 96b84597b3..92ac55edc6 100644 --- a/DashWallet/zh.lproj/Localizable.strings +++ b/DashWallet/zh.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "折扣"; diff --git a/DashWallet/zh_TW.lproj/Localizable.strings b/DashWallet/zh_TW.lproj/Localizable.strings index b5a81935e6..504f8a904e 100644 --- a/DashWallet/zh_TW.lproj/Localizable.strings +++ b/DashWallet/zh_TW.lproj/Localizable.strings @@ -1774,6 +1774,9 @@ /* DashConnect: after turning off the keys a question listed, keys of the app found since stay on */ "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off." = "Disconnected. Some keys of this app are still on your identity (%d). Disconnect it again to turn them off."; +/* DashConnect: after a disconnect, keys of the app stay on and now show under another app's row; %2$@ is that app's name */ +"Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off." = "Disconnected. Some keys of this app are still on your identity (%1$d). They now show under %2$@ in Connections: disconnect it there to turn them off."; + /* DashSpend confirmation */ "Discount" = "折扣"; diff --git a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift index 62ef781e39..a9bf54e075 100644 --- a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift @@ -664,6 +664,18 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { XCTAssertTrue(message?.text.contains("(1)") == true) } + /// Keys left on whose app's row is gone are sent to the row that shows + /// them, by its name, never to a second disconnect of the app. + func testKeysLeftUnderAnotherRowNameThatRow() async { + let message = await message(after: DashConnectDisconnectResult( + keysTurnedOff: 1, keysLeftAfterQuestion: 2, keysLeftUnder: "Other App")) + XCTAssertEqual(message?.kind, .warning) + XCTAssertEqual(Self.paragraphs(message).count, 1) + XCTAssertTrue(message?.text.contains("(2)") == true) + XCTAssertTrue(message?.text.contains("show under Other App in Connections") == true) + XCTAssertFalse(message?.text.contains(Self.leftAfterQuestion) == true) + } + /// SCR-04 combined: not checked, not attributable, left after the /// question, another identity, in that order; a finding besides the /// other identity keeps the success heading. @@ -2060,7 +2072,7 @@ extension AppConnectRefreshOwnersTests { await Self.refresh(store, [own, onY], intents, memory: .init(), reader: reader) reader.failing = ownerReads || failsOnce ? [] : [Self.sibling] reader.failingOnce = failsOnce ? [Self.sibling] : [] - let (change, remaining) = await PlatformDashConnectDataSource.settledDisconnect( + let (change, remaining, _) = await PlatformDashConnectDataSource.settledDisconnect( appId: Self.app, after: after, intents: intents, unrecordedKeyIds: [], owners: Self.ownerReader(.init(), reader), at: Date(timeIntervalSince1970: 0)) let rows = Set(change(store.load()).compactMap { Data.identifier(fromBase58: $0.id) }) @@ -2075,6 +2087,55 @@ extension AppConnectRefreshOwnersTests { } } + /// A key the question listed that a failed owner read kept out of the + /// update is still on: once the owner reads on the read after it, the + /// result says so, as it does for a key found since the question. + func testAListedKeyKeptOutOfTheUpdateIsReportedAsStillOn() async { + let own = Self.key(10, on: Self.app), onY = Self.key(20, on: Self.sibling) + let intents = [Self.intent(own)] + let memory = PlatformDashConnectDataSource.OwnerMemory(), reader = Reader() + reader.failing = [Self.sibling] + let confirmed = await Self.planned([own, onY], intents, listed: [20], memory: memory, reader: reader) + XCTAssertEqual(confirmed.plan.disable, [10], "the listed key is not submitted while its owner is unread") + reader.failing = [] + let after = AppConnect.IdentitySnapshot( + identityId: Self.identity, revision: 2, keys: [Self.disabled(own), onY], platformTime: nil) + let (_, remaining, _) = await PlatformDashConnectDataSource.settledDisconnect( + appId: Self.app, after: after, intents: intents, unrecordedKeyIds: [20], + owners: Self.ownerReader(memory, reader), at: Date(timeIntervalSince1970: 0)) + XCTAssertEqual(remaining.leftAfterQuestion, 1, "the listed key that stayed on is reported") + } + + /// A row with no intent whose owner reads on the read after its + /// disconnect is gone, its keys now under the app of the same owner: a + /// key that arrived after the question is reported under that app's row, + /// the one the user can still disconnect. + func testKeysLeftOnARowThatIsGoneAreReportedUnderTheRowThatShowsThem() async { + let store = makeStore(), reader = Reader() + let own = Self.key(10, on: Self.app), listed = Self.key(20, on: Self.sibling), arrived = Self.key(21, on: Self.sibling) + let intents = [Self.intent(own)] + reader.failing = [Self.sibling] + let shown = await Self.refresh(store, [own, listed], intents, memory: .init(), reader: reader) + XCTAssertNotNil(shown[Self.sibling], "an unread owner gives Y its own row") + reader.failing = [] + let after = AppConnect.IdentitySnapshot( + identityId: Self.identity, revision: 2, keys: [own, Self.disabled(listed), arrived], platformTime: nil) + let (change, remaining, holder) = await PlatformDashConnectDataSource.settledDisconnect( + appId: Self.sibling, after: after, intents: intents, unrecordedKeyIds: [20], + owners: Self.ownerReader(.init(), reader), at: Date(timeIntervalSince1970: 0)) + XCTAssertEqual(remaining.leftAfterQuestion, 1, "the key that arrived after the question stays on") + XCTAssertEqual(holder, Self.app) + let rows = change(store.load()) + XCTAssertFalse(rows.contains { $0.id == Self.sibling.toBase58String() }, "Y's row is gone") + let appRow = rows.first { $0.id == Self.app.toBase58String() } + XCTAssertNotNil(appRow) + XCTAssertEqual( + PlatformDashConnectDataSource.keysLeftUnder(app: Self.sibling.toBase58String(), holder: holder, rows: rows), appRow?.name) + XCTAssertNil( + PlatformDashConnectDataSource.keysLeftUnder(app: Self.app.toBase58String(), holder: holder, rows: rows), + "nil while the app's own row is there") + } + /// A key id is unique only within an identity: keys offered on one /// identity are never turned off while another is active, even when it /// has keys with the same ids. Checked before the PIN and after it. From af44713533d92461b1b3a2dc3ca05364d10c8e01 Mon Sep 17 00:00:00 2001 From: romchornyi Date: Thu, 12 Nov 2026 00:10:40 +0200 Subject: [PATCH 6/9] fix(dashpay): send the user to the row whose disconnect offers every key left on A disconnect's result named the first row showing any key left on. Those keys can show under several rows (a DashPay profile key under DashPay's), so the result could send the user to a row whose disconnect leaves the app's keys on. The row named now shows every key left on but the profile ones, which every disconnect offers. Closes the review thread on the retry destination (r4543058630); the settlement refactor the review suggested is tracked in #1379. Co-Authored-By: Claude Opus 5.5 SDD-Published-From: d18dd27c453eca937b611e97abdd94c32ee9ad84 --- .../PlatformDashConnectDataSource.swift | 12 +++++--- .../PlatformDashConnectDataSourceTests.swift | 29 +++++++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift index 8b3e01dc1a..49850b0e6a 100644 --- a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift @@ -1063,8 +1063,10 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { /// has, or call a key unchecked that the rows place. After the question /// (`unrecordedKeyIds` set), every offered key still on is left on, /// listed or not: a listed key a failed owner read kept out of the - /// update is on too. `holder`: another app whose row shows some of those - /// keys, so the user can be sent there when the app's own row is gone. + /// update is on too. `holder`: another app whose row shows all those + /// keys but the DashPay profile ones, which every disconnect offers, so + /// the user can be sent there when the app's own row is gone and its + /// disconnect offers every key the result counts. static func settledDisconnect( appId: Data, after: AppConnect.IdentitySnapshot, intents: [AppConnect.ConnectionIntent], unrecordedKeyIds: Set?, owners reader: OwnerReader, at updatedAt: Date @@ -1077,8 +1079,10 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { knownOwners: known) if unrecordedKeyIds != nil { remaining.leftAfterQuestion = remaining.offered.count } let left = unrecordedKeyIds == nil ? [] : remaining.offered - let holder = projection.connections.first { - $0.appId != appId && !left.isDisjoint(with: $0.unrecordedKeyIds[after.identityId] ?? []) + let appKeys = left.subtracting(projection.unrecordedProfileKeyIds[after.identityId] ?? []) + let shown = appKeys.isEmpty ? left : appKeys + let holder = shown.isEmpty ? nil : projection.connections.first { + $0.appId != appId && shown.isSubset(of: $0.unrecordedKeyIds[after.identityId] ?? []) }?.appId return ( { rows($0, after: projection, of: after.identityId, intents: elsewhere, at: updatedAt) }, diff --git a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift index a9bf54e075..413b3e4d35 100644 --- a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift @@ -2136,6 +2136,35 @@ extension AppConnectRefreshOwnersTests { "nil while the app's own row is there") } + /// Keys left on can show under several rows: a DashPay profile key + /// under DashPay's, the app's own under the app of the same owner. The + /// user is sent to the row whose disconnect offers them all, the app's, + /// since every disconnect also offers the profile keys; not to DashPay's, + /// even when it sorts first. + func testKeysLeftUnderSeveralRowsAreReportedUnderTheRowThatOffersThemAll() async { + let store = makeStore(), reader = Reader() + let holderApp = Data(repeating: 0xB1, count: 32) + let dashPay = Data.identifier(fromBase58: AppConnect.dashPayContractId)! + XCTAssertTrue(dashPay.lexicographicallyPrecedes(holderApp), "DashPay's row sorts first") + let own = Self.key(10, on: holderApp), listed = Self.key(20, on: Self.sibling) + let arrived = Self.key(21, on: Self.sibling) + let profile = Self.key(30, on: dashPay, bound: .documentType(contractId: dashPay, name: "profile")) + let intents = [Self.intent(own, app: holderApp)] + reader.failing = [Self.sibling] + let shown = await Self.refresh(store, [own, listed], intents, memory: .init(), reader: reader) + XCTAssertNotNil(shown[Self.sibling], "an unread owner gives Y its own row") + reader.failing = [] + let after = AppConnect.IdentitySnapshot( + identityId: Self.identity, revision: 2, keys: [own, Self.disabled(listed), arrived, profile], platformTime: nil) + let (change, remaining, holder) = await PlatformDashConnectDataSource.settledDisconnect( + appId: Self.sibling, after: after, intents: intents, unrecordedKeyIds: [20], + owners: Self.ownerReader(.init(), reader), at: Date(timeIntervalSince1970: 0)) + XCTAssertEqual(remaining.leftAfterQuestion, 2, "the key and the profile key that arrived after the question stay on") + XCTAssertEqual(holder, holderApp) + let rows = change(store.load()) + XCTAssertFalse(rows.contains { $0.id == Self.sibling.toBase58String() }, "Y's row is gone") + } + /// A key id is unique only within an identity: keys offered on one /// identity are never turned off while another is active, even when it /// has keys with the same ids. Checked before the PIN and after it. From 396768474de13fc5a1a66ef0fb50147dee13512b Mon Sep 17 00:00:00 2001 From: romchornyi Date: Thu, 12 Nov 2026 01:47:18 +0200 Subject: [PATCH 7/9] fix(dashpay): remember contract owners per devnet name and endpoint The process-wide owner memory was keyed by the bare network name, which is "devnet" for every devnet. After a switch between devnets in one run, an owner read on the old one could attribute a key on the new one, and turn it off after the question. Owners are now remembered per persistence scope (which names the devnet) and endpoint, as the connection stores are. Closes the review thread on the owner-cache scope (r4544440023). Co-Authored-By: Claude Opus 5.5 SDD-Published-From: 7447832b2c4c4887ff32204877b2783346cdb4f4 --- .../PlatformDashConnectDataSource.swift | 9 ++++++++- .../PlatformDashConnectDataSourceTests.swift | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift index 49850b0e6a..f53cd1e034 100644 --- a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift @@ -960,11 +960,18 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { private static func ownerReader(context: Context) -> OwnerReader { let sdk = context.sdk return OwnerReader( - network: "\(context.network)", memory: ownerMemory, + network: ownerScope(context.network.persistenceScope, context.stores.endpoint), memory: ownerMemory, readContract: { try await sdk.dataContractGetOffMain(id: $0.toBase58String()) }, readGroup: { try await sdk.getContractGroupInfo(contractGroupId: $0.toBase58String()) }) } + /// The Platform an owner is remembered for: the network's persistence + /// scope, which names a devnet, and the endpoint it is reached at, since + /// devnets of one name at other nodes are other chains. + static func ownerScope(_ persistenceScope: String, _ endpoint: String?) -> String { + "\(persistenceScope) \(endpoint ?? "")" + } + /// The projection of `snapshot` with the owners it needs that are known. /// A key whose owner is unknown keeps its own row. static func projectWithOwners( diff --git a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift index 413b3e4d35..399828fea9 100644 --- a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift @@ -1709,6 +1709,25 @@ final class AppConnectOwnerMemoryTests: XCTestCase { _ = await owners(memory, reads, network: "mainnet") XCTAssertEqual(reads.count(Self.contract), 2) } + + /// "devnet" is not one chain: an owner known on one devnet is read again + /// on a devnet of another name, or of the same name at another endpoint. + func testAnOwnerKnownOnOneDevnetIsReadAgainOnAnotherNameOrEndpoint() async { + let memory = PlatformDashConnectDataSource.OwnerMemory(), reads = Reads() + reads.answer = { _ in ["ownerId": Self.owner.toBase58String()] } + let scope = PlatformDashConnectDataSource.ownerScope + for network in [ + scope("devnet-alpha", "https://alpha.example:1443"), + scope("devnet-beta", "https://alpha.example:1443"), + scope("devnet-alpha", "https://other.example:1443"), + ] { + _ = await owners(memory, reads, network: network) + } + XCTAssertEqual(reads.count(Self.contract), 3) + _ = await owners(memory, reads, network: scope("devnet-alpha", "https://alpha.example:1443")) + XCTAssertEqual(reads.count(Self.contract), 3, "the same devnet at the same endpoint reads no owner again") + XCTAssertEqual(scope("testnet", nil), scope("testnet", nil)) + } } /// A Connections refresh and a disconnect read the owners they need and From 968e24a1650b521b1c6b021955c3bf54312b75e6 Mon Sep 17 00:00:00 2001 From: romchornyi Date: Thu, 12 Nov 2026 11:25:50 +0200 Subject: [PATCH 8/9] fix(dashpay): take the owner scope from the pinned stores; ADR-0032 names the other-device sibling app The owner memory's scope now takes the network and devnet name from the stores the operation is pinned to, as it already took the endpoint, so both halves come from one pin. A stale comment named planned.unplaced, now notChecked. ADR-0032 lists an accepted consequence: a key on the own contract of another app of the same owner, approved only on another device, shows under the one app here with an intent and is offered by its question. Closes the review notes of llbartekll (r4548429832, r4548429835, item 3). Co-Authored-By: Claude Opus 5.5 SDD-Published-From: 1565665ce6e7d614903f5a425bee452e6e767bf5 --- .../PlatformDashConnectDataSource.swift | 15 ++++++++------- .../PlatformDashConnectDataSourceTests.swift | 10 +++++----- ...read-from-platform-into-the-pure-projection.md | 1 + 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift index f53cd1e034..2e2b1e3686 100644 --- a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift @@ -960,16 +960,17 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { private static func ownerReader(context: Context) -> OwnerReader { let sdk = context.sdk return OwnerReader( - network: ownerScope(context.network.persistenceScope, context.stores.endpoint), memory: ownerMemory, + network: ownerScope(context.stores.connections.scopeKey, context.stores.endpoint), memory: ownerMemory, readContract: { try await sdk.dataContractGetOffMain(id: $0.toBase58String()) }, readGroup: { try await sdk.getContractGroupInfo(contractGroupId: $0.toBase58String()) }) } - /// The Platform an owner is remembered for: the network's persistence - /// scope, which names a devnet, and the endpoint it is reached at, since - /// devnets of one name at other nodes are other chains. - static func ownerScope(_ persistenceScope: String, _ endpoint: String?) -> String { - "\(persistenceScope) \(endpoint ?? "")" + /// The Platform an owner is remembered for, both halves from the stores + /// the operation is pinned to: their scope, which names the network (and + /// a devnet by name), and the endpoint it is reached at, since devnets of + /// one name at other nodes are other chains. + static func ownerScope(_ storeScope: String?, _ endpoint: String?) -> String { + "\(storeScope ?? "") \(endpoint ?? "")" } /// The projection of `snapshot` with the owners it needs that are known. @@ -2215,7 +2216,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { : try await identitySnapshot(context: context).snapshot // An intent is done once none of its keys can still be live or land. - // A key whose bound is unknown (`planned.unplaced`) keeps the row, + // A key whose bound is unknown (`planned.notChecked`) keeps the row, // with its Disconnect, through `rows(_:after:of:intents:at:)`. let closedAt = now() updateIntents(in: stores) { intents in diff --git a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift index 399828fea9..608f6060c1 100644 --- a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift @@ -1717,16 +1717,16 @@ final class AppConnectOwnerMemoryTests: XCTestCase { reads.answer = { _ in ["ownerId": Self.owner.toBase58String()] } let scope = PlatformDashConnectDataSource.ownerScope for network in [ - scope("devnet-alpha", "https://alpha.example:1443"), - scope("devnet-beta", "https://alpha.example:1443"), - scope("devnet-alpha", "https://other.example:1443"), + scope("dashconnect.connections.v1.devnet-alpha.ab12", "https://alpha.example:1443"), + scope("dashconnect.connections.v1.devnet-beta.ab12", "https://alpha.example:1443"), + scope("dashconnect.connections.v1.devnet-alpha.ab12", "https://other.example:1443"), ] { _ = await owners(memory, reads, network: network) } XCTAssertEqual(reads.count(Self.contract), 3) - _ = await owners(memory, reads, network: scope("devnet-alpha", "https://alpha.example:1443")) + _ = await owners(memory, reads, network: scope("dashconnect.connections.v1.devnet-alpha.ab12", "https://alpha.example:1443")) XCTAssertEqual(reads.count(Self.contract), 3, "the same devnet at the same endpoint reads no owner again") - XCTAssertEqual(scope("testnet", nil), scope("testnet", nil)) + XCTAssertEqual(scope("dashconnect.connections.v1.testnet.ab12", nil), scope("dashconnect.connections.v1.testnet.ab12", nil)) } } diff --git a/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md index 8c90a21b4d..cce30a9c82 100644 --- a/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md +++ b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md @@ -44,6 +44,7 @@ Since #1301 the wallet links an unrecorded key to an App Connect app only throug **Negative** - The data source needs one more pure step, listing the ids to read, before it can project. - A Connections refresh waits for the owner reads it needs, within the spec §6 budget (≤ 1 s p95 for up to 4 distinct contracts and contract groups). +- A key on the own contract of another app of the same owner, approved only on another device (no intent for that app here), is attributed by owner to the one app here with an intent: it shows under that app's row, not its own, and that app's question offers to turn it off. The wallet cannot tell it from the app's own key on a sibling contract (the AC-03 shape); the user's confirm in the question is the safeguard, and AC-07 covers only two apps with an intent here. **Neutral** - The projection's result grows two counts (could not be checked, cannot attribute to this app alone) that the result alert and the question word separately. From 4ed77041a0e2cbefe5f8c16938310f6db8b332eb Mon Sep 17 00:00:00 2001 From: romchornyi Date: Thu, 12 Nov 2026 11:53:43 +0200 Subject: [PATCH 9/9] fix(dashpay): a key on a contract group with admins is not attributed by owner A contract group's admins may add their own contracts to it, so a key bound to a group with admins may be another developer's app. Such a group is now remembered as administered (read as administered unless the read shows no admins, as for an approval), and the owner rule says the key cannot be attributed to the app alone: it stays on its own row, is not offered, and the result says it may be another app's. ADR-0032 names the case. The owner memory's comment now says it is kept per wallet, network and endpoint. From the security review in the PR's before-merge list; the two deferred points are tracked in #1379 and #1386. Co-Authored-By: Claude Opus 5.5 SDD-Published-From: fb91716692db82aeef2d45db7d75e972bcbb72e9 --- .../DashConnect/AppConnectProjection.swift | 4 +- .../DashConnect/AppConnectV2Login.swift | 4 ++ .../PlatformDashConnectDataSource.swift | 16 ++++-- .../PlatformDashConnectDataSourceTests.swift | 49 +++++++++++++++++-- ...-from-platform-into-the-pure-projection.md | 2 +- 5 files changed, 65 insertions(+), 10 deletions(-) diff --git a/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift b/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift index b74d27cbca..5ec48696d7 100644 --- a/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift +++ b/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift @@ -351,7 +351,8 @@ extension AppConnect { /// that owner or an unknown one. case attributed /// The bound's known owner is the app's, and another app here has it - /// too: whose the key is cannot be told. + /// too, or the bound is a contract group with admins, who may add + /// their own contracts to it: whose the key is cannot be told. case notAttributable /// It may be the app's, but an owner that decides it is unknown. case notChecked @@ -368,6 +369,7 @@ extension AppConnect { ) -> OwnerOutcome { let boundOwner = owners[bound] if boundOwner == systemContractOwnerId { return .notThisApp } + if boundOwner == administeredGroupOwnerId { return .notAttributable } guard let boundOwner, let appOwner = owners[app] else { return .notChecked } guard boundOwner == appOwner else { return .notThisApp } let others = apps.subtracting([app]).map { owners[$0] } diff --git a/DashWallet/Sources/Models/DashConnect/AppConnectV2Login.swift b/DashWallet/Sources/Models/DashConnect/AppConnectV2Login.swift index fa731a3497..a249f25a4b 100644 --- a/DashWallet/Sources/Models/DashConnect/AppConnectV2Login.swift +++ b/DashWallet/Sources/Models/DashConnect/AppConnectV2Login.swift @@ -47,6 +47,10 @@ extension AppConnect { ] /// The owner of every system contract. No identity has this id. static let systemContractOwnerId = Data(count: 32) + /// What a contract group with admins is remembered as owned by: its + /// admins may add their own contracts to it, so no single owner holds + /// what is bound to it. No identity has this id. + static let administeredGroupOwnerId = Data(repeating: 0xFF, count: 32) // MARK: What an approval grants diff --git a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift index 2e2b1e3686..4fac70af07 100644 --- a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift @@ -661,6 +661,15 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { (info["ownerId"] as? String).flatMap(decodeIdentifier) } + /// The owner a key bound to a contract group is attributed by: the + /// group's, unless its admins may add their own contracts to it (read + /// as administered unless the read shows none, as for an approval); + /// then `AppConnect.administeredGroupOwnerId`. + static func groupOwnerForAttribution(_ info: [String: Any]) -> Data? { + guard let owner = groupOwnerId(info) else { return nil } + return (info["adminIds"] as? [Any])?.isEmpty == true ? owner : AppConnect.administeredGroupOwnerId + } + /// The owners of contracts and contract groups, read from Platform and /// remembered in memory, never on disk: Platform never changes an /// owner. A read that fails, finds nothing, or names no readable owner @@ -691,7 +700,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { for id in unknown { group.addTask { if groups.contains(id) { - return (id, (try? await readGroup(id)).flatMap(PlatformDashConnectDataSource.groupOwnerId)) + return (id, (try? await readGroup(id)).flatMap(PlatformDashConnectDataSource.groupOwnerForAttribution)) } return (id, (try? await readContract(id)).flatMap(PlatformDashConnectDataSource.contractOwnerId)) } @@ -955,8 +964,9 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } } - /// Owners from the process-wide memory, the rest read from Platform off - /// the main actor. + /// Owners from the memory every data source shares, kept apart per + /// wallet, network and endpoint (`ownerScope`), the rest read from + /// Platform off the main actor. private static func ownerReader(context: Context) -> OwnerReader { let sdk = context.sdk return OwnerReader( diff --git a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift index 608f6060c1..0417f53062 100644 --- a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift @@ -1667,7 +1667,7 @@ final class AppConnectOwnerMemoryTests: XCTestCase { func testAKnownOwnerIsNeverReadAgain() async { let memory = PlatformDashConnectDataSource.OwnerMemory(), reads = Reads() - reads.answer = { _ in ["ownerId": Self.owner.toBase58String()] } + reads.answer = { _ in ["ownerId": Self.owner.toBase58String(), "adminIds": [Any]()] } let first = await owners(memory, reads, groups: [Self.group]) let second = await owners(memory, reads, groups: [Self.group]) XCTAssertEqual(first, [Self.contract: Self.owner, Self.group: Self.owner]) @@ -1694,7 +1694,7 @@ final class AppConnectOwnerMemoryTests: XCTestCase { reads.answer = failure let unknown = await owners(memory, reads, groups: [Self.group]) XCTAssertEqual(unknown, [:], name) - reads.answer = { _ in ["ownerId": Self.owner.toBase58String()] } + reads.answer = { _ in ["ownerId": Self.owner.toBase58String(), "adminIds": [Any]()] } let known = await owners(memory, reads, groups: [Self.group]) XCTAssertEqual(known, [Self.contract: Self.owner, Self.group: Self.owner], name) XCTAssertEqual(reads.count(Self.contract), 2, name) @@ -1704,7 +1704,7 @@ final class AppConnectOwnerMemoryTests: XCTestCase { func testAnOwnerKnownOnOneNetworkIsReadAgainOnAnother() async { let memory = PlatformDashConnectDataSource.OwnerMemory(), reads = Reads() - reads.answer = { _ in ["ownerId": Self.owner.toBase58String()] } + reads.answer = { _ in ["ownerId": Self.owner.toBase58String(), "adminIds": [Any]()] } _ = await owners(memory, reads, network: "testnet") _ = await owners(memory, reads, network: "mainnet") XCTAssertEqual(reads.count(Self.contract), 2) @@ -1714,7 +1714,7 @@ final class AppConnectOwnerMemoryTests: XCTestCase { /// on a devnet of another name, or of the same name at another endpoint. func testAnOwnerKnownOnOneDevnetIsReadAgainOnAnotherNameOrEndpoint() async { let memory = PlatformDashConnectDataSource.OwnerMemory(), reads = Reads() - reads.answer = { _ in ["ownerId": Self.owner.toBase58String()] } + reads.answer = { _ in ["ownerId": Self.owner.toBase58String(), "adminIds": [Any]()] } let scope = PlatformDashConnectDataSource.ownerScope for network in [ scope("dashconnect.connections.v1.devnet-alpha.ab12", "https://alpha.example:1443"), @@ -1728,6 +1728,27 @@ final class AppConnectOwnerMemoryTests: XCTestCase { XCTAssertEqual(reads.count(Self.contract), 3, "the same devnet at the same endpoint reads no owner again") XCTAssertEqual(scope("dashconnect.connections.v1.testnet.ab12", nil), scope("dashconnect.connections.v1.testnet.ab12", nil)) } + + /// A contract group's admins may add their own contracts to it, so a + /// group with admins, or whose admins the read does not show, has no + /// single owner: it is remembered as administered, not as its owner's. + func testAGroupWithAdminsHasNoSingleOwner() async { + let admin = Data(repeating: 0x0B, count: 32).toBase58String() + for (name, admins, expected) in [ + ("admins", [admin] as [Any]?, AppConnect.administeredGroupOwnerId), + ("admins not shown", nil, AppConnect.administeredGroupOwnerId), + ("no admins", [], Self.owner), + ] { + let memory = PlatformDashConnectDataSource.OwnerMemory(), reads = Reads() + reads.answer = { id in + var info: [String: Any] = ["ownerId": Self.owner.toBase58String()] + if id == Self.group, let admins { info["adminIds"] = admins } + return info + } + let known = await owners(memory, reads, groups: [Self.group]) + XCTAssertEqual(known, [Self.contract: Self.owner, Self.group: expected], name) + } + } } /// A Connections refresh and a disconnect read the owners they need and @@ -1772,6 +1793,8 @@ final class AppConnectRefreshOwnersTests: XCTestCase { var failingOnce: Set = [] /// The owner each id reads as; any other id reads as `owner`. var owners: [Data: Data] = [:] + /// Groups that read with an admin; any other reads with none. + var administered: Set = [] func read(_ id: Data) throws -> [String: Any] { lock.lock() @@ -1779,7 +1802,10 @@ final class AppConnectRefreshOwnersTests: XCTestCase { reads[id, default: 0] += 1 if failing.contains(id) { throw SDKError.timeout("slow") } if failingOnce.remove(id) != nil { throw SDKError.timeout("slow") } - return ["ownerId": (owners[id] ?? AppConnectRefreshOwnersTests.owner).toBase58String()] + return [ + "ownerId": (owners[id] ?? AppConnectRefreshOwnersTests.owner).toBase58String(), + "adminIds": administered.contains(id) ? [Data(repeating: 0x0B, count: 32).toBase58String()] as [Any] : [] as [Any], + ] } var total: Int { @@ -1878,6 +1904,19 @@ final class AppConnectRefreshOwnersTests: XCTestCase { } } + /// A key on a contract group of the app's owner whose admins may add + /// their own contracts to it may be another developer's app: it is not + /// offered or turned off, and the result says it may be another app's. + func testAKeyOnAGroupWithAdminsIsNotAttributedByOwner() async { + let own = Self.key(10, on: Self.app), stray = Self.key(20, on: Self.group, bound: .contractGroup(Self.group)) + let reader = Reader() + reader.administered = [Self.group] + let asked = await Self.planned([own, stray], [Self.intent(own)], listed: nil, memory: .init(), reader: reader) + XCTAssertEqual(asked.offered, []) + XCTAssertEqual(asked.plan.disable, [10]) + XCTAssertEqual([asked.notChecked, asked.notAttributable], [0, 1]) + } + /// AC-04, AC-11, AC-12: the disconnect still turns off the app's keys, /// and reports the key that could not be checked. func testAKeyThatCouldNotBeCheckedStaysOnAndIsReported() async { diff --git a/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md index cce30a9c82..513cd8f1d6 100644 --- a/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md +++ b/docs/adr/0032-pass-owners-read-from-platform-into-the-pure-projection.md @@ -30,7 +30,7 @@ Since #1301 the wallet links an unrecorded key to an App Connect app only throug - One pure helper applies the owner rule, and both `project` (rows and the counts the question shows) and `disconnectPlan` (the keys a disconnect turns off) call it, so they cannot disagree. - For a disconnect of app X, an unrecorded key is considered only while it may be X's: unless the owner of its bound and the owner of X's contract are both known and differ (AC-06: such a key is neither turned off nor counted). An owner equal to `AppConnect.systemContractOwnerId` never matches (AC-09). A key it considers has exactly one outcome: - **attributed to X** — the owner of its bound is known and equals the known owner of X's contract, and the owner of every other App Connect app with a connection intent on the identity is known and differs. The key joins X's row and its disconnect (AC-01..AC-03). - - **cannot attribute to X alone** — the owner of its bound is known and equals the known owner of X's contract, and another App Connect app with an intent on the identity has that same known owner. The key stays on its separate row, and the result says so without suggesting a retry (AC-07). + - **cannot attribute to X alone** — the owner of its bound is known and equals the known owner of X's contract, and another App Connect app with an intent on the identity has that same known owner, or its bound is a contract group with admins (or whose admins the read does not show), since an admin may add their own contracts to the group. The key stays on its separate row, and the result says so without suggesting a retry (AC-07). - **could not be checked** — every other case in which it may be X's: the owner of its bound is unknown (AC-04, AC-05), the owner of X's contract is unknown, or the owner matches X while the owner of another app with an intent is unknown (AC-12). The key stays on its separate row and the result does not report that X has no access left. - On Connections, an unrecorded key shows in an app's row only when it is attributed to that app; otherwise it stays on its separate row (CONTEXT invariant: never hidden). - ADR-0031's clause that a live key whose bound the store cannot read stops the whole disconnect no longer describes the code of #1301; it is amended in ADR-0031 itself on #1301, and an unplaced key counts as "could not be checked" here (AC-11).