diff --git a/DashWallet.xcodeproj/project.pbxproj b/DashWallet.xcodeproj/project.pbxproj index bb15421d50..afc0c84571 100644 --- a/DashWallet.xcodeproj/project.pbxproj +++ b/DashWallet.xcodeproj/project.pbxproj @@ -1165,10 +1165,10 @@ AA0031032FD0000000000013 /* IconName+DashIconSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA0031012FD0000000000011 /* IconName+DashIconSource.swift */; }; AA00F1012FF0A10000A1B402 /* ExchangeAddressLookupContextTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA00F1002FF0A10000A1B402 /* ExchangeAddressLookupContextTests.swift */; }; AA03A0012FF3000000000001 /* KeyExchangeCryptoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA03A0032FF3000000000003 /* KeyExchangeCryptoTests.swift */; }; - AA03A0022FF3000000000002 /* LoginKeyDerivationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA03A0042FF3000000000004 /* LoginKeyDerivationTests.swift */; }; AA04A0012FF4000000000001 /* DashConnectDataSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA04A0032FF4000000000003 /* DashConnectDataSourceTests.swift */; }; AA05A0012FF5000000000001 /* DashConnectStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA05A0032FF5000000000003 /* DashConnectStoreTests.swift */; }; AA06A0112FF6000000000011 /* AppConnectV2LoginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA06A0132FF6000000000013 /* AppConnectV2LoginTests.swift */; }; + AA06A0F12FF60000000000F1 /* AppConnectProjectionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA06A0F32FF60000000000F3 /* AppConnectProjectionTests.swift */; }; AA06A0212FF6000000000021 /* AppConnectEncryptionRotationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA06A0232FF6000000000023 /* AppConnectEncryptionRotationTests.swift */; }; AA06A0012FF6000000000001 /* PlatformDashConnectDataSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA06A0032FF6000000000003 /* PlatformDashConnectDataSourceTests.swift */; }; AA22BB33CC44DD55EE66FF78 /* BuyReceiveFlowUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA22BB33CC44DD55EE66FF77 /* BuyReceiveFlowUITests.swift */; }; @@ -3297,10 +3297,10 @@ AA0031012FD0000000000011 /* IconName+DashIconSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "IconName+DashIconSource.swift"; sourceTree = ""; }; AA00F1002FF0A10000A1B402 /* ExchangeAddressLookupContextTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExchangeAddressLookupContextTests.swift; sourceTree = ""; }; AA03A0032FF3000000000003 /* KeyExchangeCryptoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = KeyExchangeCryptoTests.swift; path = DashConnect/KeyExchangeCryptoTests.swift; sourceTree = ""; }; - AA03A0042FF3000000000004 /* LoginKeyDerivationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LoginKeyDerivationTests.swift; path = DashConnect/LoginKeyDerivationTests.swift; sourceTree = ""; }; AA04A0032FF4000000000003 /* DashConnectDataSourceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DashConnectDataSourceTests.swift; path = DashConnect/DashConnectDataSourceTests.swift; sourceTree = ""; }; AA05A0032FF5000000000003 /* DashConnectStoreTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DashConnectStoreTests.swift; path = DashConnect/DashConnectStoreTests.swift; sourceTree = ""; }; AA06A0132FF6000000000013 /* AppConnectV2LoginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppConnectV2LoginTests.swift; path = DashConnect/AppConnectV2LoginTests.swift; sourceTree = ""; }; + AA06A0F32FF60000000000F3 /* AppConnectProjectionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppConnectProjectionTests.swift; path = DashConnect/AppConnectProjectionTests.swift; sourceTree = ""; }; AA06A0232FF6000000000023 /* AppConnectEncryptionRotationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppConnectEncryptionRotationTests.swift; path = DashConnect/AppConnectEncryptionRotationTests.swift; sourceTree = ""; }; AA06A0032FF6000000000003 /* PlatformDashConnectDataSourceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PlatformDashConnectDataSourceTests.swift; path = DashConnect/PlatformDashConnectDataSourceTests.swift; sourceTree = ""; }; AA22BB33CC44DD55EE66FF77 /* BuyReceiveFlowUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuyReceiveFlowUITests.swift; sourceTree = ""; }; @@ -7363,10 +7363,10 @@ 2A7CAFFF191922CBF6075212 /* DashConnectUriTests.swift */, 7C172F43568AE0A5AFDB5349 /* Secp256k1Tests.swift */, AA03A0032FF3000000000003 /* KeyExchangeCryptoTests.swift */, - AA03A0042FF3000000000004 /* LoginKeyDerivationTests.swift */, AA04A0032FF4000000000003 /* DashConnectDataSourceTests.swift */, AA05A0032FF5000000000003 /* DashConnectStoreTests.swift */, AA06A0132FF6000000000013 /* AppConnectV2LoginTests.swift */, + AA06A0F32FF60000000000F3 /* AppConnectProjectionTests.swift */, AA06A0232FF6000000000023 /* AppConnectEncryptionRotationTests.swift */, AA06A0032FF6000000000003 /* PlatformDashConnectDataSourceTests.swift */, 47976E492987772700612988 /* AmountObjectTests.swift */, @@ -10688,10 +10688,10 @@ 0438F3D117619B14594F95E6 /* DashConnectUriTests.swift in Sources */, 8D66A1B0E97F5B50411765B4 /* Secp256k1Tests.swift in Sources */, AA03A0012FF3000000000001 /* KeyExchangeCryptoTests.swift in Sources */, - AA03A0022FF3000000000002 /* LoginKeyDerivationTests.swift in Sources */, AA04A0012FF4000000000001 /* DashConnectDataSourceTests.swift in Sources */, AA05A0012FF5000000000001 /* DashConnectStoreTests.swift in Sources */, AA06A0112FF6000000000011 /* AppConnectV2LoginTests.swift in Sources */, + AA06A0F12FF60000000000F1 /* AppConnectProjectionTests.swift in Sources */, AA06A0212FF6000000000021 /* AppConnectEncryptionRotationTests.swift in Sources */, AA06A0012FF6000000000001 /* PlatformDashConnectDataSourceTests.swift in Sources */, 47976E4A2987772700612988 /* AmountObjectTests.swift in Sources */, diff --git a/DashWallet/Sources/Infrastructure/SwiftDashSDK/DevnetConfiguration.swift b/DashWallet/Sources/Infrastructure/SwiftDashSDK/DevnetConfiguration.swift index 6e61615a8b..1c9a925b10 100644 --- a/DashWallet/Sources/Infrastructure/SwiftDashSDK/DevnetConfiguration.swift +++ b/DashWallet/Sources/Infrastructure/SwiftDashSDK/DevnetConfiguration.swift @@ -22,8 +22,8 @@ import SwiftDashSDK /// The user-editable devnet coordinates, over UserDefaults. /// -/// Two of the keys are READ DIRECTLY BY SwiftDashSDK and must keep their -/// exact names: +/// Both keys are READ DIRECTLY BY SwiftDashSDK and must keep their exact +/// names: /// - `platformQuorumURL` — `SDK.init(network: .devnet, …)` reads it and /// auto-discovers DAPI addresses from `{quorumURL}/masternodes`. Without /// it, devnet SDK creation fails. @@ -31,17 +31,12 @@ import SwiftDashSDK /// passes it into `PlatformSpvStartConfig.devnetName` so the SPV user /// agent embeds `devnet.devnet-` (Core devnet peers drop the /// handshake without it). -/// The third key is app-owned: the DashConnect `loginKeyResponse` contract -/// id on devnet (the contract is registered separately per devnet, so its id -/// differs from the pinned testnet one). /// /// Values are trimmed on read; empty-after-trim counts as unset. The quorum /// URL and devnet name are seeded with the current team devnet /// (`devnet-moutai`) through the registration domain, so a fresh install can /// select Devnet without typing anything — a user-saved value (including an -/// explicitly emptied one, stored as `""`) always wins over the seed. The -/// DashConnect contract id deliberately has NO default: it is unknown for -/// moutai, and an absent value must surface as a normal error, never a guess. +/// explicitly emptied one, stored as `""`) always wins over the seed. /// /// NOTE: the SDK's own built-in devnet quorum template /// (`https://quorums.devnet..networks.dash.org`) does not match real @@ -53,8 +48,6 @@ enum DevnetConfiguration { static let quorumURLKey = "platformQuorumURL" /// Same key the SwiftDashSDK sample app uses — do not rename. static let devnetNameKey = "platformDevnetName" - /// App-owned: base58 id of the devnet `loginKeyResponse` contract. - static let dashConnectContractIdKey = "devnetDashConnectLoginContractId" /// devnet-moutai, verified reachable 2026-09-01 (13 enabled masternodes, /// Core P2P on :20001, DAPI on :1443). @@ -121,14 +114,6 @@ enum DevnetConfiguration { return nil } - /// The devnet DashConnect `loginKeyResponse` contract id (base58), or nil - /// when unset/blank. Stored as entered; validity (32-byte identifier) is - /// the consumer's check so a typo surfaces as an error there, not a crash. - static var dashConnectContractId: String? { - ensureDefaultsRegistered() - return normalized(UserDefaults.standard.string(forKey: dashConnectContractIdKey)) - } - /// Writers store the raw (trimmed) text — including the empty string, so /// clearing a field genuinely unsets it instead of resurfacing the /// registered default. @@ -142,14 +127,7 @@ enum DevnetConfiguration { UserDefaults.standard.set(value.trimmingCharacters(in: .whitespacesAndNewlines), forKey: devnetNameKey) } - static func setDashConnectContractId(_ value: String) { - ensureDefaultsRegistered() - UserDefaults.standard.set(value.trimmingCharacters(in: .whitespacesAndNewlines), forKey: dashConnectContractIdKey) - } - /// Whether devnet can start: quorum URL AND devnet name are both present. - /// The DashConnect contract id is deliberately not part of this — it only - /// gates DashConnect approvals, not the network itself. static var isConfigured: Bool { quorumURL != nil && devnetName != nil } diff --git a/DashWallet/Sources/Models/DashConnect/AppConnectLogin.swift b/DashWallet/Sources/Models/DashConnect/AppConnectLogin.swift index 6e6741912e..fd3228eeab 100644 --- a/DashWallet/Sources/Models/DashConnect/AppConnectLogin.swift +++ b/DashWallet/Sources/Models/DashConnect/AppConnectLogin.swift @@ -3,18 +3,18 @@ import Foundation import os import SwiftDashSDK -/// The one-QR login (DashConnect v2): the wallet derives a session key for -/// the request, registers it on the identity, and only then publishes the -/// encrypted key to the App Connect system contract. There is no `dash-st:` +/// App Connect (DashConnect from protocol version 14): the wallet registers +/// the keys a request asks for on the identity, then publishes them, +/// encrypted, to the App Connect system contract. There is no `dash-st:` /// step. /// /// `AppConnect` holds the rules and is pure; `PlatformDashConnectDataSource` -/// owns the Platform calls and their order. The grant records and their -/// `UserDefaults` store are at the end of the file. +/// owns the Platform calls and their order. The intent store is at the end +/// of the file; the v2 rules are in `AppConnectV2Login.swift` and the +/// projection in `AppConnectProjection.swift`. enum AppConnect { /// The protocol version that registers the App Connect system contract. - /// Below it the contract does not exist and the two-QR login is the only - /// one that can work. + /// Below it the contract does not exist and no login can work. static let minimumProtocolVersion: UInt32 = 14 /// Same id on every network (`docs/protocol/app-connect.md` in @@ -22,28 +22,6 @@ enum AppConnect { static let contractId = "H8F9mP1BM55TE1ShsxPZHzhyinaMdY9bMmP85mkDhcJJ" static let documentType = PlatformDashConnectDataSource.loginKeyExchangeDocumentType - /// Limits put on every session key. - /// TODO(app-connect-limits): the protocol leaves both values to the - /// wallet and nothing has fixed them yet; they are not user-selectable. - static let sessionKeyBudgetCredits: UInt64 = 5_000_000_000 // 0.05 DASH - static let sessionKeyLifetime: TimeInterval = 90 * 24 * 60 * 60 - - /// What a one-QR approval gives the app: how many of the identity's - /// credits its key may spend and for how long the key works. The approval - /// sheet shows these values and the key is registered with them. - struct SessionKeyTerms: Equatable { - let budgetCredits: UInt64 - let lifetime: TimeInterval - - static let current = SessionKeyTerms( - budgetCredits: sessionKeyBudgetCredits, - lifetime: sessionKeyLifetime) - - func expiresAt(from now: Date) -> UInt64 { - UInt64((now.addingTimeInterval(lifetime).timeIntervalSince1970 * 1000).rounded()) - } - } - static func isAvailable(protocolVersion: UInt32) -> Bool { protocolVersion >= minimumProtocolVersion } @@ -54,21 +32,12 @@ enum AppConnect { /// The network did not say which login it takes, so what approving /// would give the app is unknown and there is nothing to approve. case unresolved - /// Registers no key at approval. - case twoQR - /// Registers a session key with these terms. - case oneQR(SessionKeyTerms) /// An App Connect request v2: registers the keys of this plan. case appConnect(GrantPlan) /// An App Connect request v2 the wallet will not answer; there is /// nothing to approve. case refused(Refusal) - var sessionKeyTerms: SessionKeyTerms? { - if case .oneQR(let terms) = self { return terms } - return nil - } - var grantPlan: GrantPlan? { if case .appConnect(let plan) = self { return plan } return nil @@ -77,182 +46,37 @@ enum AppConnect { /// Whether the sheet has something to approve. var isApprovable: Bool { switch self { - case .twoQR, .oneQR, .appConnect: return true + case .appConnect: return true case .unresolved, .refused: return false } } } - /// The login a network at `protocolVersion` gets. - static func login(protocolVersion: UInt32) -> Login { - isAvailable(protocolVersion: protocolVersion) ? .oneQR(.current) : .twoQR - } - - /// The DIP-13 leaf of the session key: `hash256` of the app's ephemeral - /// public key. Not the lookup key of the response, which is `hash160` of - /// the same bytes. - static func requestId(appEphemeralPubKey: Data) -> Data { - Data(SHA256.hash(data: Data(SHA256.hash(data: appEphemeralPubKey)))) - } - - /// What the identity already holds for a derived session key. - enum SessionKeyState: Equatable { - /// Not on the identity: register it. - case absent - /// Registered, able to sign, and shown to be this app's key within - /// the approved terms: publish without an identity update. - case usable(keyId: UInt32) - /// Registered but disabled or expired, or not shown to be this app's - /// key within the approved terms. Platform never re-adds a key, so - /// this request cannot be answered; the app has to ask again. - case unusable - } - - /// How far the device clock may have moved back since a key was - /// registered before that key's expiry counts as later than the terms - /// allow. Without it a clock correction between two tries of one request - /// would turn the wallet's own key away. - static let clockTolerance: TimeInterval = 60 * 60 - - /// The session key is derived from the identity and the request's - /// ephemeral key, not from the app's contract, so a request that repeats - /// another app's ephemeral key derives that app's key. A registered key - /// is therefore reused only when it is bound to `appContractId` and - /// carries limits no wider than `terms`. - /// - /// The fetched key list carries no bounds. The bound is read from - /// `bindings`; a key the store cannot place counts as this app's only - /// when `grantedKeyIds` holds it — the keys this wallet recorded giving - /// this app for this request. - static func sessionKeyState( - publicKeyHash160: Data, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - appContractId: Data, - bindings: [KeyBinding], - grantedKeyIds: Set, - terms: SessionKeyTerms, - now: Date - ) -> SessionKeyState { - guard let key = currentIdentityPublicKeys.first(where: { - $0.keyType == .ecdsaHash160 && $0.data == publicKeyHash160 - }) else { - return .absent - } - let nowMilliseconds = Int64((now.timeIntervalSince1970 * 1000).rounded()) - guard key.purpose == .authentication, - key.securityLevel == .high, - key.disabledAt == nil, - let totalBudget = key.totalBudget, - totalBudget <= terms.budgetCredits, - let expiresAt = key.expiresAt, - expiresAt > nowMilliseconds, - UInt64(expiresAt) <= terms.expiresAt(from: now.addingTimeInterval(clockTolerance)) else { - return .unusable - } - let keyId = UInt32(bitPattern: key.keyId) - let stored = bindings.first { $0.keyId == keyId && $0.data == key.data && !$0.hasUnreadableBound } - guard stored.map({ $0.singleContractId == appContractId }) ?? grantedKeyIds.contains(keyId) else { - return .unusable - } - return .usable(keyId: keyId) - } - - /// `count` ids that no key of the identity has, for one update that - /// adds `count` keys: above the highest id while they fit, then the - /// lowest gaps. Nil when the identity cannot take that many. - static func freeKeyIds( - count: Int, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> [UInt32]? { - let taken = Set(currentIdentityPublicKeys.map { UInt32(bitPattern: $0.keyId) }) - let highest = taken.max() - var ids: [UInt32] = [] - var next = highest.map { $0 == .max ? nil : $0 + 1 } ?? 0 - while ids.count < count, let id = next { - ids.append(id) - next = id == .max ? nil : id + 1 - } - // The identity holds far fewer keys than there are ids, so this - // stops within a few steps of the lowest gaps. - var gap: UInt32 = 0 - while ids.count < count { - if !taken.contains(gap) && !ids.contains(gap) { ids.append(gap) } - guard gap < .max else { return nil } - gap += 1 - } - return ids - } - - /// The id for a new key: one above the highest on the identity, disabled - /// keys included. Platform only refuses an id the identity already has, - /// so when the highest is the last id a key can have (a key an app - /// registered can be given it) the lowest id no key has is taken - /// instead. `nil` only when every id is taken. - static func nextKeyId( - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> UInt32? { - let taken = Set(currentIdentityPublicKeys.map { UInt32(bitPattern: $0.keyId) }) - let highest = taken.max() ?? 0 - guard highest == .max else { return highest + 1 } - // The identity holds far fewer keys than there are ids, so this - // stops within a few steps of the lowest gap. - return (0 ... UInt32.max).first { !taken.contains($0) } - } - - /// The key an app is given: it can only sign for the contract the request - /// named, spend up to `totalBudget`, and stops working at `expiresAt`. - static func sessionIdentityPubkey( - keyId: UInt32, - publicKeyHash160: Data, - appContractId: Data, - totalBudget: UInt64, - expiresAt: UInt64 - ) -> ManagedPlatformWallet.IdentityPubkey { - ManagedPlatformWallet.IdentityPubkey( - keyId: keyId, - keyType: .ecdsaHash160, - purpose: .authentication, - securityLevel: .high, - pubkeyBytes: publicKeyHash160, - contractBounds: .singleContract(id: appContractId), - totalBudget: totalBudget, - expiresAt: expiresAt - ) - } + /// The answer to a `dash-key:` v1 request: only a v2 request says what + /// it asks for, and the wallet answers no other. + static var v1Refusal: Refusal { Refusal(.unsupported, NSLocalizedString( + "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code.", + comment: "DashConnect App Connect v1")) } /// What the wallet's store of identity keys says about one key: its /// payload, whether it is disabled there, and the contract it is bound to /// when the bound is a whole single contract. The fetched key list - /// carries no bounds, so for a key without a grant record this is where - /// its app is read from. + /// carries no bounds, so this is where a key's bound is read from. struct KeyBinding: Equatable { let keyId: UInt32 let data: Data let singleContractId: Data? var isDisabled = false - /// The stored key has the type, purpose, level and limits of a key - /// this login registers. - var isSessionKeyShaped = false /// The store has a bound for the key that this build cannot read, so /// the key's app is unknown rather than "another one". var hasUnreadableBound = false - /// The stored key has the type, purpose and level of the two-QR - /// login's authentication key, or of its encryption key. - var isTwoQRAuthenticationKeyShaped = false - var isTwoQREncryptionKeyShaped = false /// The key's bound as the store holds it; nil for a key with no /// bound, or one this build cannot read (`hasUnreadableBound`). var bound: StoredBound? = nil - /// The stored key has the shape of an App Connect v2 auth key: - /// HASH160 authentication at HIGH or CRITICAL, with an expiry. - var isV2AuthKeyShaped = false - /// When the stored key stops working, in milliseconds since 1970; - /// nil for a key with no expiry. - var expiresAt: Int64? = nil } /// A key's contract bound, as the wallet's store records it. - enum StoredBound: Equatable { + enum StoredBound: Codable, Equatable { case singleContract(Data) case documentType(contractId: Data, name: String) case contractGroup(Data) @@ -272,27 +96,6 @@ enum AppConnect { } } - /// Whether the store shows either key of the two-QR login, not disabled, - /// in the kind that login registers it. A two-QR login leaves no grant - /// record, so on an identity that is not the active one this is how its - /// keys are recognised. - static func holdsLiveTwoQRLoginKey( - authenticationPublicKeyHash160: Data, - encryptionPublicKey: Data, - bindings: [KeyBinding] - ) -> Bool { - bindings.contains { - !$0.isDisabled - && (($0.isTwoQRAuthenticationKeyShaped && $0.data == authenticationPublicKeyHash160) - || ($0.isTwoQREncryptionKeyShaped && $0.data == encryptionPublicKey)) - } - } - - /// Whether the store shows a live session key bound to `appContractId`. - static func holdsLiveSessionKey(appContractId: Data, bindings: [KeyBinding]) -> Bool { - bindings.contains { $0.singleContractId == appContractId && !$0.isDisabled && $0.isSessionKeyShaped } - } - /// The most keys one identity update may disable (Platform consensus). static let maxKeysDisabledPerUpdate = 10 @@ -315,183 +118,6 @@ enum AppConnect { return id } - /// A live key in a shape App Connect registers for an app: HASH160 - /// authentication at HIGH (a v1 session key, most v2 keys) or CRITICAL - /// (a v2 contract-group key). - static func isLiveAppConnectAuthKey(_ key: ManagedIdentity.IdentityPublicKeyInfo) -> Bool { - key.keyType == .ecdsaHash160 && key.purpose == .authentication - && (key.securityLevel == .high || key.securityLevel == .critical) && key.disabledAt == nil - } - - private static func isLiveSessionKey(_ key: ManagedIdentity.IdentityPublicKeyInfo) -> Bool { - key.keyType == .ecdsaHash160 - && key.purpose == .authentication - && key.securityLevel == .high - && key.disabledAt == nil - } - - /// The keys a disconnect has to disable: the live ones behind `grants`, - /// plus every live key of the same kind that `bindings` shows bound to - /// `appContractId` and that carries a budget and an expiry, as every key - /// this login registers does. That covers the keys a reinstalled wallet - /// has no grant record for. A key that is gone, already disabled, or of - /// another shape is left alone, including one another wallet gave the - /// app with a document-type bound, a single limit or another key type. - /// A key without a grant record whose payload is - /// `twoQRAuthenticationKeyHash160` is left alone as well: the two-QR - /// login's authentication key has the same kind and bound, and a - /// `dash-st:` registration may have put limits on it. The caller passes - /// it when that key is to stay. - static func sessionKeyIdsToDisable( - for grants: [AppConnectGrant], - appContractId: Data, - bindings: [KeyBinding], - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - twoQRAuthenticationKeyHash160: Data? = nil - ) -> [UInt32] { - let granted = Set(grants.flatMap(\.keyIds)) - let grantedByV2 = Set(grants.filter { $0.additionalKeyIds != nil || $0.connectionId != nil }.flatMap(\.keyIds)) - return currentIdentityPublicKeys - .filter { key in - let keyId = UInt32(bitPattern: key.keyId) - // A recorded id is disabled only while the key under it has - // the shape the grant registered: the id of a registration - // that never landed may belong to another key since. A v1 - // session key is HIGH; a v2 grant's keys may also be a - // CRITICAL group key, which the store has to show bound to a - // group. - if granted.contains(keyId) { - if isLiveSessionKey(key) { return true } - guard grantedByV2.contains(keyId), isLiveAppConnectAuthKey(key), - key.securityLevel == .critical else { return false } - return bindings.contains { - guard $0.keyId == keyId, $0.data == key.data, case .contractGroup = $0.bound else { return false } - return true - } - } - guard isLiveSessionKey(key) else { return false } - guard key.totalBudget != nil, key.expiresAt != nil, - key.data != twoQRAuthenticationKeyHash160 else { return false } - return bindings.contains { - $0.keyId == keyId && $0.data == key.data && $0.singleContractId == appContractId - } - } - .map { UInt32(bitPattern: $0.keyId) } - .sorted() - } - - /// Live keys in a shape App Connect registers (`isLiveAppConnectAuthKey`) - /// whose bound is unknown: not behind `grants`, and either absent from - /// `bindings` or stored with a bound that cannot be read. Any of them - /// could belong to the app being disconnected, so a disconnect must stop - /// on these instead of reporting every key as turned off. - static func sessionKeyIdsWithUnknownBinding( - for grants: [AppConnectGrant], - bindings: [KeyBinding], - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> [UInt32] { - let granted = Set(grants.flatMap(\.keyIds)) - return currentIdentityPublicKeys - .filter { key in - guard isLiveAppConnectAuthKey(key) else { return false } - let keyId = UInt32(bitPattern: key.keyId) - return !granted.contains(keyId) && !bindings.contains { - $0.keyId == keyId && $0.data == key.data && !$0.hasUnreadableBound - } - } - .map { UInt32(bitPattern: $0.keyId) } - .sorted() - } - - /// Keys the store holds as live and bound to `appContractId` that the - /// given view of the identity does not contain. As with a missing granted - /// key, the view is out of date and a disconnect must stop. - static func boundKeyIdsMissing( - from currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - appContractId: Data, - bindings: [KeyBinding] - ) -> [UInt32] { - let known = Set(currentIdentityPublicKeys.map { UInt32(bitPattern: $0.keyId) }) - return bindings - .filter { $0.singleContractId == appContractId && !$0.isDisabled && !known.contains($0.keyId) } - .map(\.keyId) - .sorted() - } - - /// Whether the identity holds, live, the key a record names. For an - /// unconfirmed record that is the key it was going to register, with - /// everything that key was given: the data, the kind, the limits, and the - /// bound to the record's app as the wallet's store reads it. A bound the - /// store does not show is not taken on trust. - static func holdsRecordedKey( - _ grant: AppConnectGrant, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - bindings: [KeyBinding] - ) -> Bool { - guard let hash = grant.unconfirmedKeyHash160 else { - // A confirmed record: any of its keys (a v2 grant has several). - return currentIdentityPublicKeys.contains { - grant.keyIds.contains(UInt32(bitPattern: $0.keyId)) && $0.disabledAt == nil - } - } - return currentIdentityPublicKeys.contains { key in - guard UInt32(bitPattern: key.keyId) == grant.sessionKeyId, key.disabledAt == nil else { return false } - guard let appContractId = Data.identifier(fromBase58: grant.appContractId) else { return false } - return key.keyType == .ecdsaHash160 && key.data.toHexString() == hash - && key.purpose == .authentication && key.securityLevel == .high - && key.totalBudget == grant.totalBudget - && key.expiresAt.map({ UInt64(max(0, $0)) }) == grant.expiresAt - && bindings.contains { - $0.keyId == grant.sessionKeyId && $0.data == key.data && !$0.hasUnreadableBound - && $0.singleContractId == appContractId - } - } - } - - /// Confirms the unconfirmed records of `identityId` whose key the - /// identity now holds, and returns them. A record whose key is not there - /// stays as it is: the update may still land, and nothing is taken from - /// a view that may be behind. - static func confirmRegistrations( - in grants: inout [AppConnectGrant], - identityId: String, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - bindings: [KeyBinding] - ) -> [AppConnectGrant] { - var confirmed: [AppConnectGrant] = [] - for index in grants.indices - where grants[index].identityId == identityId && grants[index].isUnconfirmed - && holdsRecordedKey( - grants[index], currentIdentityPublicKeys: currentIdentityPublicKeys, bindings: bindings) { - grants[index].unconfirmedKeyHash160 = nil - confirmed.append(grants[index]) - } - return confirmed - } - - /// Granted session keys the given view of the identity does not contain. - /// Platform never removes a key, it only disables it, so a missing id - /// means the view is out of date — not that the key is gone. A disconnect - /// must stop on these instead of treating them as dealt with. - static func sessionKeyIdsMissing( - from currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - for grants: [AppConnectGrant] - ) -> [UInt32] { - let known = Set(currentIdentityPublicKeys.map { UInt32(bitPattern: $0.keyId) }) - return Set(grants.flatMap(\.keyIds)).subtracting(known).sorted() - } - - /// What a disconnect leaves of the matching records once their keys are - /// disabled. A record whose response is known to be gone is done; the - /// rest stay, marked, until their response is deleted, or found if its - /// publish never confirmed. - static func markKeysDisabled(in grants: inout [AppConnectGrant], where matches: (AppConnectGrant) -> Bool) { - grants.removeAll { matches($0) && $0.responseDeleted == true } - for index in grants.indices where matches(grants[index]) { - grants[index].keyDisabled = true - } - } - /// The query for one identity's response to one request, in the order of /// the contract's only index. A byte-array value travels as base64. static func responseLookupWhereClause(appEphemeralPubKeyHash: Data, ownerIdentityId: Data) -> String { @@ -561,14 +187,6 @@ enum AppConnect { self.encryptedPayload = encryptedPayload } - init(_ sealed: SealedKey) { - self.init( - appEphemeralPubKeyHash: sealed.appEphemeralPubKeyHash.toHexString(), - walletEphemeralPubKey: sealed.walletEphemeralPublicKey.toHexString(), - encryptedPayload: sealed.encryptedPayload.toHexString() - ) - } - /// The document's properties in the form `createDocument` and /// delete-by-values take. func propertiesJSON() throws -> String { @@ -583,137 +201,6 @@ enum AppConnect { } } - /// A 32-byte key encrypted to an app's ephemeral key, with what the app - /// needs to find and open it. Shared by both logins: the two-QR response - /// carries the login key, the one-QR response the session private key. - struct SealedKey: Equatable { - let appEphemeralPubKeyHash: Data - let walletEphemeralPublicKey: Data - let encryptedPayload: Data - } - - /// Encrypts `key` to the app. `walletEphemeralPrivateKey` is wiped before - /// returning. - static func seal( - _ key: Data, - appEphemeralPubKey: Data, - walletEphemeralPrivateKey: inout Data, - encrypt: (Data, Data, Data) throws -> Data = { key, walletPriv, appPub in - try KeyExchangeCrypto.encryptLoginKey( - key, - walletEphemeralPriv: walletPriv, - appEphemeralPub: appPub - ) - } - ) throws -> SealedKey { - defer { PlatformDashConnectDataSource.zero(&walletEphemeralPrivateKey) } - - let appEphemeralPubKeyHash = try KeyExchangeCrypto.hash160(appEphemeralPubKey) - guard appEphemeralPubKeyHash.count == 20 else { - throw DashConnectPlatformError.invalidHash160 - } - let walletEphemeralPublicKey = try Secp256k1.compressedPublicKey(privateKey: walletEphemeralPrivateKey) - let encryptedPayload = try encrypt(key, walletEphemeralPrivateKey, appEphemeralPubKey) - - return SealedKey( - appEphemeralPubKeyHash: appEphemeralPubKeyHash, - walletEphemeralPublicKey: walletEphemeralPublicKey, - encryptedPayload: encryptedPayload - ) - } -} - -/// A session key this wallet registered for an app, and the response that -/// carried it. Kept until the key is disabled and the response is gone. -/// -/// The response type is index-only on Platform: there is no lookup by app and -/// a delete has to carry the original values, so this record is the only way -/// back to the entry. It also names the key; without it a disconnect finds -/// the key by its contract bound, and the entry not at all. -struct AppConnectGrant: Codable, Equatable { - /// Base58 ids. - let identityId: String - let appContractId: String - /// `nil` until Platform confirmed the response: the grant is recorded - /// before publishing, so a publish whose outcome is unknown still leaves - /// a key that can be disabled. - var documentId: String? - /// Replaced only by values read back from Platform. - var values: AppConnect.ResponseValues - let sessionKeyId: UInt32 - /// The limits the key was registered with; `nil` for one without. - let totalBudget: UInt64? - let expiresAt: UInt64? - let publishedAt: Date - /// Set once the response is known to be gone from Platform while the key - /// stays live: deleted by a later login to the same app, or never there - /// after a publish that did not land. Absent means not known to be gone. - var responseDeleted: Bool? - /// Set once a disconnect disabled the key while its response could not - /// be deleted, or could not be shown to be absent; the record then only - /// waits for that. - var keyDisabled: Bool? - /// App Connect v2: the grant's other auth keys, in request order after - /// `sessionKeyId` (the primary binding's key). The identity's encryption - /// key for the app is shared by every device and is not part of a grant. - var additionalKeyIds: [UInt32]? = nil - /// App Connect v2: the request's `CONNECTION_ID` (hex). A later login - /// with the same one replaces this grant's keys. - var connectionId: String? = nil - /// App Connect v2: the ids of the identity's encryption keys the - /// response carries, in slot order. A retry sends the recorded response - /// only while it would carry the same ones. - var encryptionKeyIds: [UInt32]? = nil - - /// Every auth key of the grant. - var keyIds: [UInt32] { - [sessionKeyId] + (additionalKeyIds ?? []) - } - - /// The hex hash160 of the session key, set from just before its - /// registration is submitted until the key is seen on the identity. - /// While set, the key may be there or not: an update can land without - /// confirming. Such a record has no row and no response; it is kept so - /// the key, if it lands, is found and confirmed, until a disconnect - /// finds that the update can no longer land. - var unconfirmedKeyHash160: String? = nil - /// The identity revision the registration's update was submitted with, - /// set with `unconfirmedKeyHash160`. Platform takes an identity update - /// only at one above the identity's revision, so once the identity is at - /// this revision or past it without the key live, the update can never - /// land. - /// `nil` on a record from a build that did not note it. - var submittedRevision: UInt64? = nil - - var isUnconfirmed: Bool { unconfirmedKeyHash160 != nil } - - /// What makes two records the same grant: one session key given for one - /// request. Records are matched on this, never on whole-value equality — - /// `publishedAt` does not survive the store's millisecond round trip bit - /// for bit. - var key: String { - [identityId, appContractId, String(sessionKeyId), values.appEphemeralPubKeyHash].joined(separator: "|") - } - - /// Call before a publish is submitted. Until Platform confirms it, the - /// response may be there or not, whatever the record said before: a - /// response an earlier login deleted is published again when its request - /// comes back. - mutating func markPublishStarted() { - documentId = nil - responseDeleted = nil - } - - /// Whether there is a response on Platform this record can still delete. - var hasDeletableResponse: Bool { - documentId != nil && responseDeleted != true - } - - /// A publish was started and never confirmed: the response may be on - /// Platform or not. - var hasUnconfirmedResponse: Bool { - documentId == nil && responseDeleted != true - } } /// Lets one DashConnect operation at a time run for a wallet, across every @@ -768,30 +255,36 @@ actor DashConnectOperationGate { } } -protocol AppConnectResponseStore { - /// Whether `save` keeps anything. A login must not register a key the - /// store cannot record: its response could not be found again. +protocol AppConnectIntentStore { + /// Whether `save` keeps anything. An approval must not submit keys the + /// store cannot record: nothing would then name them. var canPersist: Bool { get } /// Whether the store holds a row `load` leaves out because it cannot be - /// read, and that may be a record of `identityId`: one naming another - /// identity is not. - func hasUnreadableRows(identityId: String) -> Bool - func load() -> [AppConnectGrant] - func save(_ grants: [AppConnectGrant]) + /// read, and that may be an intent of `identityId`: one naming another + /// identity is not. Such a row may name key ids that are still to land. + func hasUnreadableRows(identityId: Data) -> Bool + func load() -> [AppConnect.ConnectionIntent] + func save(_ intents: [AppConnect.ConnectionIntent]) /// This store fixed to one wallet, and to the network scope it has now, /// like `DashConnectStore.pinned(toWalletIdHex:)`. - func pinned(toWalletIdHex walletIdHex: String) -> any AppConnectResponseStore + func pinned(toWalletIdHex walletIdHex: String) -> any AppConnectIntentStore } -extension AppConnectResponseStore { +extension AppConnectIntentStore { var canPersist: Bool { true } - func hasUnreadableRows(identityId: String) -> Bool { false } + func hasUnreadableRows(identityId: Data) -> Bool { false } } /// Wallet- and network-scoped, like `UserDefaultsDashConnectStore`, whose -/// scope it borrows. Nothing stored is secret: the values are public on -/// chain and the key ids are visible on the identity. -final class UserDefaultsAppConnectResponseStore: AppConnectResponseStore { +/// scope it borrows. Nothing stored is secret: the public keys and the +/// response, which is sealed to the app's ephemeral key, are what goes on +/// chain. +/// +/// It replaces the grant records (`app-connect-responses.v1`) that internal +/// TestFlight builds of the DashConnect release branch wrote; no App Store +/// build wrote them, and they are not read. Keys those builds gave show as +/// keys no intent names, and can be turned off from Connections. +final class UserDefaultsAppConnectIntentStore: AppConnectIntentStore { private let defaults: UserDefaults private let scope: Scope private let encoder: JSONEncoder @@ -839,19 +332,19 @@ final class UserDefaultsAppConnectResponseStore: AppConnectResponseStore { case .connections(let connections): scopeKey = connections.storageKey case .key(let provider): scopeKey = provider() } - return scopeKey.map { "\($0).app-connect-responses.v1" } + return scopeKey.map { "\($0).app-connect-intents.v1" } } - func pinned(toWalletIdHex walletIdHex: String) -> any AppConnectResponseStore { + func pinned(toWalletIdHex walletIdHex: String) -> any AppConnectIntentStore { switch scope { case .connections(let connections): - return UserDefaultsAppConnectResponseStore( + return UserDefaultsAppConnectIntentStore( defaults: defaults, scope: .connections(connections.pinnedStore(toWalletIdHex: walletIdHex))) case .key(let provider): // A handed-in scope names no wallet to replace: it is fixed to // the value it has now. let scopeKey = provider() - return UserDefaultsAppConnectResponseStore(defaults: defaults, scope: .key { scopeKey }) + return UserDefaultsAppConnectIntentStore(defaults: defaults, scope: .key { scopeKey }) } } @@ -859,72 +352,69 @@ final class UserDefaultsAppConnectResponseStore: AppConnectResponseStore { /// leaves such a value alone, so nothing new would be kept. var canPersist: Bool { storageKey != nil && !readRows().isNotRowList } - func hasUnreadableRows(identityId: String) -> Bool { + func hasUnreadableRows(identityId: Data) -> Bool { let rows = readRows() return rows.isNotRowList || rows.unreadable.contains { guard let named = ($0 as? [String: Any])?["identityId"] as? String else { return true } - return named == identityId + return named == identityId.base64EncodedString() } } - func load() -> [AppConnectGrant] { - readRows().grants + func load() -> [AppConnect.ConnectionIntent] { + readRows().intents } - func save(_ grants: [AppConnectGrant]) { + func save(_ intents: [AppConnect.ConnectionIntent]) { guard let storageKey else { return } let stored = readRows() // A value that is not a list of rows is not this build's to replace: // nothing is written until it is gone. guard !stored.isNotRowList else { - Self.logger.error("AppConnectResponseStore: stored value is not a JSON array; grants not saved") + Self.logger.error("AppConnectIntentStore: stored value is not a JSON array; intents not saved") return } - // Rows this build cannot read are written back untouched: each one is - // the only record of a response on Platform, and dropping it would - // leave that response impossible to find. + // Rows this build cannot read are written back untouched: each may + // name keys that are still to land. let unreadable = stored.unreadable - guard !grants.isEmpty || !unreadable.isEmpty else { + guard !intents.isEmpty || !unreadable.isEmpty else { defaults.removeObject(forKey: storageKey) return } do { - let encoded = try grants.map { try JSONSerialization.jsonObject(with: encoder.encode($0)) } + let encoded = try intents.map { try JSONSerialization.jsonObject(with: encoder.encode($0)) } defaults.set( try JSONSerialization.data(withJSONObject: encoded + unreadable), forKey: storageKey) } catch { Self.logger.error( - "AppConnectResponseStore: failed to encode grants: \(error.localizedDescription, privacy: .public)") + "AppConnectIntentStore: failed to encode intents: \(error.localizedDescription, privacy: .public)") } } /// Decodes row by row, like `UserDefaultsDashConnectStore`, so one /// unreadable row costs one record instead of all of them. - private func readRows() -> (grants: [AppConnectGrant], unreadable: [Any], isNotRowList: Bool) { + private func readRows() -> (intents: [AppConnect.ConnectionIntent], unreadable: [Any], isNotRowList: Bool) { guard let storageKey, let stored = defaults.object(forKey: storageKey) else { return ([], [], false) } - // A value of another kind is as much not this build's to replace as - // data that is not a list. guard let data = stored as? Data, let rows = (try? JSONSerialization.jsonObject(with: data)) as? [Any] else { - Self.logger.error("AppConnectResponseStore: stored value is not a JSON array; left in place") + Self.logger.error("AppConnectIntentStore: stored value is not a JSON array; left in place") return ([], [], true) } - var grants: [AppConnectGrant] = [] + var intents: [AppConnect.ConnectionIntent] = [] var unreadable: [Any] = [] for row in rows { if JSONSerialization.isValidJSONObject(row), let rowData = try? JSONSerialization.data(withJSONObject: row), - let grant = try? decoder.decode(AppConnectGrant.self, from: rowData) { - grants.append(grant) + let intent = try? decoder.decode(AppConnect.ConnectionIntent.self, from: rowData) { + intents.append(intent) } else { unreadable.append(row) } } if !unreadable.isEmpty { Self.logger.warning( - "AppConnectResponseStore: \(unreadable.count, privacy: .public) stored grant(s) could not be read; kept as stored") + "AppConnectIntentStore: \(unreadable.count, privacy: .public) stored intent(s) could not be read; kept as stored") } - return (grants, unreadable, false) + return (intents, unreadable, false) } } diff --git a/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift b/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift new file mode 100644 index 0000000000..3969641f56 --- /dev/null +++ b/DashWallet/Sources/Models/DashConnect/AppConnectProjection.swift @@ -0,0 +1,597 @@ +import CryptoKit +import Foundation +import SwiftDashSDK + +/// App Connect as one projection. The wallet stores only what Platform cannot +/// tell it: the intents, which name the keys an approval submits. Every +/// connection, its status and its expiry are computed from one read of the +/// identity and those intents; nothing computed is stored. +/// +/// Platform takes an identity update whole or not at all, and refuses one +/// that adds a key id the identity already holds. So an intent's update +/// either lands as submitted, or one of its ids is held by another key and it +/// can never land. Keys of the intent can still show next to such a conflict +/// (another device submitted the same keys with a different one): those are +/// access the app has. Nothing else settles an intent: a key that is absent +/// may still arrive, whatever the revision or the time. +extension AppConnect { + // MARK: Stored + + /// One key an intent submits, exactly as it is submitted. + struct IntendedKey: Codable, Equatable { + let id: UInt32 + let purpose: KeyPurpose + let securityLevel: SecurityLevel + let keyType: KeyType + let data: Data + let readOnly: Bool + let bound: StoredBound? + let totalBudget: UInt64? + /// Block time in milliseconds. + let expiresAt: UInt64? + + var isAuthentication: Bool { purpose == .authentication } + } + + /// What the wallet writes before it submits an identity update for an + /// app, and the only App Connect state it keeps. It is never removed + /// automatically: an intent whose keys are all off, or whose update can + /// never land, stays as the connection's history. Its rows are decoded + /// one by one and a row a build cannot read blocks approvals on its + /// identity, so a field added later has to be optional. + struct ConnectionIntent: Codable, Equatable, Identifiable { + let id: UUID + let identityId: Data + let appId: Data + /// The app's name and website as the approval sheet showed them. + let appLabel: String + let appUrl: String + /// `hash160(appEphPub)` of the request. + let requestHash: Data + let connectionId: Data? + /// The keys the update adds, auth and encryption. + let keys: [IntendedKey] + /// The identity's encryption keys the response carries without adding + /// them, in slot order. + let sentEncryptionKeyIds: [UInt32] + /// The ids of earlier auth keys the same update turns off. + let disables: [UInt32] + /// The response, sealed before the submit, so a disconnect deletes it + /// by its values. + let response: ResponseValues + /// Set once the response is known to be on Platform. + var responseDocumentId: Data? + /// Set once the response is known to be gone from Platform, or never + /// to have got there. + var responseRemoved: Bool + let createdAt: Date + /// When the intent was done with: the user disconnected the app, or a + /// later approval on the same connection replaced it. + var closedAt: Date? + + var authKeys: [IntendedKey] { keys.filter(\.isAuthentication) } + } + + // MARK: Read + + /// One key of the identity as Platform shows it. Bounds come from the + /// wallet's key store, which may not know a key yet: `bound` is nil then, + /// and `boundKnown` false. + struct PlatformKey: Equatable { + let id: UInt32 + let purpose: KeyPurpose + let securityLevel: SecurityLevel + let keyType: KeyType + let data: Data + let readOnly: Bool + let bound: StoredBound? + let boundKnown: Bool + let totalBudget: UInt64? + /// Block time in milliseconds. + let expiresAt: UInt64? + let disabledAt: UInt64? + } + + /// A key as the SDK fetched it, with its bound from the wallet's key + /// store (`binding`, nil when the store does not hold the key). + static func platformKey(_ key: ManagedIdentity.IdentityPublicKeyInfo, binding: KeyBinding?) -> PlatformKey { + let known = binding.map { $0.data == key.data && !$0.hasUnreadableBound } ?? false + return PlatformKey( + id: UInt32(bitPattern: key.keyId), purpose: key.purpose, securityLevel: key.securityLevel, + keyType: key.keyType, data: key.data, readOnly: key.readOnly, + bound: known ? binding?.bound : nil, boundKnown: known, + // Protocol timestamps are unsigned; the SDK hands them over in an + // Int64 bit for bit. + totalBudget: key.totalBudget, expiresAt: key.expiresAt.map { UInt64(bitPattern: $0) }, + disabledAt: key.disabledAt.map { UInt64(bitPattern: $0) }) + } + + /// One read of an identity. + struct IdentitySnapshot: Equatable { + let identityId: Data + let revision: UInt64 + let keys: [PlatformKey] + /// Platform's block time in milliseconds, proved with the read; nil + /// when the read carries none. Without it no key is judged expired. + let platformTime: UInt64? + + /// Whether this read may replace `newest`. A revision only grows, so + /// a read below one already seen comes from a node that is behind. + func mayReplace(_ newest: IdentitySnapshot?) -> Bool { + guard let newest, newest.identityId == identityId else { return true } + return revision >= newest.revision + } + } + + // MARK: One key against the identity + + enum KeyPresence: Equatable { + /// No key under the id: the update may still land. + case missing + /// Another key holds the id: the update can never land. + case conflicting + case live + case expired + case disabled + } + + /// The same key: id, type, purpose, level, payload and access. Limits + /// are left out, since an authorized limits update changes them, and so + /// is a bound the store does not know yet. + static func isSameKey(_ actual: PlatformKey, as intended: IntendedKey) -> Bool { + actual.id == intended.id && actual.keyType == intended.keyType && actual.purpose == intended.purpose + && actual.securityLevel == intended.securityLevel && actual.data == intended.data + && actual.readOnly == intended.readOnly + && (!actual.boundKnown || actual.bound == intended.bound) + } + + static func isLive(_ key: PlatformKey, at platformTime: UInt64?) -> Bool { + guard key.disabledAt == nil else { return false } + guard let expiresAt = key.expiresAt, let platformTime else { return true } + return expiresAt > platformTime + } + + static func presence(of intended: IntendedKey, in snapshot: IdentitySnapshot) -> KeyPresence { + guard let actual = snapshot.keys.first(where: { $0.id == intended.id }) else { return .missing } + guard isSameKey(actual, as: intended) else { return .conflicting } + if actual.disabledAt != nil { return .disabled } + return isLive(actual, at: snapshot.platformTime) ? .live : .expired + } + + // MARK: One intent + + enum IntentStatus: Equatable { + /// An auth key is live; `expiresAt` is the earliest expiry among them. + /// It may sit next to an id another key holds. + case active(expiresAt: UInt64?) + /// No auth key is there yet and none is taken: the update may land. + case confirming + /// No auth key is live, some are expired but still enabled, and none + /// may still land. + case expired + /// Every auth key is off. + case disconnected + /// Another key holds one of its ids and none of its auth keys is + /// enabled: the update never landed and never will. + case neverLanded + } + + static func status(of intent: ConnectionIntent, in snapshot: IdentitySnapshot) -> IntentStatus { + // A live key of the intent is access the app has, whatever else of + // the update shows. + let auth = intent.authKeys.map { ($0, presence(of: $0, in: snapshot)) } + let live = auth.filter { $0.1 == .live } + if !live.isEmpty { + let expiries = live.compactMap { key, _ in + snapshot.keys.first { $0.id == key.id }?.expiresAt + } + return .active(expiresAt: expiries.min()) + } + // One key of the update held by another, encryption keys included, + // and the rest of it never lands. An expired key that is still + // enabled can be revived by an authorized limits update, so it is + // access the app has. + if hasConflict(intent, in: snapshot) { + return auth.contains(where: { $0.1 == .expired }) ? .expired : .neverLanded + } + if auth.contains(where: { $0.1 == .missing }) { return .confirming } + if auth.contains(where: { $0.1 == .expired }) { return .expired } + return .disconnected + } + + // MARK: The connections + + struct ProjectedConnection: Equatable, Identifiable { + let appId: Data + let status: IntentStatus + /// The app's intents, newest first. + let intents: [ConnectionIntent] + /// Live auth keys bound to one of the app's contracts that no intent + /// names: granted on another device, or before a restore. Keyed by + /// identity. + let unrecordedKeyIds: [Data: [UInt32]] + /// The app's live access comes only from approvals whose response + /// was never published: it holds keys it never got. + var isUndelivered = false + + var id: Data { appId } + } + + struct Projection: Equatable { + let connections: [ProjectedConnection] + /// Live keys bound to the DashPay profile that no intent names, by + /// identity. They are not any one app's. + let unrecordedProfileKeyIds: [Data: [UInt32]] + /// Live App Connect keys no intent names whose bound the wallet's + /// key store does not hold yet, by identity. + var unplacedKeyIds: [Data: [UInt32]] = [:] + } + + /// One app's status from those of its intents: the one the user can act + /// on first. Live keys come first, then an update that may still land. + private static func rank(_ status: IntentStatus) -> Int { + switch status { + case .active: return 0 + case .confirming: return 1 + case .expired: return 2 + case .disconnected: return 3 + case .neverLanded: return 4 + } + } + + /// The contract a bound is on. + static func contractId(of bound: StoredBound) -> Data { + switch bound { + case .singleContract(let id), .contractGroup(let id): return id + case .documentType(let contractId, _): return contractId + } + } + + /// A live key in a shape App Connect registers for an app: HASH160 + /// authentication at HIGH or CRITICAL, with an expiry (every key an + /// approval gives has one). Anything else on the identity (the wallet's + /// own keys, keys of other tools) is never counted as an app's. + static func isAppConnectAuthKey(_ key: PlatformKey) -> Bool { + key.purpose == .authentication && key.keyType == .ecdsaHash160 + && (key.securityLevel == .high || key.securityLevel == .critical) + && key.expiresAt != nil && key.disabledAt == nil + } + + private static let dashPayContractIdData = Data.identifier(fromBase58: dashPayContractId) + + static func isProfileBound(_ bound: StoredBound) -> Bool { + guard case .documentType(let contractId, let name) = bound else { return false } + return contractId.toBase58String() == dashPayContractId && name == "profile" + } + + /// 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 { + 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:))) + } + + 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) } + 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. + 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) + } + } + } + + let apps = Set(intents.map(\.appId)).union(unrecorded.keys) + let connections: [ProjectedConnection] = apps.compactMap { app in + let own = intents.filter { $0.appId == app }.sorted { $0.createdAt > $1.createdAt } + let ownStatuses = own.compactMap { intent in byIdentity[intent.identityId].map { (intent, status(of: intent, in: $0)) } } + var statuses = ownStatuses.map(\.1) + let others = unrecorded[app] ?? [:] + if !others.isEmpty { statuses.append(.active(expiresAt: nil)) } + // An app this read says nothing about (its intents are on + // identities not read) has no connection here. + guard let best = statuses.min(by: { rank($0) < rank($1) }) else { return nil } + let delivering = ownStatuses.compactMap { intent, status -> ConnectionIntent? in + guard case .active = status else { return nil } + return intent + } + let isUndelivered = others.isEmpty && !delivering.isEmpty && delivering.allSatisfy { $0.responseDocumentId == nil } + return ProjectedConnection( + appId: app, status: best, intents: own, unrecordedKeyIds: others, isUndelivered: isUndelivered) + } + return Projection( + connections: connections.sorted { $0.appId.lexicographicallyPrecedes($1.appId) }, + unrecordedProfileKeyIds: profile, + unplacedKeyIds: unplaced) + } + + private struct IdentityKey: Hashable { + let identityId: Data + let keyId: UInt32 + init(_ identityId: Data, _ keyId: UInt32) { + self.identityId = identityId + self.keyId = keyId + } + } + + // MARK: Plans + + /// The ids for `count` new keys that no key on the identity and no + /// intent on it holds, so a key that may still land is never given to + /// another: above the highest while they fit, then the lowest free ones. + /// Nil when the ids run out. + static func newKeyIds(count: Int, snapshot: IdentitySnapshot, intents: [ConnectionIntent]) -> [UInt32]? { + let taken = Set(snapshot.keys.map(\.id) + + intents.filter { $0.identityId == snapshot.identityId }.flatMap { $0.keys.map(\.id) }) + let first = taken.max().map { UInt64($0) + 1 } ?? 0 + if first + UInt64(count) <= UInt64(UInt32.max) + 1 { + return (0 ..< count).map { UInt32(first + UInt64($0)) } + } + var ids: [UInt32] = [] + var id: UInt32 = 0 + // The identity holds far fewer keys than there are ids. + while ids.count < count { + if !taken.contains(id) { ids.append(id) } + guard ids.count < count else { break } + guard id < .max else { return nil } + id += 1 + } + return ids + } + + /// The keys `intent` turns off that are still on. + static func outstandingDisables(of intent: ConnectionIntent, in snapshot: IdentitySnapshot) -> [UInt32] { + intent.disables.filter { id in snapshot.keys.contains { $0.id == id && $0.disabledAt == nil } } + } + + /// Whether `snapshot` shows all of `intent`: every key it adds, and every + /// key it turns off off. Another update may have added the same keys + /// without turning the earlier ones off (the same request approved on + /// another device), so the added keys alone do not tell. + static func hasLanded(_ intent: ConnectionIntent, in snapshot: IdentitySnapshot) -> Bool { + intent.keys.allSatisfy { key in + [.live, .expired, .disabled].contains(presence(of: key, in: snapshot)) + // A key whose bound the store does not hold yet may be bound + // elsewhere: it is not taken as this update's, so its secret + // is not handed over. + && snapshot.keys.first { $0.id == key.id }?.boundKnown == true + } && outstandingDisables(of: intent, in: snapshot).isEmpty + } + + /// Whether the encryption keys `intent`'s response carries can still be + /// used: those it re-sends are live, and those it adds are not off. + static func encryptionKeysUsable(_ intent: ConnectionIntent, in snapshot: IdentitySnapshot) -> Bool { + intent.sentEncryptionKeyIds.allSatisfy { id in + snapshot.keys.contains { $0.id == id && isLive($0, at: snapshot.platformTime) } + } && intent.keys.allSatisfy { $0.isAuthentication || presence(of: $0, in: snapshot) != .disabled } + } + + /// Whether every auth key `intent`'s response carries can still sign: + /// none is off or expired. One that is not there yet may still land. + static func authKeysUsable(_ intent: ConnectionIntent, in snapshot: IdentitySnapshot) -> Bool { + intent.authKeys.allSatisfy { ![.disabled, .expired].contains(presence(of: $0, in: snapshot)) } + } + + /// A key Platform must name current for the app for a response to hold. + struct ExpectedCurrentKey: Equatable { + let id: UInt32 + let data: Data + /// A key the intent registers that the read does not show: none may + /// be current yet, or this one already (the read may be behind). + let mayBeNone: Bool + } + + /// What Platform's current encryption key for the app must be, by + /// purpose, for `intent`'s response to hold: each key it re-sends or + /// added that `snapshot` shows live, and for a key it registers that + /// `snapshot` does not show, that key or none. + static func expectedCurrentEncryptionKeys(of intent: ConnectionIntent, in snapshot: IdentitySnapshot) -> [KeyPurpose: [ExpectedCurrentKey]] { + var keys: [KeyPurpose: [ExpectedCurrentKey]] = [:] + for key in intent.keys where !key.isAuthentication { + switch presence(of: key, in: snapshot) { + case .live: keys[key.purpose, default: []].append(ExpectedCurrentKey(id: key.id, data: key.data, mayBeNone: false)) + case .missing: keys[key.purpose, default: []].append(ExpectedCurrentKey(id: key.id, data: key.data, mayBeNone: true)) + case .conflicting, .expired, .disabled: continue + } + } + for id in intent.sentEncryptionKeyIds { + guard let key = snapshot.keys.first(where: { $0.id == id }), isLive(key, at: snapshot.platformTime) else { continue } + keys[key.purpose, default: []].append(ExpectedCurrentKey(id: id, data: key.data, mayBeNone: false)) + } + return keys + } + + /// How Platform's current key, `current`, stands against `expected`. + enum CurrentKeyCheck: Equatable { + /// That very key, enabled, or none at all where none may be. + case matches + /// None current yet for a key the identity already shows: the + /// node that answered may be behind. + case notYet + /// Another key is current, or this one is off: no later read that + /// says otherwise can be trusted over it, as that one may be behind. + case differs + } + + static func check(_ current: CurrentContractKey?, against expected: ExpectedCurrentKey) -> CurrentKeyCheck { + guard let current else { return expected.mayBeNone ? .matches : .notYet } + let isIt = !current.isDisabled && current.keyId == expected.id && current.data == expected.data + return isIt ? .matches : .differs + } + + /// Whether another key holds an id one of the intent's keys was to take: + /// then the intent's update never lands as a whole. + static func hasConflict(_ intent: ConnectionIntent, in snapshot: IdentitySnapshot) -> Bool { + intent.keys.contains { presence(of: $0, in: snapshot) == .conflicting } + } + + /// What a disconnect of one app submits on one identity. + struct DisconnectPlan: Equatable { + /// The app's auth keys still enabled: live or expired. Platform still + /// lets an authorized limits update revive an expired one. + var disable: [UInt32] = [] + /// One missing auth key id per intent whose update may still land. A + /// key of the wallet's own under that id means the update never can. + var fence: [UInt32] = [] + /// Intents whose response may be on Platform. + var deleteResponses: [UUID] = [] + + var isEmpty: Bool { disable.isEmpty && fence.isEmpty && deleteResponses.isEmpty } + } + + /// The intents on `identityId` that are closed but whose response may + /// still be on Platform: its delete failed, and with the row gone no + /// disconnect of the app reaches it again. The next signed operation on + /// the identity deletes it. + static func responsesLeft(identityId: Data, intents: [ConnectionIntent]) -> [UUID] { + intents.filter { $0.identityId == identityId && $0.closedAt != nil && !$0.responseRemoved }.map(\.id) + } + + /// The order a disconnect disables keys in: the other keys first (the + /// DashPay profile keys no intent names, a fence left on), then the + /// app's own keys. Platform takes `maxKeysDisabledPerUpdate` keys per + /// update, and an update that fails leaves the later ones live. With the + /// app's keys last, a failure part way never leaves all of them off while + /// another key is still live, so the app's row stays and its retry + /// reaches the keys left (ADR-0031). + static func disableOrder(appKeyIds: [UInt32], otherKeyIds: [UInt32]) -> [UInt32] { + let app = Set(appKeyIds) + 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. + static func disconnectPlan( + appId: Data, snapshot: IdentitySnapshot, intents: [ConnectionIntent], includeUnrecorded: Bool + ) -> DisconnectPlan { + var plan = DisconnectPlan() + let own = intents.filter { $0.appId == appId && $0.identityId == snapshot.identityId } + for intent in own { + let auth = intent.authKeys.map { ($0, presence(of: $0, in: snapshot)) } + plan.disable += auth.filter { [.live, .expired].contains($0.1) }.map(\.0.id) + if !hasConflict(intent, in: snapshot), let missing = auth.first(where: { $0.1 == .missing })?.0.id { + plan.fence.append(missing) + } + 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 + } + plan.disable = Array(Set(plan.disable)).sorted() + plan.fence = Array(Set(plan.fence)).sorted() + return plan + } + + // MARK: Submitting + + /// The most keys one identity update may add (Platform consensus). + static let maxKeysAddedPerUpdate = 6 + + /// The key `intended` is submitted as. + static func identityPubkey(of intended: IntendedKey) -> ManagedPlatformWallet.IdentityPubkey { + ManagedPlatformWallet.IdentityPubkey( + keyId: intended.id, + keyType: intended.keyType, + purpose: intended.purpose, + securityLevel: intended.securityLevel, + pubkeyBytes: intended.data, + readOnly: intended.readOnly, + contractBounds: intended.bound.map(contractBounds(of:)), + totalBudget: intended.totalBudget, + expiresAt: intended.expiresAt) + } + + static func contractBounds(of bound: StoredBound) -> ManagedPlatformWallet.ContractBounds { + switch bound { + case .singleContract(let id): return .singleContract(id: id) + case .documentType(let id, let name): return .singleContractDocumentType(id: id, documentTypeName: name) + case .contractGroup(let id): return .contractGroup(id: id) + } + } + + /// Whether the auth keys of `intent` that are on the identity hold no more + /// than `plan` grants now: an authorized limits update may have raised + /// a key's budget or lifetime after it landed. No budget means no cap. + static func landedKeysWithinPlan(_ intent: ConnectionIntent, _ plan: GrantPlan, in snapshot: IdentitySnapshot) -> Bool { + intent.authKeys.count == plan.auth.count && zip(intent.authKeys, plan.auth).allSatisfy { intended, grant in + guard let key = snapshot.keys.first(where: { isSameKey($0, as: intended) }) else { return true } + let budgetWithin = grant.totalBudget.map { cap in key.totalBudget.map { $0 <= cap } ?? false } ?? true + return budgetWithin && (key.expiresAt ?? .max) <= grant.expiresAt + } + } + + // MARK: Fence + + /// The leaf a fence key is derived at: one per identity and key id, so + /// the same fence is built on every try. + static func fenceKeyLeaf(identityId: Data, keyId: UInt32) -> Data { + var input = Data("dashconnect-fence".utf8) + identityId + withUnsafeBytes(of: keyId.bigEndian) { input.append(contentsOf: $0) } + return Data(SHA256.hash(data: Data(SHA256.hash(data: input)))) + } + + /// A key of the wallet's own under `keyId`, which an intent may still + /// land on. Platform refuses an update that adds an id the identity + /// holds, so once this key is there that intent's update never lands. + /// It can spend one credit and has no expiry: an expiry would have to be + /// ahead of Platform's block time, which the wallet does not read. + static func fenceKey(keyId: UInt32, publicKeyHash160: Data) -> ManagedPlatformWallet.IdentityPubkey { + ManagedPlatformWallet.IdentityPubkey( + keyId: keyId, + keyType: .ecdsaHash160, + purpose: .authentication, + securityLevel: .high, + pubkeyBytes: publicKeyHash160, + readOnly: false, + contractBounds: nil, + totalBudget: 1, + expiresAt: nil) + } +} diff --git a/DashWallet/Sources/Models/DashConnect/AppConnectV2Login.swift b/DashWallet/Sources/Models/DashConnect/AppConnectV2Login.swift index cdf722c3bd..fa731a3497 100644 --- a/DashWallet/Sources/Models/DashConnect/AppConnectV2Login.swift +++ b/DashWallet/Sources/Models/DashConnect/AppConnectV2Login.swift @@ -788,212 +788,6 @@ extension AppConnect { return mayBeBehind ? .notThisWalletsIfSettled : .notThisWallets } - /// Wallet rule 8: the live auth keys of this wallet's earlier grants to - /// the app on the same connection, which the new grant replaces in the - /// same identity update. None without a connection id. `keeping` holds - /// the keys the new grant sends again (a retry of the same request). - static func supersededKeyIds( - grants: [AppConnectGrant], - identityId: String, - appId: String, - connectionId: String?, - keeping: Set, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> [UInt32] { - guard let connectionId else { return [] } - let previous = Set(grants - .filter { $0.identityId == identityId && $0.appContractId == appId && $0.connectionId == connectionId } - .flatMap(\.keyIds)) - .subtracting(keeping) - return currentIdentityPublicKeys - .filter { - previous.contains(UInt32(bitPattern: $0.keyId)) && isLiveGrantedKey($0) - } - .map { UInt32(bitPattern: $0.keyId) } - .sorted() - } - - /// The contracts and contract groups that v2-shaped keys no record names - /// are bound to (`unrecordedV2Keys`), other than `appContractId`, the - /// allowlisted foreign document types and Platform's system contracts - /// (never a binding's target): a disconnect looks each one up to tell - /// whether the app's owner owns it. - static func unrecordedV2KeyBoundIds( - appContractId: Data, - keys: [(keyId: UInt32, bound: StoredBound)] - ) -> (contracts: Set, groups: Set) { - var contracts: Set = [] - var groups: Set = [] - for (_, bound) in keys { - switch bound { - case .singleContract(let id): - if id != appContractId, !systemContractIds.contains(id.toBase58String()) { contracts.insert(id) } - case .documentType(let id, let name): - if id != appContractId, !systemContractIds.contains(id.toBase58String()), - !allowedForeignDocumentTypes.contains("\(id.toBase58String())/\(name)") { - contracts.insert(id) - } - case .contractGroup(let id): - groups.insert(id) - } - } - return (contracts, groups) - } - - /// The ids of the keys in `keys` that belong to the app's v2 grants: - /// bound to a contract the app's owner owns (`appContractIds`, the app's - /// own among them), a document type on one, or a contract group that - /// owner owns (`appGroupIds`). A key bound to a foreign document type v2 - /// allows (DashPay `profile`) is not among them: that bound names no - /// app, so with no record it may be any app's, and a disconnect takes it - /// through `unattributedProfileKeyIds` instead. - static func appsV2KeyIds( - appContractIds: Set, - appGroupIds: Set, - keys: [(keyId: UInt32, bound: StoredBound)] - ) -> [UInt32] { - keys.filter { _, bound in - switch bound { - case .singleContract(let id): return appContractIds.contains(id) - case .documentType(let id, _): return appContractIds.contains(id) - case .contractGroup(let id): return appGroupIds.contains(id) - } - } - .map(\.keyId) - .sorted() - } - - /// The ids of the keys in `keys` bound to a foreign document type v2 - /// allows (DashPay `profile`). Every app can be given such a key and the - /// bound does not say which one was, so with no record a disconnect on - /// the identity that ends there turns these off with the app's keys, - /// for every app that holds one (`sharedProfileKeyIdsToDisable`). - static func unattributedProfileKeyIds(keys: [(keyId: UInt32, bound: StoredBound)]) -> [UInt32] { - keys.filter { _, bound in - guard case .documentType(let id, let name) = bound else { return false } - return allowedForeignDocumentTypes.contains("\(id.toBase58String())/\(name)") - } - .map(\.keyId) - .sorted() - } - - /// Whether a v2 key with this expiry may still work at `nowMilliseconds`. - /// A key that expired stays live on Platform but can no longer sign. - /// Platform goes by block time, so a device clock up to `clockTolerance` - /// fast does not count a working key as expired. Every v2 auth key has an - /// expiry; a key with none is not one, and counts as false here. - /// `expiresAt` carries the protocol's unsigned timestamp in an `Int64`'s - /// bits, so it is compared as unsigned: an expiry past `Int64.max` is far - /// in the future, not in the past. - static func isUnexpired(_ expiresAt: Int64?, nowMilliseconds: Int64) -> Bool { - guard let expiresAt else { return false } - let earliest = max(0, nowMilliseconds - Int64(clockTolerance * 1000)) - return UInt64(bitPattern: expiresAt) > UInt64(earliest) - } - - /// The unattributed profile keys the wallet's store shows as live and - /// not yet expired. - static func storedSharedProfileKeyIds( - recordedKeyIds: Set, - bindings: [KeyBinding], - nowMilliseconds: Int64 - ) -> [UInt32] { - let unexpired = Set(bindings.filter { isUnexpired($0.expiresAt, nowMilliseconds: nowMilliseconds) }.map(\.keyId)) - return unattributedProfileKeyIds(keys: unrecordedV2Keys(recordedKeyIds: recordedKeyIds, bindings: bindings)) - .filter(unexpired.contains) - } - - /// Whether the store shows a live, unexpired v2-shaped key that no record - /// names and whose bound this build cannot read: it may be an - /// unattributed profile key, so the set a disconnect turns off cannot be - /// trusted. - static func hasUnplacedStoredKey(recordedKeyIds: Set, bindings: [KeyBinding], nowMilliseconds: Int64) -> Bool { - bindings.contains { - $0.isV2AuthKeyShaped && $0.hasUnreadableBound && !$0.isDisabled - && isUnexpired($0.expiresAt, nowMilliseconds: nowMilliseconds) && !recordedKeyIds.contains($0.keyId) - } - } - - /// The unattributed profile keys a disconnect disables, from a fresh view - /// of the identity: live, not yet expired, bound to an allowlisted - /// foreign document type, and not in `recordedKeyIds` (the keys confirmed - /// records name). - /// `nil` when the view cannot be trusted: a live v2-shaped key no record - /// names, in the view or in the store, has no readable stored bound, so - /// it may be one of them; or the store holds one of them that the view - /// lacks, so the node is behind. - static func sharedProfileKeyIdsToDisable( - recordedKeyIds: Set, - bindings: [KeyBinding], - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - nowMilliseconds: Int64 - ) -> [UInt32]? { - let hasUnplacedKey = currentIdentityPublicKeys.contains { key in - let keyId = UInt32(bitPattern: key.keyId) - return isLiveAppConnectAuthKey(key) && isUnexpired(key.expiresAt, nowMilliseconds: nowMilliseconds) - && !recordedKeyIds.contains(keyId) - && !bindings.contains { $0.keyId == keyId && $0.data == key.data && !$0.hasUnreadableBound } - } - let fetchedKeyIds = Set(currentIdentityPublicKeys.map { UInt32(bitPattern: $0.keyId) }) - // The store's own copy counts too: a fetched view that lacks such a - // key does not show it is off. One the view shows off is. - let offInView = Set(currentIdentityPublicKeys.filter { $0.disabledAt != nil }.map { UInt32(bitPattern: $0.keyId) }) - guard !hasUnplacedKey, - !hasUnplacedStoredKey( - recordedKeyIds: recordedKeyIds.union(offInView), bindings: bindings, nowMilliseconds: nowMilliseconds), - storedSharedProfileKeyIds( - recordedKeyIds: recordedKeyIds, bindings: bindings, nowMilliseconds: nowMilliseconds - ).allSatisfy(fetchedKeyIds.contains) else { return nil } - let unexpired = Set(currentIdentityPublicKeys - .filter { isUnexpired($0.expiresAt, nowMilliseconds: nowMilliseconds) }.map { UInt32(bitPattern: $0.keyId) }) - return unattributedProfileKeyIds(keys: unrecordedV2Keys( - recordedKeyIds: recordedKeyIds, bindings: bindings, currentIdentityPublicKeys: currentIdentityPublicKeys)) - .filter(unexpired.contains) - } - - /// The order a disconnect disables keys in: the unattributed profile - /// keys first, then the app's own keys. Platform takes - /// `maxKeysDisabledPerUpdate` keys per update, and an update that fails - /// leaves the later ones live. With the app's keys last, a failure part - /// way never leaves all of them off while a profile key is still live, - /// so the retry still counts as the app's disconnect and reaches the - /// profile keys left. - static func disableOrder(appKeyIds: [UInt32], profileKeyIds: [UInt32]) -> [UInt32] { - let app = Set(appKeyIds) - return Set(profileKeyIds).subtracting(app).sorted() + app.sorted() - } - - /// The live v2-shaped keys on the identity that no grant record of it - /// names, as a reinstall or a lost record leaves them: HASH160 - /// authentication keys at HIGH or CRITICAL with an expiry (every v2 - /// auth key has one) and a bound the store can read. - static func unrecordedV2Keys( - recordedKeyIds: Set, - bindings: [KeyBinding], - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> [(keyId: UInt32, bound: StoredBound)] { - currentIdentityPublicKeys.compactMap { key in - let keyId = UInt32(bitPattern: key.keyId) - guard isLiveAppConnectAuthKey(key), key.expiresAt != nil, !recordedKeyIds.contains(keyId), - let stored = bindings.first(where: { $0.keyId == keyId && $0.data == key.data }), - !stored.hasUnreadableBound, let bound = stored.bound else { return nil } - return (keyId, bound) - } - } - - /// `unrecordedV2Keys` from the store alone, for an identity that is not - /// the active one: its keys as last loaded. - static func unrecordedV2Keys( - recordedKeyIds: Set, - bindings: [KeyBinding] - ) -> [(keyId: UInt32, bound: StoredBound)] { - bindings.compactMap { binding in - guard binding.isV2AuthKeyShaped, !binding.isDisabled, !binding.hasUnreadableBound, - !recordedKeyIds.contains(binding.keyId), let bound = binding.bound else { return nil } - return (binding.keyId, bound) - } - } - /// The stored form of a bound the wallet registers a key with. static func storedBound(of bounds: ManagedPlatformWallet.ContractBounds) -> StoredBound { switch bounds { @@ -1003,62 +797,6 @@ extension AppConnect { } } - /// Whether `key`, found on the identity after an update reported a - /// failure, is the key the update added (`added`): the same id and - /// payload, live, and everything it was registered with — type, - /// purpose, level, read-only flag, limits, and the bound as the store - /// reads it - /// (`binding`). A key with the same payload but another bound came from - /// another request that repeated the ephemeral key, and is not taken. - static func isAddedKey( - _ key: ManagedIdentity.IdentityPublicKeyInfo, - added: ManagedPlatformWallet.IdentityPubkey, - binding: KeyBinding? - ) -> Bool { - guard UInt32(bitPattern: key.keyId) == added.keyId, key.data == added.pubkeyBytes, key.disabledAt == nil, - key.keyType == added.keyType, key.purpose == added.purpose, key.securityLevel == added.securityLevel, - key.readOnly == added.readOnly, - key.totalBudget == added.totalBudget, - key.expiresAt.map({ UInt64(max(0, $0)) }) == added.expiresAt else { return false } - guard let bounds = added.contractBounds else { return binding == nil || binding?.bound == nil } - guard let binding, binding.keyId == added.keyId, binding.data == key.data, !binding.hasUnreadableBound else { - return false - } - return binding.bound == storedBound(of: bounds) - } - - /// A live auth key a login could have granted: HASH160 and never MASTER, - /// so a damaged record cannot get the identity's own keys disabled. - static func isLiveGrantedKey(_ key: ManagedIdentity.IdentityPublicKeyInfo) -> Bool { - key.purpose == .authentication && key.keyType == .ecdsaHash160 - && key.securityLevel != .master && key.disabledAt == nil - } - - /// Whether a key already on the identity at this binding's derived - /// payload can be sent again for it: an earlier answer to the same - /// request (a retry, or an update that landed without confirming). It - /// still has to be live, bound as the binding asks (`binding`, the - /// store's record of the key; a key the store does not show, or shows - /// with another bound, is not sent), carry the level the plan grants, - /// and limits no wider than the plan's (`clockTolerance` covers a clock - /// moved back between two tries). The payload alone proves nothing: a - /// request that repeats another's ephemeral key derives the same one. - /// A grant recorded for this request, when there is one, must name - /// exactly the keys sent again; the caller checks that. - static func canResendAuthKey( - _ key: ManagedIdentity.IdentityPublicKeyInfo, - for grant: AuthGrant, - binding: KeyBinding?, - now: Date - ) -> Bool { - guard let binding, binding.keyId == UInt32(bitPattern: key.keyId), binding.data == key.data, - !binding.isDisabled, !binding.hasUnreadableBound, binding.bound == grant.storedBound else { return false } - guard isLiveGrantedKey(key), key.securityLevel == grant.securityLevel, - key.totalBudget == grant.totalBudget, - let expiresAt = key.expiresAt, expiresAt > Int64(milliseconds(now)) else { return false } - return UInt64(expiresAt) <= grant.expiresAt + UInt64(clockTolerance * 1000) - } - /// `callback` with `ac=` appended, keeping its query. static func callbackURL(_ callback: URL, status: CallbackStatus) -> URL? { guard var components = URLComponents(url: callback, resolvingAgainstBaseURL: false) else { return nil } diff --git a/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift index a85c03525c..074ac1e03b 100644 --- a/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/DashConnectDataSource.swift @@ -29,9 +29,9 @@ protocol DashConnectDataSource { /// that would give the app something else, or act for another identity, /// wallet or network than it was resolved for, is refused. func approveLogin(_ request: DashKeyRequest, consent: ConnectionRequest) async throws -> DAppConnection - /// Parses a scanned `dash-st:` payload and either completes key - /// registration immediately or returns a token purchase that awaits - /// explicit user approval via `approveTokenPurchase(_:)`. + /// Parses a scanned `dash-st:` payload and returns the token purchase it + /// carries, which awaits explicit user approval via + /// `approveTokenPurchase(_:)`. Any other transition is refused. func handleStateTransition(_ request: DashStRequest) async throws -> DashConnectStAction /// Rebuilds, signs and submits a token purchase the user approved. /// @@ -39,29 +39,31 @@ protocol DashConnectDataSource { /// transition could already have reached Platform — the caller must not /// offer a retry when it could have. func approveTokenPurchase(_ request: DashConnectTokenPurchaseRequest) async throws - /// Turns a connection off. For a one-QR connection this disables the key - /// the app was given on the identity and deletes the published response, - /// and throws when the key could not be disabled — the connection then - /// stays as it was. A disconnect that disables keys of the app's on the - /// active identity, and is not stopped by another identity holding the - /// app, also disables the live DashPay profile keys of that identity - /// that no grant record names: their bound does not say which app was - /// given them. When those cannot be told apart, none is disabled and the - /// app's own keys still are. The result says which. The connection also stays, and that is thrown, while - /// the app holds a key on another identity of the wallet. For a two-QR - /// connection with nothing else of the app's on the identity it only - /// changes the local status: that login derives the same key every time - /// and Platform never re-adds a disabled key, so disabling it would lock - /// the app out for good. A two-QR row whose app also holds a one-QR - /// grant there has that grant's keys disabled. Turning off a one-QR - /// connection that replaced a two-QR one does disable those keys too. + /// Turns a connection off. For an App Connect connection this turns off + /// every key the wallet's approvals of the app gave on the active + /// identity, puts a key of the wallet's own under each id an approval + /// may still land on so it never does, and deletes the published + /// 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 + /// connection also stays, and that is thrown, while an approval of the + /// app on another identity of the wallet is not done. /// /// `scope` is the `DAppConnection.scope` of the row that was picked: /// both calls act only while it still names the wallet they would act /// on. @discardableResult - func disconnect(id: String, scope: String?) async throws -> DashConnectDisconnectResult + func disconnect(id: String, scope: String?, includingUnrecorded: Bool) 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. + func refreshConnections() async +} + +extension DashConnectDataSource { + func refreshConnections() async {} } /// Why a token purchase failed, and — the part that decides what the UI may @@ -147,7 +149,9 @@ final class MockDashConnectDataSource: DashConnectDataSource { static let sampleLoginQRCode = DashConnectSampleQR.keyUri(for: sampleLoginRequest) static let sampleRequest: ConnectionRequest = { var request = ConnectionRequest(loginRequest: sampleLoginRequest) - request.login = .twoQR + request.login = .appConnect(AppConnect.GrantPlan( + appId: sampleLoginRequest.contractId, appEphemeralPubKeyHash: Data(repeating: 0, count: 20), + auth: [], encryption: [], connectionId: nil, identityHint: nil, createdAt: 0, callbackHost: nil)) return request }() @@ -164,7 +168,7 @@ final class MockDashConnectDataSource: DashConnectDataSource { #if DEBUG static func previewMixed() -> MockDashConnectDataSource { MockDashConnectDataSource(initial: [ - sample(.approved), + sample(.confirming), DAppConnection( id: "7W6u4NgW63FPUuW8EnTbYzD4KybNQD5n7CUDWydJY234", name: "DashGet", @@ -213,7 +217,7 @@ final class MockDashConnectDataSource: DashConnectDataSource { if DashConnectUri.isKeyUri(trimmed) { let request = try DashConnectUri.parseKeyRequest(trimmed) try validateNetwork(request.network) - return .login(request) + throw AppConnect.v1Refusal } if DashConnectUri.isStUri(trimmed) { @@ -232,13 +236,14 @@ final class MockDashConnectDataSource: DashConnectDataSource { shouldFailNextApprove = false throw DashConnectMockError.approveFailed } + guard consent.login.isApprovable else { throw DashConnectPlatformError.approvalOutOfDate } let connectionRequest = await makeConnectionRequest(from: request) let connection = DAppConnection( id: connectionRequest.appContractId, name: connectionRequest.appLabel.isEmpty ? NSLocalizedString("Unknown app", comment: "DashConnect") : connectionRequest.appLabel, url: connectionRequest.appUrl, - status: .approved, + status: .active, updatedAt: Date() ) @@ -257,7 +262,7 @@ final class MockDashConnectDataSource: DashConnectDataSource { walletUsername: nil, walletIdentityId: nil, existingConnection: existingConnection(for: fallback.appContractId), - login: .twoQR + login: .refused(AppConnect.v1Refusal) ) } @@ -272,18 +277,8 @@ final class MockDashConnectDataSource: DashConnectDataSource { } @discardableResult - func disconnect(id: String, scope: String?) async throws -> DashConnectDisconnectResult { - let disconnectedAt = Date() - persistAndSend(subject.value.map { connection in - guard connection.id == id else { return connection } - return DAppConnection( - id: connection.id, - name: connection.name, - url: connection.url, - status: .approved, - updatedAt: disconnectedAt - ) - }) + func disconnect(id: String, scope: String?, includingUnrecorded: Bool) 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 98627bce8f..579108fb41 100644 --- a/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift +++ b/DashWallet/Sources/Models/DashConnect/DashConnectModels.swift @@ -23,17 +23,14 @@ import SwiftDashSDK enum DashConnectQr: Equatable { case login(DashKeyRequest) /// A `dash-st:` payload — a serialized state transition whose kind is - /// only known once the wallet parses it (key registration or token - /// purchase). + /// only known once the wallet parses it (a token purchase is the only + /// one it takes). case stateTransition(DashStRequest) } /// What the wallet did — or still needs the user to do — with a scanned /// `dash-st:` state transition. enum DashConnectStAction: Equatable { - /// Key registration was validated and published (or the derived keys - /// were already on the identity). - case keyRegistrationCompleted /// The payload is a token purchase; nothing was signed or sent yet — it /// awaits explicit user approval via `approveTokenPurchase(_:)`. case tokenPurchaseApprovalRequired(DashConnectTokenPurchaseRequest) @@ -143,21 +140,17 @@ extension DashConnectTokenPurchaseRequest { } } -/// Lifecycle of an app connection. -/// -/// `approved` means the wallet knows about the app, but it may not be ready to -/// sign in yet: either the required login keys are not on the identity yet, or -/// the user locally turned the connection off from the wallet UI. -/// -/// `active` means the app's login keys are registered on the identity and the -/// wallet has already published the matching `loginKeyResponse`. For a one-QR -/// connection it means the app holds a session key on an identity of this -/// wallet that this wallet has not disabled: the row is made once the key is -/// seen on the identity, before its response is published, and stays -/// whether or not the publish is confirmed. +/// Lifecycle of an app connection. `active` means an approval's keys are +/// live on an identity of this wallet; `undelivered` means they are live but +/// the app never got its response; `confirming` means an identity update may +/// still land. enum ConnectionStatus: String, Codable, CaseIterable { - case approved + /// An App Connect approval whose identity update may still land. + case confirming case active + /// The app's keys are live, but its response was never published: the + /// app holds keys it cannot use. Only a disconnect or a new QR helps. + case undelivered init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() @@ -177,22 +170,34 @@ enum ConnectionStatus: String, Codable, CaseIterable { } } -/// Which login made a connection. It decides what turning it off means: -/// a one-QR connection has a session key on the identity to disable, a -/// two-QR connection does not (see `DashConnectDataSource.disconnect`). -enum DashConnectLoginKind: String, Codable { - case twoQR - case oneQR -} - /// A connected app identified by its stable contract id. struct DAppConnection: Identifiable, Equatable, Hashable { + init(id: String, name: String, url: String, status: ConnectionStatus, updatedAt: Date, seenOn: Set = []) { + self.id = id + self.name = name + self.url = url + self.status = status + self.updatedAt = updatedAt + self.seenOn = seenOn + } + + /// `row` with another status, as of `updatedAt`, and `seenOn`. + init(_ row: DAppConnection, status: ConnectionStatus? = nil, seenOn: Set, at updatedAt: Date? = nil) { + self.init( + id: row.id, name: row.name, url: row.url, status: status ?? row.status, + updatedAt: updatedAt ?? row.updatedAt, seenOn: seenOn) + scope = row.scope + } + let id: String let name: String let url: String let status: ConnectionStatus let updatedAt: Date - var loginKind: DashConnectLoginKind = .twoQR + /// The identities (Base58) whose last read showed the app live keys no + /// approval of this wallet names. The wallet reads one identity at a + /// time, so access seen on another stays known until that one is read. + let seenOn: Set /// Names the wallet and network a data source published this row for; /// `nil` on a row that was built or read from a store. Not stored. It /// goes back with a disconnect or a remove, so a row picked from a list @@ -200,14 +205,23 @@ struct DAppConnection: Identifiable, Equatable, Hashable { var scope: String? = nil } -/// What a disconnect did with the active identity's DashPay profile keys -/// that no grant record names, besides turning off the app's own keys. +/// What a disconnect left on the active identity besides the app's keys it +/// turned off. struct DashConnectDisconnectResult: Equatable { - /// How many of them it turned off. - var profileKeysTurnedOff = 0 - /// They could not be told apart, so none was turned off; the app's own - /// keys were. - var profileKeysUnchecked = false + /// 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. + var keysNotChecked = 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 } /// A pending request derived from a scanned login QR code. @@ -277,15 +291,3 @@ extension ConnectionRequest { walletIdentityId == identityId && self.scope == scope } } - -extension AppConnect.SessionKeyTerms { - /// The budget as DASH at full credit precision, e.g. "0.05 DASH". - var budgetText: String { - PlatformCreditsFormatter.dashString(budgetCredits) - } - - /// The lifetime in whole days. - var lifetimeDays: Int { - Int(lifetime / (24 * 60 * 60)) - } -} diff --git a/DashWallet/Sources/Models/DashConnect/DashConnectStore.swift b/DashWallet/Sources/Models/DashConnect/DashConnectStore.swift index 0bd2b0cc1a..4e2431e1d4 100644 --- a/DashWallet/Sources/Models/DashConnect/DashConnectStore.swift +++ b/DashWallet/Sources/Models/DashConnect/DashConnectStore.swift @@ -139,7 +139,7 @@ final class UserDefaultsDashConnectStore: DashConnectStore { url: row.url, status: row.status, updatedAt: row.updatedAt, - loginKind: row.loginKind ?? .twoQR + seenOn: Set(row.seenOn ?? []) ) ) } @@ -165,7 +165,7 @@ final class UserDefaultsDashConnectStore: DashConnectStore { url: $0.url, status: $0.status, updatedAt: $0.updatedAt, - loginKind: $0.loginKind == .twoQR ? nil : $0.loginKind + seenOn: $0.seenOn.isEmpty ? nil : $0.seenOn.sorted() ) } @@ -191,9 +191,8 @@ final class UserDefaultsDashConnectStore: DashConnectStore { let url: String let status: ConnectionStatus let updatedAt: Date - /// Absent for a two-QR connection, which is every row written before - /// the one-QR login existed. - let loginKind: DashConnectLoginKind? + /// Absent in rows written before it was kept. + let seenOn: [String]? } private static func base58Decode(_ string: String) -> Data? { diff --git a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift index da43343054..5433ce6170 100644 --- a/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift +++ b/DashWallet/Sources/Models/DashConnect/PlatformDashConnectDataSource.swift @@ -66,13 +66,8 @@ enum DashConnectPlatformError: LocalizedError, Equatable { case authorizationCancelled case authorizationFailed case randomGenerationFailed(OSStatus) - case invalidHash160 case noAuthenticationKey case existingDocumentLookupFailed - case noApprovedConnectionAwaitingKeyRegistration - case keyRegistrationWrongIdentity - case keyRegistrationUnexpectedMutation - case keyRegistrationMismatchedDerivedKey(KeyPurpose) case tokenPurchaseWrongIdentity case tokenPurchaseTokenIdMismatch case unsupportedStateTransition(String) @@ -84,17 +79,16 @@ enum DashConnectPlatformError: LocalizedError, Equatable { case loginUnresolved case grantNotRecorded case noFreeKeyId - case otherIdentitiesNotChecked - case registrationPending case appConnectEncryptionKeyChanged case appConnectKeysOutOfDate case appConnectKeysUnreadable - case registrationPendingOnAnotherIdentity case walletChanged case ephemeralKeyGenerationFailed - case ambiguousKeyRegistrationConnection - case devnetLoginContractNotConfigured case loginContractUnavailable + case tooManyKeysToReplace + case tooManyKeysToAdd + case intentsUnreadable + case identityReadBehind var errorDescription: String? { switch self { @@ -116,24 +110,12 @@ enum DashConnectPlatformError: LocalizedError, Equatable { return NSLocalizedString("Authentication failed", comment: "DashConnect") case .randomGenerationFailed(let status): return "Failed to generate secure random bytes for DashConnect (\(status))." - case .invalidHash160: - return "Failed to compute the app ephemeral public key hash." case .noAuthenticationKey: return "No enabled AUTHENTICATION ECDSA key is available for this identity." case .existingDocumentLookupFailed: - return "The existing loginKeyResponse document could not be located for replacement." - case .noApprovedConnectionAwaitingKeyRegistration: - return "There is no login awaiting key registration — scan the app's login QR first." - case .keyRegistrationWrongIdentity: - return "The scanned key-registration transition targets a different identity." - case .keyRegistrationUnexpectedMutation: - return "The scanned key-registration transition does more than add the expected login keys." + return "The loginKeyResponse document on Platform could not be read." case .ephemeralKeyGenerationFailed: return "Could not generate an ephemeral DashConnect key." - case .ambiguousKeyRegistrationConnection: - return "Could not tell which approved app this login belongs to. Scan the app's QR code again." - case .keyRegistrationMismatchedDerivedKey(let purpose): - return "The scanned key-registration transition adds a \(purpose.name) key we did not derive." case .tokenPurchaseWrongIdentity: return "The scanned token purchase targets a different identity." case .tokenPurchaseTokenIdMismatch: @@ -152,19 +134,7 @@ enum DashConnectPlatformError: LocalizedError, Equatable { comment: "DashConnect") case .grantNotRecorded: return NSLocalizedString( - "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key.", - comment: "DashConnect") - case .otherIdentitiesNotChecked: - return NSLocalizedString( - "The app's keys on this identity are off, but this wallet could not check its other identities. Try again.", - comment: "DashConnect") - case .registrationPending: - return NSLocalizedString( - "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again.", - comment: "DashConnect") - case .registrationPendingOnAnotherIdentity: - return NSLocalizedString( - "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it.", + "This wallet could not save the approval, so nothing was sent. Try again.", comment: "DashConnect") case .appConnectKeysOutOfDate: return NSLocalizedString( @@ -200,12 +170,24 @@ enum DashConnectPlatformError: LocalizedError, Equatable { "This wallet cannot approve the scanned request (%@).", comment: "DashConnect: the placeholder is the kind of the scanned state transition"), kindName) - case .devnetLoginContractNotConfigured: - return NSLocalizedString( - "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings.", - comment: "DashConnect") case .loginContractUnavailable: return "The DashConnect login contract is not available on this network." + case .identityReadBehind: + return NSLocalizedString( + "The network answered with an older copy of your identity. Try again in a moment.", + comment: "DashConnect") + case .intentsUnreadable: + return NSLocalizedString( + "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again.", + comment: "DashConnect") + case .tooManyKeysToAdd: + return NSLocalizedString( + "This app asks for more keys than one approval can add. Ask the app to ask for fewer.", + comment: "DashConnect App Connect v2") + case .tooManyKeysToReplace: + return NSLocalizedString( + "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again.", + comment: "DashConnect App Connect v2") } } @@ -234,47 +216,6 @@ enum DashConnectPlatformError: LocalizedError, Equatable { } } -struct DashConnectLoginKeyResponseDraft: Equatable { - let properties: [String: AnyHashable] - let walletEphemeralPublicKey: Data - let encryptedPayload: Data -} - -struct DashConnectKeyRegistrationKey: Equatable { - let keyId: UInt32 - let keyType: KeyType - let purpose: KeyPurpose - let securityLevel: SecurityLevel - let publicKeyData: Data - let contractBounds: ContractBounds? - /// Protocol 14 limits the scanned transition put on the key. Carried so - /// the rebuilt registration grants exactly what was asked for. - var totalBudget: UInt64? = nil - var expiresAt: UInt64? = nil -} - -struct DashConnectKeyRegistrationTransition: Equatable { - let identityId: Data - let addPublicKeys: [DashConnectKeyRegistrationKey] - let disablePublicKeyIds: [UInt32] -} - -/// The two keys a `dash-st:` transition was allowed to add, once every check -/// passed, paired with the app contract id they were derived against. -struct DashConnectKeyRegistrationValidationResult: Equatable { - let appContractId: Data - let authenticationKey: DashConnectKeyRegistrationKey - let encryptionKey: DashConnectKeyRegistrationKey -} - -private struct DashConnectKeyRegistrationDerivedMaterial { - var loginKey: Data - var authenticationPrivateKey: Data - let authenticationPublicKeyHash160: Data - var encryptionPrivateKey: Data - let encryptionPublicKey: Data -} - /// A token direct purchase parsed out of a `dash-st:` transition: what the /// approval sheet must show, and what `tokenPurchase(...)` is rebuilt from /// after the user approves it. @@ -292,7 +233,6 @@ struct DashConnectTokenPurchaseTransition: Equatable { /// One `dash-st:` payload reduced to app-level types, discriminated by the /// kind of state transition it carried. enum DashConnectParsedStateTransition: Equatable { - case keyRegistration(DashConnectKeyRegistrationTransition) case tokenPurchase(DashConnectTokenPurchaseTransition) } @@ -319,47 +259,6 @@ struct PlatformWalletDashConnectStateTransitionParser: DashConnectStateTransitio func parse(_ transitionBytes: Data) throws -> DashConnectParsedStateTransition { let transition = try parseTransition(transitionBytes) switch transition.kind { - case .identityUpdate(let parsed): - return .keyRegistration( - DashConnectKeyRegistrationTransition( - identityId: parsed.identityId, - addPublicKeys: try parsed.addPublicKeys.map { key in - DashConnectKeyRegistrationKey( - keyId: key.keyId, - keyType: key.keyType, - purpose: key.purpose, - securityLevel: key.securityLevel, - publicKeyData: key.pubkeyBytes, - contractBounds: try key.contractBounds.map { - switch $0 { - case .singleContract(let id): - return .singleContract(id: id) - case .singleContractDocumentType(let id, let documentTypeName): - return .singleContractDocumentType( - id: id, - documentTypeName: documentTypeName - ) - case .contractGroup: - // The wallet layer reports a contract-group bound since the - // SDK's #4800, and the DPP-layer `ContractBounds` this maps - // into has no case for it (dashpay/platform#4853). Dropping - // the bound is not an option here: the value decides which - // approved app a key registration belongs to, and it is also - // rebuilt into the `IdentityPubkey` handed back to - // `updateIdentity(...)`, so a silently weakened bound would - // mean signing a transition the dApp did not ask for. A key - // bound to a contract group is never one of the login keys - // this flow derives, so refuse the transition instead. - throw DashConnectPlatformError.keyRegistrationUnexpectedMutation - } - }, - totalBudget: key.totalBudget, - expiresAt: key.expiresAt - ) - }, - disablePublicKeyIds: parsed.disablePublicKeyIds - ) - ) case .batch(let batch): // The SDK now describes every batch, where it used to refuse all // but a lone token direct purchase. The approval sheet and the @@ -386,7 +285,7 @@ struct PlatformWalletDashConnectStateTransitionParser: DashConnectStateTransitio totalAgreedPrice: totalAgreedPrice ) ) - case .creditTransfer, .dataContractCreate, .dataContractUpdate, .other: + case .identityUpdate, .creditTransfer, .dataContractCreate, .dataContractUpdate, .other: throw DashConnectPlatformError.unsupportedStateTransition(transition.kindName) } } @@ -418,14 +317,14 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { var stores: Stores } - /// The connection rows and grant records of one wallet. A context carries + /// The connection rows and App Connect intents of one wallet. A context carries /// the pair fixed to its own wallet: the stores follow the active wallet, /// and an operation that waits on the network or a PIN prompt must still /// write to the wallet whose identity it changed. private struct Stores { let walletIdHex: String let connections: any DashConnectStore - let grants: any AppConnectResponseStore + let intents: any AppConnectIntentStore /// Where the network is reached, as configured when the pair was /// made; `nil` on a network with one fixed set of nodes. let endpoint: String? @@ -472,20 +371,14 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { subsystem: "org.dashfoundation.dash", category: "dashconnect.platform-data-source") - /// The pinned TESTNET `loginKeyResponse` contract id. Compile-time - /// constant, so the length check can never fire at runtime. - static let testnetLoginKeyExchangeContractId: Data = { - guard let data = Data.identifier(fromBase58: "7UaqHGBJBbRLJ4fUWS45cnud8PPUugJWoGTt1SKwHJ2P"), - data.count == 32 else { - fatalError("DashConnect loginKeyResponse contract id must be a 32-byte identifier.") - } - return data - }() static let loginKeyExchangeDocumentType = "loginKeyResponse" private let supportedNetwork: DashConnectNetwork private let store: any DashConnectStore - private let responseStore: any AppConnectResponseStore + private let intentStore: any AppConnectIntentStore + /// 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: [:]) private let subject: CurrentValueSubject<[DAppConnection], Never> private let shownRows: ShownRows private let operationGate: DashConnectOperationGate @@ -528,7 +421,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { init( supportedNetwork: DashConnectNetwork = PlatformDashConnectDataSource.currentEnvironmentNetwork(), store: (any DashConnectStore)? = nil, - responseStore: (any AppConnectResponseStore)? = nil, + intentStore: (any AppConnectIntentStore)? = nil, activeWalletIdHex: @escaping () -> String? = { WalletEnvironment.activeWalletIdHex as String? }, authorizer: DWIdentityAuthorizer = DWIdentityAuthorizer(), stateTransitionParser: any DashConnectStateTransitionParsing = PlatformWalletDashConnectStateTransitionParser(), @@ -543,7 +436,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { "DashConnect Platform publish runs on testnet and devnet only.") self.supportedNetwork = supportedNetwork self.store = store ?? UserDefaultsDashConnectStore(network: supportedNetwork) - self.responseStore = responseStore ?? UserDefaultsAppConnectResponseStore(network: supportedNetwork) + self.intentStore = intentStore ?? UserDefaultsAppConnectIntentStore(network: supportedNetwork) self.authorizer = authorizer self.stateTransitionParser = stateTransitionParser self.now = now @@ -555,7 +448,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { ?? (supportedNetwork == .devnet ? { DevnetConfiguration.quorumURL } : { nil }) self.networkEndpoint = networkEndpoint let active = Self.pinnedStores( - walletIdHex: activeWalletIdHex(), store: self.store, responseStore: self.responseStore, + walletIdHex: activeWalletIdHex(), store: self.store, intentStore: self.intentStore, endpoint: networkEndpoint()) self.shownRows = ShownRows(scope: active?.scope) self.subject = CurrentValueSubject(active.map { $0.published($0.connections.load()) } ?? []) @@ -596,10 +489,12 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { appConnect: uri)) } + // A `dash-key:` request other than v2. One that parses as v1 is on + // the right network and is refused; any other is malformed or newer. if DashConnectUri.isKeyUri(trimmed) { let request = try DashConnectUri.parseKeyRequest(trimmed) try validateNetwork(request.network) - return .login(request) + throw AppConnect.v1Refusal } if DashConnectUri.isStUri(trimmed) { @@ -635,7 +530,15 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { ) } - let existingConnection = rows(in: context.stores).first { $0.id == fallback.appContractId } + // A row there only for keys another identity's read saw is no + // connection of this identity. + let me = context.identityId.toBase58String() + let ownIntent = context.stores.intents.load().contains { + $0.appId.toBase58String() == fallback.appContractId && $0.identityId == context.identityId && $0.closedAt == nil + } + let existingConnection = rows(in: context.stores).first { + $0.id == fallback.appContractId && ($0.seenOn.isEmpty || $0.seenOn.contains(me) || ownIntent) + } // Which login this network gets is settled here, so the sheet can // show what the app is given. With the version unknown the request @@ -653,10 +556,17 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { protocolVersion = nil unresolvedLoginReason = error.localizedDescription } - var login = protocolVersion.map(AppConnect.login(protocolVersion:)) ?? .unresolved + var login: AppConnect.Login = loginRequest.appConnect == nil ? .refused(AppConnect.v1Refusal) : .unresolved if let appConnect = loginRequest.appConnect, let protocolVersion { (login, unresolvedLoginReason) = await appConnectLogin( appConnect, protocolVersion: protocolVersion, context: context) + // A request this wallet already took is spent (it is answered + // at most once): the sheet says so before any PIN is asked. + if let plan = login.grantPlan, context.stores.intents.load().contains(where: { + $0.appId == plan.appId && $0.requestHash == plan.appEphemeralPubKeyHash + }) { + login = .refused(Self.spentRequest(after: nil)) + } } return ConnectionRequest( @@ -672,7 +582,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { ) } - /// One approval, key registration or disconnect at a time for the active + /// One approval or disconnect at a time for the active /// wallet, whichever data source it came through. The turn is for the /// wallet that was active when it was asked for: if another one is /// active when it comes, the operation does not start. @@ -736,52 +646,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } } - /// The ids among `contractIds` and `groupIds` of the contracts and the - /// contract groups whose owner is the owner of `contractId`, which is - /// itself among the contracts returned. One the network proves absent - /// is not; any other failure to read throws, and so does a contract - /// with no readable owner: nothing can then be said of what it owns. - /// TODO(app-connect-v2-owner-lookup): a contract this build can never - /// read (a format newer than its SDK) fails the same way on every try, - /// so a disconnect that has to look it up keeps the row until the app - /// is updated. - private static func ownedByOwner( - of contractId: Data, - contractIds: Set, - groupIds: Set, - sdk: SDK - ) async throws -> (contracts: Set, groups: Set) { - guard !contractIds.isEmpty || !groupIds.isEmpty else { return ([contractId], []) } - func ownerId(_ object: [String: Any]) -> Data? { - (object["ownerId"] as? String ?? object["$ownerId"] as? String).flatMap(decodeIdentifier) - } - guard let appOwnerId = ownerId(try await sdk.dataContractGetOffMain(id: contractId.toBase58String())) else { - throw DashConnectPlatformError.loginContractUnavailable - } - var contracts: Set = [contractId] - for id in contractIds { - do { - if ownerId(try await sdk.dataContractGetOffMain(id: id.toBase58String())) == appOwnerId { contracts.insert(id) } - } catch SDKError.notFound { - continue - } - } - var groups: Set = [] - for id in groupIds { - do { - if ownerId(try await sdk.getContractGroupInfo(contractGroupId: id.toBase58String())) == appOwnerId { - groups.insert(id) - } - } catch SDKError.notFound { - continue - } - } - return (contracts, groups) - } - - /// Reads the owners and document types wallet rule 3 compares from - /// Platform through `readContract` and `readGroup`. An app contract the - /// network proves absent refuses the request; a contract or group the + /// 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 /// off the main actor (`dataContractGetOffMain`; `getContractGroupInfo` @@ -896,7 +761,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { throw error } // The sheet was resolved for one identity of one wallet on one - // network, and either login acts for that identity: it has to be + // network, and the login acts for that identity: it has to be // the active one here, and again after the PIN prompt. The same // wallet and identity under another devnet name is not what was // shown. @@ -905,40 +770,23 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { Self.logger.error("🔗 DASHCONNECT :: the approved sign-in was resolved for another identity, wallet or network") throw DashConnectPlatformError.approvalOutOfDate } - // Which login this network can answer is decided before the PIN - // prompt: from protocol version 14 the response goes to the App - // Connect system contract and the wallet registers the key itself; - // below it that contract does not exist and the two-QR flow runs. - // No network is pinned (`SwiftDashSDKHost.platformVersion(for:)` is - // 0), so the version comes from the current epoch: testnet runs 14 - // and gets the one-QR login. + // The sheet showed the plan `makeConnectionRequest` resolved for + // this request. The network has to still take App Connect. + guard let appConnect = request.appConnect, let plan = consent.login.grantPlan else { + throw DashConnectPlatformError.approvalOutOfDate + } let protocolVersion: UInt32 do { protocolVersion = try await Self.networkProtocolVersion(sdk: context.sdk, network: context.network) } catch { - // The wallet cannot tell any more whether the login the sheet - // offered is the one this network gets. Nothing was signed. + // The wallet cannot tell any more whether the network takes the + // login the sheet offered. Nothing was signed. Self.logger.error("🔗 DASHCONNECT :: protocol version unknown — \(error.localizedDescription, privacy: .public)") throw DashConnectPlatformError.loginUnresolved } - // The sheet showed the login `makeConnectionRequest` resolved, with - // its terms for the one-QR login. If the network now gets the other - // one, what was approved is not what would run. - let login = AppConnect.login(protocolVersion: protocolVersion) - // A v2 request was approved with the plan the sheet showed. It has - // to be the plan for this request, and the network has to still take - // App Connect. - let approvedLogin: Bool - if let appConnect = request.appConnect { - guard let plan = consent.login.grantPlan else { - throw DashConnectPlatformError.approvalOutOfDate - } - let requestHash = try KeyExchangeCrypto.hash160(appConnect.request.appEphemeralPubKey) - approvedLogin = AppConnect.isAvailable(protocolVersion: protocolVersion) - && plan.appEphemeralPubKeyHash == requestHash - } else { - approvedLogin = consent.login == login - } + let requestHash = try KeyExchangeCrypto.hash160(appConnect.request.appEphemeralPubKey) + let approvedLogin = AppConnect.isAvailable(protocolVersion: protocolVersion) + && plan.appEphemeralPubKeyHash == requestHash guard approvedLogin else { Self.logger.error("🔗 DASHCONNECT :: the network now answers with another login than the one approved") throw DashConnectPlatformError.approvalOutOfDate @@ -957,105 +805,8 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } catch DashConnectPlatformError.walletChanged { throw DashConnectPlatformError.approvalOutOfDate } - if let appConnect = request.appConnect, let plan = consent.login.grantPlan { - Self.logger.info("🔗 DASHCONNECT :: authorized; App Connect request v2") - return try await approveAppConnectV2Login(appConnect, plan: plan, consent: consent, context: context) - } - if let terms = login.sessionKeyTerms { - Self.logger.info("🔗 DASHCONNECT :: authorized; protocol \(protocolVersion, privacy: .public), one-QR login") - return try await approveAppConnectLogin(request, consent: consent, terms: terms, context: context) - } - Self.logger.info("🔗 DASHCONNECT :: authorized; deriving login key") - - // `deriveIdentityAuthKeyAtSlot` is main-actor isolated in the SDK. - var chainKey = try await MainActor.run { - try context.wallet.deriveIdentityAuthKeyAtSlot( - identityIndex: context.identityIndex, - keyId: UInt32(LoginKeyDerivation.defaultKeyIndex), - network: context.network - ).privateKeyData - } - defer { Self.zero(&chainKey) } - - var loginKey = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: context.identityId, - appContractId: request.contractId - ) - defer { Self.zero(&loginKey) } - - var walletEphemeralPrivateKey = try Self.generateEphemeralPrivateKey() - let draft = try Self.buildLoginKeyResponseDraft( - loginKey: loginKey, - appContractId: request.contractId, - appEphemeralPubKey: request.appEphemeralPubKey, - walletEphemeralPrivateKey: &walletEphemeralPrivateKey - ) - - let signer = KeychainSigner(modelContainer: context.modelContainer) - let propertiesJSON = try Self.makeJSONObjectString(from: draft.properties) - - // Whether this identity already published a login-key response for this - // app is a question about state, so it is answered by asking. Matching - // substrings in the error text instead would break the moment the SDK - // rewords or localizes a message, and "duplicate" also matches unique- - // index failures that have nothing to do with this document. - // Step markers: everything between `approveLogin started` and the - // finish was silent, so a stall anywhere in derive → write → preview - // was indistinguishable from a stall in any other step. - Self.logger.info("🔗 DASHCONNECT :: writing loginKeyResponse document") - try await writeLoginKeyResponseDocument( - context: context, - appContractId: request.contractId, - propertiesJSON: propertiesJSON, - signer: signer - ) - Self.logger.info("🔗 DASHCONNECT :: loginKeyResponse document written") - - let preview = await makeConnectionRequest(from: request) - Self.logger.info("🔗 DASHCONNECT :: connection preview resolved") - let connection: DAppConnection - do { - var derivedMaterial = try Self.deriveKeyRegistrationMaterial( - chainKeyPrivateBytes: chainKey, - identityId: context.identityId, - appContractId: request.contractId - ) - defer { - Self.zero(&derivedMaterial.loginKey) - Self.zero(&derivedMaterial.authenticationPrivateKey) - Self.zero(&derivedMaterial.encryptionPrivateKey) - } - - let currentPublicKeys = try context.wallet - .managedIdentity(identityId: context.identityId) - .getPublicKeys() - // The `dash-st:` registration happens once per (identity, app): - // after it, the app stops emitting that QR. So the status reflects - // whether the derived login keys are on the identity, not which - // step of the flow just ran. - if Self.hasRegisteredLoginKeys( - authenticationPublicKeyHash160: derivedMaterial.authenticationPublicKeyHash160, - encryptionPublicKey: derivedMaterial.encryptionPublicKey, - currentIdentityPublicKeys: currentPublicKeys - ) { - connection = Self.makeConnection(preview: preview, status: .active, updatedAt: now()) - } else { - connection = Self.makeConnection(preview: preview, status: .approved, updatedAt: now()) - } - } catch { - Self.logger.error( - "🔗 DASHCONNECT :: could not confirm registered login keys after approveLogin — \(error.localizedDescription, privacy: .public)" - ) - // Conservative fallback: asking for a QR is safer than claiming the - // registration is already on the identity when we could not verify it. - connection = Self.makeConnection(preview: preview, status: .approved, updatedAt: now()) - } - - await updateRows(in: context.stores) { rows in - rows.filter { $0.id != connection.id } + [connection] - } - return connection + Self.logger.info("🔗 DASHCONNECT :: authorized; App Connect request v2") + return try await approveAppConnectV2Login(appConnect, plan: plan, consent: consent, context: context) } /// The protocol version a login is chosen by. An SDK pinned to a @@ -1071,348 +822,131 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { return try await DashConnectPlatformQueries.currentEpochProtocolVersion(sdk: sdk) } - /// The one-QR login: derive the request's session key, register it on the - /// identity with its bounds and limits, and only then publish the - /// encrypted key, so the app finds a live key on its first check. - /// - /// A new key's grant is recorded, unconfirmed, before its registration - /// is submitted, so a key that lands without the update confirming is - /// still found later. Once the key is known to be on the identity the - /// grant is confirmed and the connection row recorded, from what the - /// approved sheet showed and with no network read between the two, before - /// the publish: whatever happens to the publish, the key stays visible in - /// Connections and can be disabled. A row lost between the two writes is - /// put back by the next one-QR approval with this identity, or by a - /// disconnect of one of its apps once the PIN is entered. - /// TODO(dashconnect-lost-row): nothing puts it back at launch or when - /// Connections opens, so until then the key is live with no row. - /// - /// Approving the same QR again finds the key registered and does not - /// register it twice; if the response is already recorded as published it - /// does nothing more. - private func approveAppConnectLogin( - _ request: DashKeyRequest, - consent: ConnectionRequest, - terms: AppConnect.SessionKeyTerms, + /// One read of the active identity: its keys from Platform, their bounds + /// from the wallet's key store. A read behind one already seen in this + /// process comes from a node that is behind, and throws + /// `identityReadBehind`. + private func identitySnapshot( context: Context - ) async throws -> DAppConnection { - guard let responseContractId = Self.decodeIdentifier(AppConnect.contractId) else { - throw DashConnectPlatformError.loginContractUnavailable - } - let stores = context.stores - guard stores.grants.canPersist else { - throw DashConnectPlatformError.grantStoreUnavailable - } - - let requestId = AppConnect.requestId(appEphemeralPubKey: request.appEphemeralPubKey) - // `deriveConnectKey` is main-actor isolated in the SDK. Only the two - // buffers leave the closure, so the private key below is the sole - // owner of its storage and the deferred wipe reaches the real bytes. - var (sessionPublicKey, sessionPrivateKey) = try await MainActor.run { - let key = try context.wallet.deriveConnectKey( - subFeature: .sessionAuthentication, - identityId: context.identityId, - leaf: requestId, - network: context.network - ) - return (key.publicKeyData, key.privateKeyData) - } - defer { Self.zero(&sessionPrivateKey) } - let sessionKeyHash160 = try KeyExchangeCrypto.hash160(sessionPublicKey) - - var walletEphemeralPrivateKey = try Self.generateEphemeralPrivateKey() - let sealed = try AppConnect.seal( - sessionPrivateKey, - appEphemeralPubKey: request.appEphemeralPubKey, - walletEphemeralPrivateKey: &walletEphemeralPrivateKey - ) - - let identityId = context.identityId.toBase58String() - let appContractId = request.contractId.toBase58String() - let requestHash = sealed.appEphemeralPubKeyHash.toHexString() - let signer = KeychainSigner(modelContainer: context.modelContainer) - let currentPublicKeys = try await refreshedIdentityPublicKeys(context: context) - await confirmRegistrations( - identityId: identityId, currentIdentityPublicKeys: currentPublicKeys, - modelContainer: context.modelContainer, in: stores) - func isGrantForRequest(_ grant: AppConnectGrant) -> Bool { - grant.identityId == identityId && grant.appContractId == appContractId - && grant.values.appEphemeralPubKeyHash == requestHash - } - - // Read only for a key that is already on the identity. If the store - // cannot be read, such a key needs a grant record instead. - var bindings: [AppConnect.KeyBinding] = [] - var grantedKeyIds: Set = [] - if currentPublicKeys.contains(where: { $0.keyType == .ecdsaHash160 && $0.data == sessionKeyHash160 }) { - bindings = (try? Self.storedKeyBindings( - identityId: identityId, modelContainer: context.modelContainer)) ?? [] - // An unconfirmed record is not evidence of the key's bound: it - // only says what was submitted. - grantedKeyIds = Set(stores.grants.load() - .filter { isGrantForRequest($0) && !$0.isUnconfirmed }.map(\.sessionKeyId)) - } - - let sessionKeyId: UInt32 - var totalBudget: UInt64? - var expiresAt: UInt64? - switch AppConnect.sessionKeyState( - publicKeyHash160: sessionKeyHash160, - currentIdentityPublicKeys: currentPublicKeys, - appContractId: request.contractId, - bindings: bindings, - grantedKeyIds: grantedKeyIds, - terms: terms, - now: now() - ) { - case .unusable: - throw DashConnectPlatformError.sessionKeyUnusable - case .usable(let keyId): - Self.logger.info("🔗 DASHCONNECT :: session key already registered") - sessionKeyId = keyId - let registered = currentPublicKeys.first { UInt32(bitPattern: $0.keyId) == keyId } - totalBudget = registered?.totalBudget - expiresAt = registered?.expiresAt.map { UInt64(max(0, $0)) } - case .absent: - guard let keyId = AppConnect.nextKeyId(currentIdentityPublicKeys: currentPublicKeys) else { - throw DashConnectPlatformError.noFreeKeyId - } - let budget = terms.budgetCredits - let expiry = terms.expiresAt(from: now()) - let key = AppConnect.sessionIdentityPubkey( - keyId: keyId, - publicKeyHash160: sessionKeyHash160, - appContractId: request.contractId, - totalBudget: budget, - expiresAt: expiry - ) - // Recorded before the update is submitted: an update can land - // and still report a failure, and a key with no record could not - // be found again. The record stays unconfirmed, with no row, - // until the key is seen on the identity. - var pending = AppConnectGrant( - identityId: identityId, - appContractId: appContractId, - documentId: nil, - values: AppConnect.ResponseValues(sealed), - sessionKeyId: keyId, - totalBudget: budget, - expiresAt: expiry, - publishedAt: now() - ) - pending.unconfirmedKeyHash160 = sessionKeyHash160.toHexString() - // The record names one above the revision the wallet holds for the - // identity now. - // TODO(app-connect-broadcast-outcome): the SDK builds the update - // from its own cached identity, which a reload after this read can - // move, and does not report the revision it signed. The update can - // then land above the recorded revision, and a disconnect that - // reads the identity at the recorded revision takes a registration - // still on its way for one that can no longer land. - let revisionBefore = try context.wallet.managedIdentity(identityId: context.identityId).getRevision() - pending.submittedRevision = revisionBefore == .max ? nil : revisionBefore + 1 - // A confirmed record for this request means its key is on the - // identity, and a view without it is behind: registering again - // would be refused, and the record must keep its values. - guard !stores.grants.load().contains(where: { - isGrantForRequest($0) && !$0.isUnconfirmed && $0.keyDisabled != true - }) else { - throw DashConnectPlatformError.identityKeysOutOfDate - } - updateGrants(in: stores) { grants in - grants.removeAll { $0.key == pending.key } - grants.append(pending) - } - guard stores.grants.load().contains(where: { $0.key == pending.key }) else { - Self.logger.error("🔗 DASHCONNECT :: the session key could not be recorded; not registering it") - throw DashConnectPlatformError.grantStoreUnavailable - } - Self.logger.info("🔗 DASHCONNECT :: registering session key") - do { - try await signer.withAdditionalSigningKeys([ - (publicKey: sessionKeyHash160, privateKey: sessionPrivateKey), - ]) { - try await context.wallet.updateIdentity( - identityId: context.identityId, - addPublicKeys: [key], - signer: signer - ) - } - } catch { - // Another update of the identity that landed meanwhile moved - // the wallet's revision, and this one may have been built on - // it: the record names the higher of the two, which only - // makes a disconnect wait longer for the outcome. - if let revisionAfter = try? context.wallet - .managedIdentity(identityId: context.identityId).getRevision(), - revisionAfter > revisionBefore, revisionAfter < .max { - updateGrants(in: stores) { grants in - guard let index = grants.firstIndex(where: { $0.key == pending.key }) else { return } - grants[index].submittedRevision = revisionAfter + 1 - } - pending.submittedRevision = revisionAfter + 1 - } - // The update may have landed all the same. If the key is on - // the identity, the login goes on; otherwise the failure - // stands and the record stays unconfirmed, to be confirmed if - // the key turns up later, or dropped by a disconnect once the - // update can no longer land. - guard let keys = try? await refreshedIdentityPublicKeys(context: context), - let bindings = try? Self.storedKeyBindings( - identityId: identityId, modelContainer: context.modelContainer), - AppConnect.holdsRecordedKey(pending, currentIdentityPublicKeys: keys, bindings: bindings) else { - Self.logger.error("🔗 DASHCONNECT :: session key registration failed or is unconfirmed — \(error.localizedDescription, privacy: .public)") - throw error - } - Self.logger.info("🔗 DASHCONNECT :: session key is on the identity although the update reported a failure") - } - Self.logger.info("🔗 DASHCONNECT :: session key registered") - sessionKeyId = keyId - totalBudget = budget - expiresAt = expiry - } - - // From here the app-side key exists on the identity. Confirm its - // record, and show the connection, before anything else can fail. A - // grant already recorded for this request keeps its values: if an - // earlier publish landed without confirming, those are the ones on - // Platform. - let grant = updateGrants(in: stores) { grants -> AppConnectGrant in - if let index = grants.firstIndex(where: { isGrantForRequest($0) && $0.sessionKeyId == sessionKeyId }) { - // The key is on the identity now. - grants[index].unconfirmedKeyHash160 = nil - return grants[index] - } - let new = AppConnectGrant( - identityId: identityId, - appContractId: appContractId, - documentId: nil, - values: AppConnect.ResponseValues(sealed), - sessionKeyId: sessionKeyId, - totalBudget: totalBudget, - expiresAt: expiresAt, - publishedAt: now() - ) - grants.append(new) - return new - } - - let connection = Self.makeConnection( - preview: consent, status: .active, updatedAt: now(), loginKind: .oneQR) - await updateRows(in: stores) { rows in - rows.filter { $0.id != connection.id } + [connection] - } - - try await publishAppConnectResponse( - grant: grant, - appEphemeralPubKeyHash: sealed.appEphemeralPubKeyHash, - responseContractId: responseContractId, - context: context, - signer: signer - ) - return connection + ) async throws -> (snapshot: AppConnect.IdentitySnapshot, keys: [ManagedIdentity.IdentityPublicKeyInfo]) { + let (keys, revision) = try await refreshedIdentityKeysAndRevision(context: context) + let bindings = try Self.storedKeyBindings( + identityId: context.identityId.toBase58String(), modelContainer: context.modelContainer) + let read = AppConnect.IdentitySnapshot( + identityId: context.identityId, + revision: revision, + keys: keys.map { key in + AppConnect.platformKey(key, binding: bindings.first { $0.keyId == UInt32(bitPattern: key.keyId) }) + }, + // TODO(dashconnect-platform-time): proved block time arrives with + // dashpay/platform#5715; until the app pins it no key is judged + // expired. + platformTime: nil) + let newest = Self.newestSnapshots.withLock { $0[context.identityId] } + guard read.mayReplace(newest) else { + // The SDK's copy of the identity is now that older one too, so + // nothing is built on it: the user tries again. + Self.logger.error("🔗 DASHCONNECT :: the identity read is behind one already seen") + throw DashConnectPlatformError.identityReadBehind + } + Self.newestSnapshots.withLock { $0[context.identityId] = read } + return (read, keys) + } + + /// Reads, changes and writes the intents in one step, from the store each + /// time. Every caller runs inside `gated`, so no other operation of this + /// wallet writes them in between. + @discardableResult + private func updateIntents(in stores: Stores, _ change: (inout [AppConnect.ConnectionIntent]) -> T) -> T { + var intents = stores.intents.load() + let result = change(&intents) + stores.intents.save(intents) + return result } - /// Publishes the response a grant records, once its keys are on the - /// identity and the grant and its connection row are recorded. Shared by - /// the one-QR login and App Connect request v2. - private func publishAppConnectResponse( - grant: AppConnectGrant, - appEphemeralPubKeyHash: Data, - responseContractId: Data, - context: Context, - signer: KeychainSigner - ) async throws { + /// 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 identityId = grant.identityId - let appContractId = grant.appContractId - let requestHash = grant.values.appEphemeralPubKeyHash - - // The store was writable when the login started. If the record did - // not land all the same, a response published now could not be found - // again. The key is live, so the row above stays: a disconnect finds - // the key by its contract bound. - guard stores.grants.load().contains(where: { $0.key == grant.key }) else { - Self.logger.error("🔗 DASHCONNECT :: the session key was registered but its record could not be saved") - throw DashConnectPlatformError.grantNotRecorded - } - - // A response deleted by a later login to this app is published again - // when its own request comes back. - guard !grant.hasDeletableResponse else { - Self.logger.info("🔗 DASHCONNECT :: response already published for this request") - return - } - - // Besides this app's earlier responses, this takes whatever an earlier - // disconnect of any app left behind for this identity: its row is - // gone, so a login is the only moment left to finish that cleanup. - await deleteAppConnectResponses( - where: { - guard $0.identityId == identityId else { return false } - return $0.keyDisabled == true - || ($0.appContractId == appContractId && $0.values.appEphemeralPubKeyHash != requestHash) - }, - responseContractId: responseContractId, - context: context, - signer: signer - ) - - // Recorded before the publish is submitted: a response this record - // had as deleted may be back on Platform after a publish that fails - // to confirm, and a disconnect must then look for it. - updateGrants(in: stores) { grants in - guard let index = grants.firstIndex(where: { $0.key == grant.key }) else { return } - grants[index].markPublishStarted() - } - - Self.logger.info("🔗 DASHCONNECT :: publishing loginKeyResponse") - let documentId: Data - var publishedValues = grant.values - do { - (documentId, _) = try await context.wallet.createDocument( - ownerIdentityId: context.identityId, - contractId: responseContractId, - documentType: AppConnect.documentType, - propertiesJSON: try grant.values.propertiesJSON(), - signer: signer - ) - Self.logger.info("🔗 DASHCONNECT :: loginKeyResponse published") - } catch { - // A publish can land without confirming, and the response is - // unique per request and identity, so the retry is then refused. - // If the response is there, this login is complete; if it is not, - // or that cannot be told, the failure stands. - guard let published = try? await findAppConnectResponse( - ownerIdentityId: context.identityId, - appEphemeralPubKeyHash: appEphemeralPubKeyHash, - responseContractId: responseContractId, - sdk: context.sdk - ) else { - throw error - } - Self.logger.info("🔗 DASHCONNECT :: loginKeyResponse was already published") - documentId = published.documentId - publishedValues = published.values - } - - updateGrants(in: stores) { grants in - guard let index = grants.firstIndex(where: { $0.key == grant.key }) else { return } - grants[index].documentId = documentId.toBase58String() - grants[index].values = publishedValues + let all = stores.intents.load() + let projection = AppConnect.project([snapshot], intents: all) + 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) + } + } + + /// `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, + /// has none, unless another identity's intents hold it or its last read + /// saw keys there no approval names (`seenOn`). While the read has a key + /// whose bound is unknown, that key may be any app's: no row goes, so + /// each keeps its Disconnect until a read places every key. + static func rows( + _ rows: [DAppConnection], + after projection: AppConnect.Projection, + of identityId: Data, + intents elsewhere: [AppConnect.ConnectionIntent], + at updatedAt: Date + ) -> [DAppConnection] { + let me = identityId.toBase58String() + func shownStatus(_ status: AppConnect.IntentStatus) -> ConnectionStatus? { + switch status { + case .active, .expired: return .active + case .confirming: return .confirming + case .disconnected, .neverLanded: return nil + } + } + let shownIds = Set(projection.connections.filter { shownStatus($0.status) != nil }.map { $0.appId.toBase58String() }) + // An App Connect row stands for intents: it stays only while another + // identity's intents hold it, since this read says nothing of them. + let heldElsewhere = Set(elsewhere.map { $0.appId.toBase58String() }) + let hasUnplacedKey = projection.unplacedKeyIds[identityId]?.isEmpty == false + var result: [DAppConnection] = rows.compactMap { row in + guard !shownIds.contains(row.id) else { return nil } + if hasUnplacedKey { return row } + var seenOn = row.seenOn + seenOn.remove(me) + if heldElsewhere.contains(row.id) { return DAppConnection(row, seenOn: seenOn) } + // Live keys seen on another identity: that is the access left. + guard !seenOn.isEmpty else { return nil } + return DAppConnection(row, status: .active, seenOn: seenOn, at: row.status == .active ? row.updatedAt : updatedAt) + } + for connection in projection.connections { + let id = connection.appId.toBase58String() + guard var status = shownStatus(connection.status) else { continue } + if status == .active && connection.isUndelivered { status = .undelivered } + let existing = rows.first { $0.id == id } + let latest = connection.intents.first + let fallback = DashConnectFallbackAppMetadata.resolve(contractId: id, unauthenticatedLabel: "") + let name = latest?.appLabel ?? existing?.name ?? fallback.name + var seenOn = existing?.seenOn ?? [] + seenOn.remove(me) + if connection.unrecordedKeyIds[identityId]?.isEmpty == false { seenOn.insert(me) } + result.removeAll { $0.id == id } + result.append(DAppConnection( + id: id, + name: name.isEmpty ? NSLocalizedString("Unknown app", comment: "DashConnect") : name, + url: latest?.appUrl ?? existing?.url ?? fallback.url, + status: status, + updatedAt: existing?.status == status ? existing?.updatedAt ?? updatedAt : updatedAt, + seenOn: seenOn)) } + return result } /// App Connect request v2 (Yappr `docs/APP_CONNECT_PROFILE.md`): one key /// per auth binding, the identity's encryption key for the app, and the /// previous grant on the same connection disabled, all in one - /// MASTER-signed identity update; then the grant and the connection row - /// are recorded and the sealed response is published, as for the one-QR - /// login. + /// MASTER-signed identity update; then the sealed response is published + /// once the keys show. /// - /// Approving the same request again finds its keys registered and - /// recorded, registers nothing and publishes the recorded response if it - /// is not on Platform yet. + /// The intent is written before the update is submitted and names every + /// key it adds, so whatever happens to the update, the keys are found + /// and can be turned off. A request is answered at most once: approving + /// it again after it stopped is refused, and the app asks anew. private func approveAppConnectV2Login( _ uri: AppConnectUri, plan: AppConnect.GrantPlan, @@ -1423,213 +957,467 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { throw DashConnectPlatformError.loginContractUnavailable } let stores = context.stores - guard stores.grants.canPersist else { + guard stores.intents.canPersist else { throw DashConnectPlatformError.grantStoreUnavailable } + guard !stores.intents.hasUnreadableRows(identityId: context.identityId) else { + throw DashConnectPlatformError.intentsUnreadable + } // The app stops looking for an answer ten minutes after it asked. guard uri.request.age(now: now()) == .fresh else { throw AppConnect.Refusal(.stale, NSLocalizedString( "This sign-in request has expired. Ask the app for a new one.", comment: "DashConnect App Connect v2")) } - let request = uri.request - let identityId = context.identityId.toBase58String() - let appId = plan.appId.toBase58String() - let requestHash = plan.appEphemeralPubKeyHash.toHexString() - let connectionId = plan.connectionId?.toHexString() - func isGrantForRequest(_ grant: AppConnectGrant) -> Bool { - grant.identityId == identityId && grant.appContractId == appId - && grant.values.appEphemeralPubKeyHash == requestHash - } - - // `deriveConnectKey` is main-actor isolated in the SDK. Only the two - // buffers leave the closure, so the arrays below own the private keys - // and the deferred wipe reaches the real bytes. - var authKeys: [(publicKeyHash160: Data, privateKey: Data)] = [] - // Per encryption grant, every key this wallet derives for it - // (`AppConnect.derivableEncryptionKeys`): rotation 0' first. - var encryptionKeys: [[AppConnect.DerivedEncryptionKey]] = [] - defer { - for index in authKeys.indices { Self.zero(&authKeys[index].privateKey) } - for grant in encryptionKeys.indices { - for index in encryptionKeys[grant].indices { Self.zero(&encryptionKeys[grant][index].privateKey) } - } - } - for grant in plan.auth { - let leaf = AppConnect.authKeyLeaf( - appEphemeralPubKey: request.appEphemeralPubKey, bindingIndex: grant.bindingIndex) - let (publicKey, privateKey) = try await MainActor.run { - let key = try context.wallet.deriveConnectKey( - subFeature: .sessionAuthentication, - identityId: context.identityId, - leaf: leaf, - network: context.network - ) - return (key.publicKeyData, key.privateKeyData) - } - authKeys.append((try KeyExchangeCrypto.hash160(publicKey), privateKey)) + // A request is answered at most once, by any identity of the wallet: + // approving it again is refused, whether the first attempt answered + // it or stopped. A sealed response is never published by a later + // attempt, as what it was sealed for may no longer hold. The app asks + // again. + guard !stores.intents.load().contains(where: { + $0.appId == plan.appId && $0.requestHash == plan.appEphemeralPubKeyHash + }) else { + throw Self.spentRequest(after: nil) } - + let request = uri.request let signer = KeychainSigner(modelContainer: context.modelContainer) - // The app's current encryption keys are a second read, from Platform. - // Wallet rule 3 puts every encryption key on the app's contract. The - // first read runs while the identity's keys are fetched, in a task of - // its own, so a login that fails before it is needed does not wait - // for it. - let encryptionPurposes = Set(plan.encryption.map(\.keyPurpose)).sorted { $0.rawValue < $1.rawValue } - let sdk = context.sdk - func readCurrentKeys() async throws -> [KeyPurpose: AppConnect.CurrentContractKey] { - guard !encryptionPurposes.isEmpty else { return [:] } - let response = try await DashConnectPlatformQueries.identityContractKeys( - sdk: sdk, identityId: identityId, contractId: appId, purposes: encryptionPurposes) - var keys: [KeyPurpose: AppConnect.CurrentContractKey] = [:] - for purpose in encryptionPurposes { - keys[purpose] = try AppConnect.currentContractKey( - from: response, identityId: identityId, purpose: purpose) - } - return keys + let (read, currentPublicKeys) = try await identitySnapshot(context: context) + // From here on the read the intent was made from: a fence reads again. + let (intent, snapshot) = try await newAppConnectIntent( + request: request, plan: plan, consent: consent, snapshot: read, + currentPublicKeys: currentPublicKeys, context: context) + updateIntents(in: stores) { $0.append(intent) } + guard stores.intents.load().contains(where: { $0.id == intent.id }) else { + throw DashConnectPlatformError.grantNotRecorded } - let firstCurrentKeysRead = Task { try await readCurrentKeys() } - defer { firstCurrentKeysRead.cancel() } - let currentPublicKeys = try await refreshedIdentityPublicKeys(context: context) - let bindings = try Self.storedKeyBindings(identityId: identityId, modelContainer: context.modelContainer) - // Which rotations to derive depends on the keys the identity has. - for grant in plan.encryption { - encryptionKeys.append(try await MainActor.run { - try Self.derivableEncryptionKeys( - for: grant, wallet: context.wallet, identityId: context.identityId, - network: context.network, currentIdentityPublicKeys: currentPublicKeys) - }) + // The row goes with the intent, before anything is submitted: however + // the update ends, the user can turn the connection off. + await refreshRows(from: snapshot, context: context) + do { + try await submitAndPublish( + intent, request: request, plan: plan, snapshot: snapshot, responseContractId: responseContractId, + context: context, signer: signer) + } catch { + // The request is spent from here on: the row shows where it + // stopped, and the app asks again. + await settle(after: intent, responseContractId: responseContractId, context: context, signer: signer) + throw Self.spentRequest(after: error) } + await settle(after: intent, responseContractId: responseContractId, context: context, signer: signer) + return Self.connection(consent: consent, at: now()) + } - // An auth key already on the identity at a binding's derived payload - // is this request answered before: the payload comes from the - // request's ephemeral key and the binding's index, and the store - // has to show the key bound exactly as the binding asks, within the - // plan's terms. It is sent again, sealed to that ephemeral key, so - // only the app holding its private key can read it. A key bound - // otherwise fails closed; Platform never re-adds a key, so the app - // then has to ask again. A key may be live without a record: an - // update that landed after this wallet stopped waiting for it. - var authKeyIds: [UInt32?] = try zip(plan.auth, authKeys).map { grant, key in - guard let existing = currentPublicKeys.first(where: { - $0.keyType == .ecdsaHash160 && $0.data == key.publicKeyHash160 - }) else { return nil } - let keyId = UInt32(bitPattern: existing.keyId) - guard AppConnect.canResendAuthKey( - existing, for: grant, - binding: bindings.first { $0.keyId == keyId && $0.data == existing.data }, - now: now() - ) else { - throw DashConnectPlatformError.sessionKeyUnusable - } - return keyId - } - // A grant already recorded for this request must name exactly these - // keys: its response carries them. A key recorded for another app or - // request is that one's, and must not be taken over. - let reused = Set(authKeyIds.compactMap { $0 }) - if !reused.isEmpty { - let grants = stores.grants.load().filter { $0.identityId == identityId } - if let recorded = grants.first(where: isGrantForRequest), - Set(recorded.keyIds) != reused || authKeyIds.contains(nil) { - throw DashConnectPlatformError.sessionKeyUnusable + /// After an approval ends, however it ended: the earlier grants of the + /// connection whose keys are off are done, and their responses go with + /// them; the rows follow a fresh read. + private func settle( + after intent: AppConnect.ConnectionIntent, responseContractId: Data, context: Context, signer: KeychainSigner + ) async { + let stores = context.stores + guard let read = try? await identitySnapshot(context: context).snapshot else { + // The row is put right by the next read, at the latest when + // Connections opens. + Self.logger.info("🔗 DASHCONNECT :: identity not read after the approval; its row is refreshed later") + return + } + let superseded = intent.connectionId.map { connectionId in + stores.intents.load().filter { + $0.id != intent.id && $0.identityId == context.identityId && $0.appId == intent.appId + && $0.connectionId == connectionId + && $0.closedAt == nil && [.disconnected, .neverLanded].contains(AppConnect.status(of: $0, in: read)) } - if grants.contains(where: { !isGrantForRequest($0) && !reused.isDisjoint(with: $0.keyIds) }) { - throw DashConnectPlatformError.sessionKeyUnusable + } ?? [] + let ids = Set(superseded.map(\.id)) + if !ids.isEmpty { + let closedAt = now() + updateIntents(in: stores) { intents in + for index in intents.indices where ids.contains(intents[index].id) { intents[index].closedAt = closedAt } } } + let toDelete = ids.union(AppConnect.responsesLeft(identityId: context.identityId, intents: stores.intents.load())) + if !toDelete.isEmpty { + await deleteResponses(of: Array(toDelete), responseContractId: responseContractId, context: context, signer: signer) + } + await refreshRows(from: read, context: context) + } - // Wallet rule 7 (DIP "Encryption Keys"): re-send the identity's - // current key for the app when this wallet derives it, at any - // rotation or (testnet and devnet) the path without one; register - // rotation 0' only when the identity has no key for the app at all; - // leave the slot out otherwise. Which key is current is Platform's to say: - // the app's verifier checks the slot against the same proved read. - // An answer this build cannot read reads the same on every try. - func isUnreadableAnswer(_ error: Error) -> Bool { - if let sdkError = error as? SDKError, case .serializationError = sdkError { return true } - return false - } - // An answer this build cannot read is a refusal the app hears as - // `unsupported`, like a contract it cannot read. - func failedRead(_ error: Error) -> Error { - Self.logger.error("🔗 DASHCONNECT :: the app's current encryption keys could not be read — \(error.localizedDescription, privacy: .public)") - guard isUnreadableAnswer(error) else { return DashConnectPlatformError.appConnectKeysUnreadable } - return AppConnect.Refusal(.unsupported, NSLocalizedString( - "This version of the wallet cannot read the network's answer about your identity's encryption key for this app. Update the wallet.", - comment: "DashConnect App Connect v2")) + /// Submits the new intent's update and publishes its sealed response, + /// once a read shows the update and the keys it carries still hold. + private func submitAndPublish( + _ intent: AppConnect.ConnectionIntent, + request: AppConnectRequest, + plan: AppConnect.GrantPlan, + snapshot: AppConnect.IdentitySnapshot, + responseContractId: Data, + context: Context, + signer: KeychainSigner + ) async throws { + let landed = try await submitIntent( + intent, request: request, plan: plan, snapshot: snapshot, context: context, signer: signer) + let stores = context.stores + guard stores.intents.load().first(where: { $0.id == intent.id })?.closedAt == nil else { + throw DashConnectPlatformError.sessionKeyUnusable + } + // The response carries the keys' secrets. Its keys may hold no more + // than the sheet showed, none may have been turned off meanwhile, and + // each encryption key must still be the app's current one. The + // identity is read again for it, until a read shows the update (a node + // may be behind); when none does, nothing is published. A read that + // already showed the update is the one checked: what it saw stands, + // as a later read may be behind and show less. + let current: AppConnect.IdentitySnapshot + if let landed { + current = landed + } else { + current = try await readShowingUpdate(of: intent, context: context) } - // A node one block behind has usually caught up within a second; - // one that has not gets longer. - func pause(_ attempt: Int) async { - try? await Task.sleep(nanoseconds: attempt == 1 ? 1_000_000_000 : 3_000_000_000) + guard AppConnect.landedKeysWithinPlan(intent, plan, in: current), + AppConnect.authKeysUsable(intent, in: current) else { + throw DashConnectPlatformError.sessionKeyUnusable } - // A first read that fails is tried again, as a later one would be. - var firstRead: [KeyPurpose: AppConnect.CurrentContractKey]? - var firstReadFailure: Error? - do { - firstRead = try await firstCurrentKeysRead.value - } catch { - firstReadFailure = error + guard AppConnect.encryptionKeysUsable(intent, in: current), + try await encryptionKeysAreCurrent(of: intent, in: current, context: context) else { + throw DashConnectPlatformError.appConnectEncryptionKeyChanged } - for attempt in 1 ... 2 where firstRead == nil && !(firstReadFailure.map(isUnreadableAnswer) ?? false) { - await pause(attempt) - do { - firstRead = try await readCurrentKeys() - } catch { - firstReadFailure = error + try await publishResponse(of: intent, responseContractId: responseContractId, context: context, signer: signer) + } + + /// Records the response of each open intent whose keys are live but + /// whose response this wallet did not record publishing: a publish can + /// land without confirming, and its row would show "Not delivered". + private func recordPublishedResponses(in snapshot: AppConnect.IdentitySnapshot, context: Context) async { + guard let responseContractId = Self.decodeIdentifier(AppConnect.contractId) else { return } + // A publish lands within the approval that made it, minutes after + // the request; an intent a day old has nothing more to find. + let since = now().addingTimeInterval(-24 * 60 * 60) + let unrecorded = context.stores.intents.load().filter { intent in + guard intent.identityId == snapshot.identityId, intent.closedAt == nil, intent.responseDocumentId == nil, + intent.createdAt > since, case .active = AppConnect.status(of: intent, in: snapshot) else { return false } + return true + } + guard !unrecorded.isEmpty else { return } + let identityId = context.identityId + let sdk = context.sdk + let found = await withTaskGroup(of: (UUID, Data)?.self) { group in + for intent in unrecorded { + group.addTask { + guard let published = try? await Self.findAppConnectResponse( + ownerIdentityId: identityId, appEphemeralPubKeyHash: intent.requestHash, + responseContractId: responseContractId, sdk: sdk) else { return nil } + return (intent.id, published.documentId) + } + } + return await group.reduce(into: [UUID: Data]()) { found, pair in + if let pair { found[pair.0] = pair.1 } } } - guard let currentKeys = firstRead else { - throw failedRead(firstReadFailure ?? DashConnectPlatformError.appConnectKeysUnreadable) + guard !found.isEmpty else { return } + Self.logger.info("🔗 DASHCONNECT :: \(found.count, privacy: .public) response(s) published without confirming were found") + for (id, documentId) in found { recordResponse(documentId, of: id, in: context.stores) } + } + + /// A read of the identity that shows `intent`'s update (`hasLanded`). A + /// node may be behind: reads a few seconds apart are tried, and when none + /// shows it `identityReadBehind`, or the read's failure, is thrown. + private func readShowingUpdate( + of intent: AppConnect.ConnectionIntent, context: Context + ) async throws -> AppConnect.IdentitySnapshot { + var readFailure: Error? + for attempt in 0 ... 2 { + if attempt > 0 { await Self.pauseForLaggingNode(attempt) } + do { + let read = try await identitySnapshot(context: context).snapshot + readFailure = nil + if AppConnect.hasLanded(intent, in: read) { return read } + } catch { + Self.logger.error("🔗 DASHCONNECT :: identity not read while looking for the update — \(error.localizedDescription, privacy: .public)") + readFailure = error + } + } + if let readFailure { throw readFailure } + Self.logger.error("🔗 DASHCONNECT :: no read shows the identity update") + throw DashConnectPlatformError.identityReadBehind + } + + /// The error of a request that cannot be approved again: what stopped + /// it, when that says something the user can act on, and that the app has + /// to ask anew. A refusal with the `failed` status, so the sheet offers no + /// Approve and the app is told the request failed. Causes whose own text + /// would advise trying again are logged, not shown. + private static func spentRequest(after cause: Error?) -> AppConnect.Refusal { + let spent = DashConnectPlatformError.sessionKeyUnusable.localizedDescription + guard let cause else { return AppConnect.Refusal(.failed, spent) } + logger.error("🔗 DASHCONNECT :: the request is spent — \(cause.localizedDescription, privacy: .public)") + // A refusal says what to do itself (update the wallet, for one). + if let refusal = cause as? AppConnect.Refusal { return refusal } + let platformError = cause as? DashConnectPlatformError + // Its own text already sends the user to the app. + if platformError == .appConnectEncryptionKeyChanged { return AppConnect.Refusal(.failed, cause.localizedDescription) } + let retrying: [DashConnectPlatformError] = [ + .sessionKeyUnusable, .identityReadBehind, .approvalOutOfDate, .appConnectKeysOutOfDate, .appConnectKeysUnreadable, + .walletChanged, .identityKeysOutOfDate, + ] + if cause is CancellationError || platformError.map(retrying.contains) == true { + return AppConnect.Refusal(.failed, spent) + } + return AppConnect.Refusal(.failed, "\(cause.localizedDescription) \(spent)") + } + + /// The row an answered approval shows. + private static func connection(consent: ConnectionRequest, at updatedAt: Date) -> DAppConnection { + DAppConnection( + id: consent.appContractId, + name: consent.appLabel.isEmpty ? NSLocalizedString("Unknown app", comment: "DashConnect") : consent.appLabel, + url: consent.appUrl, + status: .active, + updatedAt: updatedAt) + } + + /// The intent of a new approval: the keys it adds under ids no key or + /// intent of the identity holds, the earlier keys of the same connection + /// it turns off, and the response, sealed now. With it comes the read + /// the intent was made from: the read after a fence, when it fenced. + private func newAppConnectIntent( + request: AppConnectRequest, + plan: AppConnect.GrantPlan, + consent: ConnectionRequest, + snapshot: AppConnect.IdentitySnapshot, + currentPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], + context: Context + ) async throws -> (intent: AppConnect.ConnectionIntent, snapshot: AppConnect.IdentitySnapshot) { + let stores = context.stores + var authKeys = try await deriveAuthKeys(request: request, plan: plan, context: context) + defer { for index in authKeys.indices { Self.zero(&authKeys[index].privateKey) } } + // A derived key already on the identity with no intent of this + // request: an answer this wallet no longer has a record of. Platform + // never adds a key twice, so the app has to ask again. + guard !authKeys.contains(where: { key in currentPublicKeys.contains { $0.data == key.publicKeyHash160 } }) else { + throw DashConnectPlatformError.sessionKeyUnusable } - func states(_ currentKeys: [KeyPurpose: AppConnect.CurrentContractKey]) throws -> [AppConnect.EncryptionKeyState] { - try plan.encryption.enumerated().map { index, grant in - guard let rule = plan.currentKeyRules[grant.keyPurpose] else { - throw DashConnectPlatformError.approvalOutOfDate + var encryption = try await encryptionSlots(plan: plan, currentPublicKeys: currentPublicKeys, context: context) + defer { for index in encryption.indices { Self.zero(&encryption[index].privateKey) } } + + // Wallet rule 8: this connection's earlier grants go in the same + // update. More than one update can turn off is refused before + // anything is written. An earlier grant whose update may still land + // is fenced first, so it cannot add keys this one replaces. + let intents = stores.intents.load() + let supersession = plan.connectionId.map { connectionId in + AppConnect.disconnectPlan( + appId: plan.appId, snapshot: snapshot, + intents: intents.filter { $0.connectionId == connectionId }, + includeUnrecorded: false) + } ?? AppConnect.DisconnectPlan() + let superseded = supersession.disable + guard superseded.count <= AppConnect.maxKeysDisabledPerUpdate else { + throw DashConnectPlatformError.tooManyKeysToReplace + } + let newCount = authKeys.count + encryption.filter { $0.keyId == nil }.count + guard newCount <= AppConnect.maxKeysAddedPerUpdate else { + throw DashConnectPlatformError.tooManyKeysToAdd + } + var snapshot = snapshot + if !supersession.fence.isEmpty { + try await fenceAndDisable( + AppConnect.DisconnectPlan(fence: supersession.fence), context: context, + signer: KeychainSigner(modelContainer: context.modelContainer)) + snapshot = try await identitySnapshot(context: context).snapshot + let fenced = snapshot + let closedAt = now() + updateIntents(in: stores) { intents in + for index in intents.indices where intents[index].closedAt == nil + && intents[index].identityId == context.identityId + && AppConnect.status(of: intents[index], in: fenced) == .neverLanded { + intents[index].closedAt = closedAt } - return AppConnect.encryptionKeyState( - derivedPublicKeys: encryptionKeys[index].map(\.publicKey), - purpose: grant.keyPurpose, - contractId: grant.binding.contractId, - rule: rule, - currentKey: currentKeys[grant.keyPurpose], - currentIdentityPublicKeys: currentPublicKeys, - bindings: bindings) } } - // A state that holds only if Platform's read is not behind holds - // once a read a few seconds later says the same, and one that is out - // of date may be Platform's read catching up. - let keyStates: [AppConnect.EncryptionKeyState] - do { - keyStates = try await AppConnect.settle( - currentKeys: currentKeys, - states: states, - reread: readCurrentKeys, - pause: pause, - isFinal: isUnreadableAnswer) + + guard var ids = AppConnect.newKeyIds(count: newCount, snapshot: snapshot, intents: intents)?.makeIterator() else { + throw DashConnectPlatformError.noFreeKeyId + } + var keys: [AppConnect.IntendedKey] = [] + for (grant, key) in zip(plan.auth, authKeys) { + guard let id = ids.next() else { throw DashConnectPlatformError.noFreeKeyId } + keys.append(AppConnect.IntendedKey( + id: id, purpose: .authentication, securityLevel: grant.securityLevel, keyType: .ecdsaHash160, + data: key.publicKeyHash160, readOnly: false, bound: grant.storedBound, + totalBudget: grant.totalBudget, expiresAt: grant.expiresAt)) + } + for index in encryption.indices where encryption[index].keyId == nil { + guard let id = ids.next() else { throw DashConnectPlatformError.noFreeKeyId } + let grant = plan.encryption[encryption[index].grantIndex] + let pubkey = AppConnect.encryptionIdentityPubkey(grant, keyId: id, publicKey: encryption[index].publicKey) + keys.append(AppConnect.IntendedKey( + id: id, purpose: pubkey.purpose, securityLevel: pubkey.securityLevel, keyType: pubkey.keyType, + data: pubkey.pubkeyBytes, readOnly: pubkey.readOnly, + bound: pubkey.contractBounds.map(AppConnect.storedBound(of:)), + totalBudget: nil, expiresAt: nil)) + encryption[index].keyId = id + } + + // Slots: the auth keys in request order, then the encryption keys + // that are sent. + var slots = authKeys.map(\.privateKey) + encryption.map(\.privateKey) + defer { for index in slots.indices { Self.zero(&slots[index]) } } + var walletEphemeralPrivateKey = try Self.generateEphemeralPrivateKey() + defer { Self.zero(&walletEphemeralPrivateKey) } + let response = AppConnect.ResponseValues( + appEphemeralPubKeyHash: plan.appEphemeralPubKeyHash.toHexString(), + walletEphemeralPubKey: try Secp256k1.compressedPublicKey(privateKey: walletEphemeralPrivateKey).toHexString(), + encryptedPayload: try KeyExchangeCrypto.encryptAppConnectSlots( + slots, + walletEphemeralPriv: walletEphemeralPrivateKey, + appEphemeralPub: request.appEphemeralPubKey, + ownerId: context.identityId + ).toHexString() + ) + let added = Set(keys.map(\.id)) + let intent = AppConnect.ConnectionIntent( + id: UUID(), + identityId: context.identityId, + appId: plan.appId, + appLabel: consent.appLabel, + appUrl: consent.appUrl, + requestHash: plan.appEphemeralPubKeyHash, + connectionId: plan.connectionId, + keys: keys, + sentEncryptionKeyIds: encryption.compactMap(\.keyId).filter { !added.contains($0) }, + disables: superseded, + response: response, + responseDocumentId: nil, + responseRemoved: false, + createdAt: now(), + closedAt: nil) + return (intent, snapshot) + } + + /// The auth keys of `plan`, derived from the request: the same keys on + /// every try of one request. + private func deriveAuthKeys( + request: AppConnectRequest, + plan: AppConnect.GrantPlan, + context: Context + ) async throws -> [(publicKeyHash160: Data, privateKey: Data)] { + var keys: [(publicKeyHash160: Data, privateKey: Data)] = [] + do { + for grant in plan.auth { + let leaf = AppConnect.authKeyLeaf( + appEphemeralPubKey: request.appEphemeralPubKey, bindingIndex: grant.bindingIndex) + // `deriveConnectKey` is main-actor isolated in the SDK. Only + // the two buffers leave the closure. + let (publicKey, derivedPrivateKey) = try await MainActor.run { + let key = try context.wallet.deriveConnectKey( + subFeature: .sessionAuthentication, identityId: context.identityId, leaf: leaf, network: context.network) + return (key.publicKeyData, key.privateKeyData) + } + var privateKey = derivedPrivateKey + defer { Self.zero(&privateKey) } + keys.append((try KeyExchangeCrypto.hash160(publicKey), privateKey)) + } + } catch { + for index in keys.indices { Self.zero(&keys[index].privateKey) } + throw error + } + return keys + } + + /// One encryption slot of a response: the grant it answers, the key it + /// carries and that key's id, nil until the update that adds it is + /// built. + private struct EncryptionSlotKey { + let grantIndex: Int + let publicKey: Data + var privateKey: Data + var keyId: UInt32? + } + + /// Wallet rule 7 (DIP "Encryption Keys"): re-send the identity's current + /// key for the app when this wallet derives it, at any rotation or + /// (testnet and devnet) the path without one; register rotation 0' only + /// when the identity has no key for the app at all; leave the slot out + /// otherwise. Which key is current is Platform's to say: the app's + /// verifier checks the slot against the same proved read. + private func encryptionSlots( + plan: AppConnect.GrantPlan, + currentPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], + context: Context + ) async throws -> [EncryptionSlotKey] { + guard !plan.encryption.isEmpty else { return [] } + let identityId = context.identityId.toBase58String() + let appId = plan.appId.toBase58String() + let sdk = context.sdk + let purposes = Set(plan.encryption.map(\.keyPurpose)).sorted { $0.rawValue < $1.rawValue } + func readCurrentKeys() async throws -> [KeyPurpose: AppConnect.CurrentContractKey] { + try await Self.readCurrentContractKeys(sdk: sdk, identityId: identityId, appId: appId, purposes: purposes) + } + + var derived: [[AppConnect.DerivedEncryptionKey]] = [] + defer { + for grant in derived.indices { + for index in derived[grant].indices { Self.zero(&derived[grant][index].privateKey) } + } + } + for grant in plan.encryption { + derived.append(try await MainActor.run { + try Self.derivableEncryptionKeys( + for: grant, wallet: context.wallet, identityId: context.identityId, + network: context.network, currentIdentityPublicKeys: currentPublicKeys) + }) + } + let bindings = try Self.storedKeyBindings(identityId: identityId, modelContainer: context.modelContainer) + + var firstRead: [KeyPurpose: AppConnect.CurrentContractKey]? + var failure: Error? + for attempt in 0 ... 2 where firstRead == nil && !(failure.map(Self.isUnreadableAnswer) ?? false) { + if attempt > 0 { await Self.pauseForLaggingNode(attempt) } + do { firstRead = try await readCurrentKeys() } catch { failure = error } + } + guard let currentKeys = firstRead else { + throw Self.failedCurrentKeyRead(failure ?? DashConnectPlatformError.appConnectKeysUnreadable) + } + func states(_ currentKeys: [KeyPurpose: AppConnect.CurrentContractKey]) throws -> [AppConnect.EncryptionKeyState] { + try plan.encryption.enumerated().map { index, grant in + guard let rule = plan.currentKeyRules[grant.keyPurpose] else { + throw DashConnectPlatformError.approvalOutOfDate + } + return AppConnect.encryptionKeyState( + derivedPublicKeys: derived[index].map(\.publicKey), + purpose: grant.keyPurpose, + contractId: grant.binding.contractId, + rule: rule, + currentKey: currentKeys[grant.keyPurpose], + currentIdentityPublicKeys: currentPublicKeys, + bindings: bindings) + } + } + // A state that holds only if Platform's read is not behind holds + // once a read a few seconds later says the same. + let keyStates: [AppConnect.EncryptionKeyState] + do { + keyStates = try await AppConnect.settle( + currentKeys: currentKeys, states: states, reread: readCurrentKeys, pause: Self.pauseForLaggingNode, + isFinal: Self.isUnreadableAnswer) } catch let error as DashConnectPlatformError { throw error } catch let refusal as AppConnect.Refusal { throw refusal } catch { - throw failedRead(error) + throw Self.failedCurrentKeyRead(error) } - // `keyIndex` is the grant, `derivedIndex` the key among its - // derivable keys that the slot sends. - var encryptionSlots: [(keyIndex: Int, derivedIndex: Int, keyId: UInt32?)] = [] + var slots: [EncryptionSlotKey] = [] for (index, state) in keyStates.enumerated() { switch AppConnect.encryptionSlot( - for: state, - derivedPublicKeys: encryptionKeys[index].map(\.publicKey), - currentIdentityPublicKeys: currentPublicKeys + for: state, derivedPublicKeys: derived[index].map(\.publicKey), currentIdentityPublicKeys: currentPublicKeys ) { case .send(let keyId, let derivedIndex): - encryptionSlots.append((index, derivedIndex, keyId)) + slots.append(EncryptionSlotKey( + grantIndex: index, publicKey: derived[index][derivedIndex].publicKey, + privateKey: derived[index][derivedIndex].privateKey, keyId: keyId)) case .register: - encryptionSlots.append((index, 0, nil)) + slots.append(EncryptionSlotKey( + grantIndex: index, publicKey: derived[index][0].publicKey, + privateKey: derived[index][0].privateKey, keyId: nil)) case .omit: Self.logger.info("🔗 DASHCONNECT :: the app's encryption key on this identity is not this wallet's, or none is live; slot left out") case nil: @@ -1637,278 +1425,248 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { throw DashConnectPlatformError.appConnectKeysOutOfDate } } - // The keys no slot carries are wiped now, not after the update and - // the publish. - for grant in encryptionKeys.indices { - let sent = encryptionSlots.first { $0.keyIndex == grant }?.derivedIndex - for index in encryptionKeys[grant].indices where index != sent { - Self.zero(&encryptionKeys[grant][index].privateKey) - } - } + return slots + } - // A response recorded for this request carries the encryption keys - // the identity had then, and a retry sends that response again. If - // one of them has been disabled or replaced since, it would hand the - // app a key that is no longer the identity's: the retry stops here, - // before anything is registered. A record from before the ids were - // noted cannot be checked, and is refused the same way. - if let recorded = stores.grants.load().first(where: { isGrantForRequest($0) && !$0.isUnconfirmed }), - encryptionSlots.contains(where: { $0.keyId == nil }) - || recorded.encryptionKeyIds != encryptionSlots.compactMap(\.keyId) { - Self.logger.error("🔗 DASHCONNECT :: the recorded App Connect response carries encryption keys the identity no longer has") - throw DashConnectPlatformError.appConnectEncryptionKeyChanged + /// The current key Platform names for `identityId`, the app and each + /// purpose. + private static func readCurrentContractKeys( + sdk: SDK, identityId: String, appId: String, purposes: [KeyPurpose] + ) async throws -> [KeyPurpose: AppConnect.CurrentContractKey] { + let response = try await DashConnectPlatformQueries.identityContractKeys( + sdk: sdk, identityId: identityId, contractId: appId, purposes: purposes) + var keys: [KeyPurpose: AppConnect.CurrentContractKey] = [:] + for purpose in purposes { + keys[purpose] = try AppConnect.currentContractKey(from: response, identityId: identityId, purpose: purpose) } + return keys + } - // Wallet rule 8: this connection's previous grant goes in the same - // update. A key of it the fetched list lacks means the list is - // behind, and it could not be shown to be off. - func isSuperseded(_ grant: AppConnectGrant) -> Bool { - connectionId != nil && grant.identityId == identityId && grant.appContractId == appId - && grant.connectionId == connectionId && !isGrantForRequest(grant) - } - let superseded = stores.grants.load().filter(isSuperseded) - guard AppConnect.sessionKeyIdsMissing(from: currentPublicKeys, for: superseded).isEmpty else { - throw DashConnectPlatformError.identityKeysOutOfDate - } - let disable = Array(AppConnect.supersededKeyIds( - grants: superseded, - identityId: identityId, - appId: appId, - connectionId: connectionId, - keeping: reused, - currentIdentityPublicKeys: currentPublicKeys - ).prefix(AppConnect.maxKeysDisabledPerUpdate)) - // The grants whose every key is off once the update lands. - let liveAfterUpdate = Set(currentPublicKeys.filter(AppConnect.isLiveGrantedKey) - .map { UInt32(bitPattern: $0.keyId) }).subtracting(disable) - let retiredGrantKeys = Set(superseded.filter { !$0.keyIds.contains(where: liveAfterUpdate.contains) }.map(\.key)) - - let newKeyCount = authKeyIds.filter { $0 == nil }.count + encryptionSlots.filter { $0.keyId == nil }.count - guard var freeKeyIds = AppConnect.freeKeyIds(count: newKeyCount, currentIdentityPublicKeys: currentPublicKeys)? - .makeIterator() else { - throw DashConnectPlatformError.noFreeKeyId - } - var add: [ManagedPlatformWallet.IdentityPubkey] = [] - var signingKeys: [(publicKey: Data, privateKey: Data)] = [] - for (index, grant) in plan.auth.enumerated() where authKeyIds[index] == nil { - guard let keyId = freeKeyIds.next() else { throw DashConnectPlatformError.noFreeKeyId } - add.append(AppConnect.authIdentityPubkey( - grant, keyId: keyId, publicKeyHash160: authKeys[index].publicKeyHash160)) - signingKeys.append((authKeys[index].publicKeyHash160, authKeys[index].privateKey)) - authKeyIds[index] = keyId - } - for slot in encryptionSlots.indices where encryptionSlots[slot].keyId == nil { - guard let keyId = freeKeyIds.next() else { throw DashConnectPlatformError.noFreeKeyId } - let key = encryptionKeys[encryptionSlots[slot].keyIndex][encryptionSlots[slot].derivedIndex] - add.append(AppConnect.encryptionIdentityPubkey( - plan.encryption[encryptionSlots[slot].keyIndex], keyId: keyId, publicKey: key.publicKey)) - signingKeys.append((key.publicKey, key.privateKey)) - encryptionSlots[slot].keyId = keyId - } - defer { for index in signingKeys.indices { Self.zero(&signingKeys[index].privateKey) } } + /// An answer this build cannot read reads the same on every try. + private static func isUnreadableAnswer(_ error: Error) -> Bool { + if let sdkError = error as? SDKError, case .serializationError = sdkError { return true } + return false + } - if !add.isEmpty || !disable.isEmpty { - Self.logger.info( - "🔗 DASHCONNECT :: registering \(add.count, privacy: .public) key(s), disabling \(disable.count, privacy: .public)") + private static func failedCurrentKeyRead(_ error: Error) -> Error { + logger.error("🔗 DASHCONNECT :: the app's current encryption keys could not be read — \(error.localizedDescription, privacy: .public)") + guard isUnreadableAnswer(error) else { return DashConnectPlatformError.appConnectKeysUnreadable } + return AppConnect.Refusal(.unsupported, NSLocalizedString( + "This version of the wallet cannot read the network's answer about your identity's encryption key for this app. Update the wallet.", + comment: "DashConnect App Connect v2")) + } + + /// A node one block behind has usually caught up within a second; one + /// that has not gets longer. + private static func pauseForLaggingNode(_ attempt: Int) async { + try? await Task.sleep(nanoseconds: attempt == 1 ? 1_000_000_000 : 3_000_000_000) + } + + /// Whether each encryption key `intent`'s response carries is the one + /// Platform names current for the app and its purpose, and no key is + /// current yet for one it is still to register: the app's verifier + /// refuses any other. Another key current, or this one off, is a "no" + /// at once, whatever a later read says. No key current yet for one the + /// identity shows may be a node that is behind: it is read again, a key + /// one read showed current stays so, and one no read shows current + /// throws `appConnectKeysOutOfDate`. Throws the read's failure when no + /// read answered, or when an answer cannot be read. + private func encryptionKeysAreCurrent( + of intent: AppConnect.ConnectionIntent, in snapshot: AppConnect.IdentitySnapshot, context: Context + ) async throws -> Bool { + let expected = AppConnect.expectedCurrentEncryptionKeys(of: intent, in: snapshot) + guard !expected.isEmpty else { return true } + let identityId = context.identityId.toBase58String() + let purposes = expected.keys.sorted { $0.rawValue < $1.rawValue } + let all = expected.flatMap { purpose, keys in keys.map { (purpose, $0) } } + var matched = Set() + var answered = false + var failure: Error? + for attempt in 0 ... 2 { + if attempt > 0 { await Self.pauseForLaggingNode(attempt) } do { - try await signer.withAdditionalSigningKeys(signingKeys) { - try await context.wallet.updateIdentity( - identityId: context.identityId, - addPublicKeys: add, - disablePublicKeyIds: disable, - signer: signer - ) - } - } catch { - // An update can land without confirming, and the node asked - // next may not have it yet. If every new key shows up and - // every replaced key is off, it went through. - // Each new key has to be there as it was added, bound as the - // store reads it: a key under its id with the same payload - // but another bound is another request's, and is not sent. - func landed(_ keys: [ManagedIdentity.IdentityPublicKeyInfo], _ bindings: [AppConnect.KeyBinding]) -> Bool { - add.allSatisfy { new in keys.contains { key in - AppConnect.isAddedKey( - key, added: new, - binding: bindings.first { $0.keyId == new.keyId && $0.data == key.data }) - } } && disable.allSatisfy { id in keys.contains { - UInt32(bitPattern: $0.keyId) == id && $0.disabledAt != nil - } } - } - var confirmed = false - for attempt in 0 ..< 3 where !confirmed { - if attempt > 0 { try? await Task.sleep(nanoseconds: 3_000_000_000) } - if let refreshed = try? await refreshedIdentityPublicKeys(context: context), - let refreshedBindings = try? Self.storedKeyBindings( - identityId: identityId, modelContainer: context.modelContainer) { - confirmed = landed(refreshed, refreshedBindings) + let current = try await Self.readCurrentContractKeys( + sdk: context.sdk, identityId: identityId, appId: intent.appId.toBase58String(), purposes: purposes) + answered = true + for (index, (purpose, key)) in all.enumerated() { + switch AppConnect.check(current[purpose], against: key) { + case .differs: return false + case .matches: matched.insert(index) + case .notYet: break } } - guard confirmed else { throw error } - Self.logger.info("🔗 DASHCONNECT :: the identity update landed without confirming") + if matched.count == all.count { return true } + } catch { + failure = error + if Self.isUnreadableAnswer(error) { throw Self.failedCurrentKeyRead(error) } } - Self.logger.info("🔗 DASHCONNECT :: identity updated") } + if !answered, let failure { throw Self.failedCurrentKeyRead(failure) } + throw DashConnectPlatformError.appConnectKeysOutOfDate + } - // Slots: the auth keys in request order, then the encryption keys - // that are sent. - var slots = authKeys.map(\.privateKey) + encryptionSlots.map { encryptionKeys[$0.keyIndex][$0.derivedIndex].privateKey } - defer { for index in slots.indices { Self.zero(&slots[index]) } } - var walletEphemeralPrivateKey = try Self.generateEphemeralPrivateKey() - defer { Self.zero(&walletEphemeralPrivateKey) } - let values = AppConnect.ResponseValues( - appEphemeralPubKeyHash: requestHash, - walletEphemeralPubKey: try Secp256k1.compressedPublicKey(privateKey: walletEphemeralPrivateKey).toHexString(), - encryptedPayload: try KeyExchangeCrypto.encryptAppConnectSlots( - slots, - walletEphemeralPriv: walletEphemeralPrivateKey, - appEphemeralPub: request.appEphemeralPubKey, - ownerId: context.identityId - ).toHexString() - ) + /// Submits what of `intent` is not on the identity yet, and returns once + /// every key it adds shows and every key it turns off is off. An update + /// that reports a failure may still have landed: the identity is read + /// again, and if it does not show the intent the intent stays, shown as + /// confirming, and the failure stands. Returns the read that showed the + /// update when the update itself did not confirm, else nil. + private func submitIntent( + _ intent: AppConnect.ConnectionIntent, + request: AppConnectRequest, + plan: AppConnect.GrantPlan, + snapshot: AppConnect.IdentitySnapshot, + context: Context, + signer: KeychainSigner + ) async throws -> AppConnect.IdentitySnapshot? { + let missing = intent.keys.filter { AppConnect.presence(of: $0, in: snapshot) == .missing } + let disable = AppConnect.outstandingDisables(of: intent, in: snapshot) - // From here the keys are on the identity. Record them, and show the - // connection, before anything else can fail. The grants this one - // replaces are done: their keys are off. A grant already recorded - // for this request keeps its values: if an earlier publish landed - // without confirming, those are the ones on Platform. - let grantedKeyIds = authKeyIds.compactMap { $0 } - let sentEncryptionKeyIds = encryptionSlots.compactMap(\.keyId) - let primary = plan.auth[0] - let grant = updateGrants(in: stores) { grants -> AppConnectGrant in - AppConnect.markKeysDisabled(in: &grants) { retiredGrantKeys.contains($0.key) } - if let existing = grants.first(where: { isGrantForRequest($0) && $0.sessionKeyId == grantedKeyIds[0] }) { - return existing + // The private keys of the auth keys to add, derived again from the + // request, and of the encryption keys, from the wallet. + var signingKeys: [(publicKey: Data, privateKey: Data)] = [] + defer { for index in signingKeys.indices { Self.zero(&signingKeys[index].privateKey) } } + // Intent auth keys are in the order of the plan's bindings. + let bindingIndexes = Dictionary(uniqueKeysWithValues: zip(intent.authKeys.map(\.id), plan.auth.map(\.bindingIndex))) + for key in missing where key.isAuthentication { + guard let index = bindingIndexes[key.id] else { throw DashConnectPlatformError.approvalOutOfDate } + let leaf = AppConnect.authKeyLeaf(appEphemeralPubKey: request.appEphemeralPubKey, bindingIndex: index) + let (publicKey, derivedPrivateKey) = try await MainActor.run { + let derived = try context.wallet.deriveConnectKey( + subFeature: .sessionAuthentication, identityId: context.identityId, leaf: leaf, network: context.network) + return (derived.publicKeyData, derived.privateKeyData) + } + var privateKey = derivedPrivateKey + defer { Self.zero(&privateKey) } + guard try KeyExchangeCrypto.hash160(publicKey) == key.data else { throw DashConnectPlatformError.approvalOutOfDate } + signingKeys.append((key.data, privateKey)) + } + for key in missing where !key.isAuthentication { + guard let grant = plan.encryption.first(where: { + $0.keyPurpose == key.purpose && key.bound.map(AppConnect.contractId(of:)) == $0.binding.contractId + }) else { + throw DashConnectPlatformError.approvalOutOfDate } - let new = AppConnectGrant( - identityId: identityId, - appContractId: appId, - documentId: nil, - values: values, - sessionKeyId: grantedKeyIds[0], - totalBudget: primary.totalBudget, - expiresAt: primary.expiresAt, - publishedAt: now(), - additionalKeyIds: Array(grantedKeyIds.dropFirst()), - connectionId: connectionId, - encryptionKeyIds: sentEncryptionKeyIds - ) - grants.append(new) - return new + var candidates = try await MainActor.run { + try Self.derivableEncryptionKeys( + for: grant, wallet: context.wallet, identityId: context.identityId, + network: context.network, currentIdentityPublicKeys: try context.wallet + .managedIdentity(identityId: context.identityId).getPublicKeys()) + } + defer { for index in candidates.indices { Self.zero(&candidates[index].privateKey) } } + guard let match = candidates.first(where: { $0.publicKey == key.data }) else { + throw DashConnectPlatformError.approvalOutOfDate + } + signingKeys.append((key.data, match.privateKey)) } - let connection = Self.makeConnection( - preview: consent, status: .active, updatedAt: now(), loginKind: .oneQR) - await updateRows(in: stores) { rows in - rows.filter { $0.id != connection.id } + [connection] + Self.logger.info("🔗 DASHCONNECT :: registering \(missing.count, privacy: .public) key(s), disabling \(disable.count, privacy: .public)") + do { + try await signer.withAdditionalSigningKeys(signingKeys) { + try await context.wallet.updateIdentity( + identityId: context.identityId, + addPublicKeys: missing.map(AppConnect.identityPubkey(of:)), + disablePublicKeyIds: disable, + signer: signer) + } + } catch { + // The update may have landed without confirming. Its keys + // decide; nothing else does. + guard let read = try? await readShowingUpdate(of: intent, context: context) else { throw error } + Self.logger.info("🔗 DASHCONNECT :: the identity update landed without confirming") + return read } - - try await publishAppConnectResponse( - grant: grant, - appEphemeralPubKeyHash: plan.appEphemeralPubKeyHash, - responseContractId: responseContractId, - context: context, - signer: signer - ) - return connection + Self.logger.info("🔗 DASHCONNECT :: identity updated") + return nil } - /// This identity's response to one request, with the values it has on - /// Platform, or `nil` when there is none; a failed lookup or a response - /// that cannot be read throws. - private func findAppConnectResponse( - ownerIdentityId: Data, - appEphemeralPubKeyHash: Data, + /// Publishes the response `intent` sealed. A publish can land without + /// confirming, and the response is unique per request and identity, so + /// a failed one is checked against Platform. + private func publishResponse( + of intent: AppConnect.ConnectionIntent, responseContractId: Data, - sdk: SDK - ) async throws -> (documentId: Data, values: AppConnect.ResponseValues)? { - let response = try await sdk.documentList( - dataContractId: responseContractId.toBase58String(), - documentType: AppConnect.documentType, - whereClause: AppConnect.responseLookupWhereClause( - appEphemeralPubKeyHash: appEphemeralPubKeyHash, - ownerIdentityId: ownerIdentityId - ), - limit: 1 - ) - guard let documents = response["documents"] as? [[String: Any]] else { - throw DashConnectPlatformError.existingDocumentLookupFailed - } - guard let document = documents.first else { return nil } - guard let id = document["$id"] as? String, - let identifier = Self.decodeIdentifier(id), identifier.count == 32, - let values = AppConnect.responseValues( - fromDocument: document, appEphemeralPubKeyHash: appEphemeralPubKeyHash) else { - throw DashConnectPlatformError.existingDocumentLookupFailed + context: Context, + signer: KeychainSigner + ) async throws { + Self.logger.info("🔗 DASHCONNECT :: publishing loginKeyResponse") + let documentId: Data + do { + (documentId, _) = try await context.wallet.createDocument( + ownerIdentityId: context.identityId, + contractId: responseContractId, + documentType: AppConnect.documentType, + propertiesJSON: try intent.response.propertiesJSON(), + signer: signer) + Self.logger.info("🔗 DASHCONNECT :: loginKeyResponse published") + } catch { + guard let published = try? await Self.findAppConnectResponse( + ownerIdentityId: context.identityId, + appEphemeralPubKeyHash: intent.requestHash, + responseContractId: responseContractId, + sdk: context.sdk + ) else { + throw error + } + Self.logger.info("🔗 DASHCONNECT :: loginKeyResponse was already published") + documentId = published.documentId } - return (identifier, values) + recordResponse(documentId, of: intent.id, in: context.stores) } - /// Reads, changes and writes the grant records in one step, from the - /// store each time. Every caller runs inside `gated`, so no other - /// operation of this wallet writes them in between. - @discardableResult - private func updateGrants(in stores: Stores, _ change: (inout [AppConnectGrant]) -> T) -> T { - var grants = stores.grants.load() - let result = change(&grants) - stores.grants.save(grants) - return result + /// Records that the response of the intent `id` is on Platform. + private func recordResponse(_ documentId: Data, of id: UUID, in stores: Stores) { + updateIntents(in: stores) { intents in + guard let index = intents.firstIndex(where: { $0.id == id }) else { return } + intents[index].responseDocumentId = documentId + intents[index].responseRemoved = false + } } - /// Deletes, by their original values, the responses of the matching - /// grants that are still on Platform. Best effort: a response that cannot - /// be deleted now stays recorded and is tried again by the next login - /// with this identity. It does not hold the caller back — the entry it leaves is - /// the encrypted key of a request the app has already finished with. - /// - /// A grant whose key is still live keeps its record, marked as having no - /// response left: a later disconnect picks the keys it has records for - /// without looking their app up in the wallet's key store. A grant whose - /// key is already disabled has no further use and is dropped. - private func deleteAppConnectResponses( - where matches: (AppConnectGrant) -> Bool, + /// Deletes, by its original values, the response of each intent in `ids` + /// that may be on Platform. Best effort: one that cannot be deleted now + /// stays marked and is tried again by the next disconnect or approval on + /// the identity (`AppConnect.responsesLeft`). + private func deleteResponses( + of ids: [UUID], responseContractId: Data, context: Context, signer: KeychainSigner ) async { - await resolveUnconfirmedAppConnectResponses( - where: matches, responseContractId: responseContractId, context: context) - let pending = context.stores.grants.load().filter { matches($0) && $0.hasDeletableResponse } - for grant in pending { + for intent in context.stores.intents.load() where ids.contains(intent.id) && !intent.responseRemoved { do { - guard let documentIdText = grant.documentId, - let documentId = Self.decodeIdentifier(documentIdText) else { - throw DashConnectPlatformError.existingDocumentLookupFailed + // Deleted by the values it has on Platform, which are this + // intent's unless another install answered the same request. + guard let found = try await Self.findAppConnectResponse( + ownerIdentityId: context.identityId, + appEphemeralPubKeyHash: intent.requestHash, + responseContractId: responseContractId, + sdk: context.sdk + ) else { + markResponseRemoved(intent.id, in: context.stores) + continue } - let signingKeyId = try selectDocumentSigningKeyId( - wallet: context.wallet, - identityId: context.identityId - ) + let signingKeyId = try selectDocumentSigningKeyId(wallet: context.wallet, identityId: context.identityId) _ = try await context.wallet.deleteDocument( ownerIdentityId: context.identityId, contractId: responseContractId, documentType: AppConnect.documentType, - documentId: documentId, - propertiesJSON: try grant.values.propertiesJSON(), + documentId: found.documentId, + propertiesJSON: try found.values.propertiesJSON(), signingKeyId: signingKeyId, - signer: signer - ) - markAppConnectResponseGone(grant, in: context.stores) + signer: signer) + markResponseRemoved(intent.id, in: context.stores) } catch { - Self.logger.error( - "🔗 DASHCONNECT :: previous loginKeyResponse not deleted — \(error.localizedDescription, privacy: .public)") - // A delete can land without confirming, and every retry is - // then refused because there is nothing left to delete. Only - // Platform can say which failure this was. - guard let hash = AppConnect.data(fromHex: grant.values.appEphemeralPubKeyHash) else { continue } + Self.logger.error("🔗 DASHCONNECT :: loginKeyResponse not deleted — \(error.localizedDescription, privacy: .public)") + // A delete can land without confirming; only Platform says. + // A lookup that fails says nothing. do { - let remaining = try await findAppConnectResponse( + let remaining = try await Self.findAppConnectResponse( ownerIdentityId: context.identityId, - appEphemeralPubKeyHash: hash, + appEphemeralPubKeyHash: intent.requestHash, responseContractId: responseContractId, - sdk: context.sdk - ) - if remaining == nil { markAppConnectResponseGone(grant, in: context.stores) } + sdk: context.sdk) + if remaining == nil { markResponseRemoved(intent.id, in: context.stores) } } catch { continue } @@ -1916,52 +1674,42 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } } - /// Records that a grant has no response on Platform any more. The record - /// of a live key stays for a disconnect to disable that key by; the - /// record of a disabled key has no further use. - private func markAppConnectResponseGone(_ grant: AppConnectGrant, in stores: Stores) { - updateGrants(in: stores) { grants in - guard let index = grants.firstIndex(where: { $0.key == grant.key }) else { return } - if grants[index].keyDisabled == true { - grants.remove(at: index) - } else { - grants[index].responseDeleted = true - } + private func markResponseRemoved(_ id: UUID, in stores: Stores) { + updateIntents(in: stores) { intents in + guard let index = intents.firstIndex(where: { $0.id == id }) else { return } + intents[index].responseRemoved = true } } - /// Settles the matching grants whose publish never confirmed, by asking - /// Platform. A response that is there gets its id and its values on - /// Platform, so it can be deleted; one that is not there needs nothing - /// more. A lookup that fails leaves the record as it is for the next try. - private func resolveUnconfirmedAppConnectResponses( - where matches: (AppConnectGrant) -> Bool, + /// This identity's response to one request, with the values it has on + /// Platform, or `nil` when there is none; a failed lookup or a response + /// that cannot be read throws. + private static func findAppConnectResponse( + ownerIdentityId: Data, + appEphemeralPubKeyHash: Data, responseContractId: Data, - context: Context - ) async { - for grant in context.stores.grants.load() where matches(grant) && grant.hasUnconfirmedResponse { - guard let hash = AppConnect.data(fromHex: grant.values.appEphemeralPubKeyHash) else { continue } - do { - let published = try await findAppConnectResponse( - ownerIdentityId: context.identityId, - appEphemeralPubKeyHash: hash, - responseContractId: responseContractId, - sdk: context.sdk - ) - guard let published else { - markAppConnectResponseGone(grant, in: context.stores) - continue - } - updateGrants(in: context.stores) { grants in - guard let index = grants.firstIndex(where: { $0.key == grant.key }) else { return } - grants[index].documentId = published.documentId.toBase58String() - grants[index].values = published.values - } - } catch { - Self.logger.error( - "🔗 DASHCONNECT :: unconfirmed loginKeyResponse not resolved — \(error.localizedDescription, privacy: .public)") - } + sdk: SDK + ) async throws -> (documentId: Data, values: AppConnect.ResponseValues)? { + let response = try await sdk.documentList( + dataContractId: responseContractId.toBase58String(), + documentType: AppConnect.documentType, + whereClause: AppConnect.responseLookupWhereClause( + appEphemeralPubKeyHash: appEphemeralPubKeyHash, + ownerIdentityId: ownerIdentityId + ), + limit: 1 + ) + guard let documents = response["documents"] as? [[String: Any]] else { + throw DashConnectPlatformError.existingDocumentLookupFailed + } + guard let document = documents.first else { return nil } + guard let id = document["$id"] as? String, + let identifier = Self.decodeIdentifier(id), identifier.count == 32, + let values = AppConnect.responseValues( + fromDocument: document, appEphemeralPubKeyHash: appEphemeralPubKeyHash) else { + throw DashConnectPlatformError.existingDocumentLookupFailed } + return (identifier, values) } func handleStateTransition(_ request: DashStRequest) async throws -> DashConnectStAction { @@ -1976,16 +1724,6 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } switch parsed { - case .keyRegistration(let transition): - // Only this branch changes the identity and the rows. Its turn - // is the wallet of the context read above, and the context is - // resolved again once the turn comes: the wait can outlast a - // wallet, network or identity switch. - try await gated(walletIdHex: context.stores.walletIdHex) { - let current = try await contextAfterAuthorization(matching: context) - try await completeKeyRegistration(transition, context: current) - } - return .keyRegistrationCompleted case .tokenPurchase(let purchase): return .tokenPurchaseApprovalRequired( try await makeTokenPurchaseRequest(purchase, context: context) @@ -1993,80 +1731,6 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } } - /// The key-registration half of a scanned `dash-st:` payload. Verifies - /// the parsed transition only adds the exact derived login keys for our - /// identity, then rebuilds the equivalent `updateIdentity(...)` call - /// through the SDK. - private func completeKeyRegistration( - _ transition: DashConnectKeyRegistrationTransition, - context: Context - ) async throws { - // The transition was parsed before the connection is chosen: - // `DashStRequest` carries no app identifier, but the transition's - // keys usually do, in their contract bounds. Picking the most - // recently approved connection instead would derive app B's keys for - // a QR scanned from app A. - let pendingConnection = try Self.pendingApprovedConnectionForKeyRegistration( - in: rows(in: context.stores), - boundContractId: Self.boundAppContractId(in: transition) - ) - guard let pendingAppContractId = Self.decodeIdentifier(pendingConnection.id) else { - throw DashConnectPlatformError.noApprovedConnectionAwaitingKeyRegistration - } - - var derivedMaterial = try await deriveKeyRegistrationMaterial( - appContractId: pendingAppContractId, context: context) - defer { - Self.zero(&derivedMaterial.loginKey) - Self.zero(&derivedMaterial.authenticationPrivateKey) - Self.zero(&derivedMaterial.encryptionPrivateKey) - } - - let validated = try Self.validateKeyRegistration( - transition, - identityId: context.identityId, - appContractId: pendingAppContractId, - derivedMaterial: derivedMaterial - ) - - let currentPublicKeys = try context.wallet - .managedIdentity(identityId: context.identityId) - .getPublicKeys() - let missingKeys = Self.missingKeyRegistrationKeys( - validated, - currentIdentityPublicKeys: currentPublicKeys - ) - - guard !missingKeys.isEmpty else { - await markActive(pendingConnection, in: context.stores) - return - } - - try await authorize() - // The keys were derived and checked for the identity above. - let authorized = try await contextAfterAuthorization(matching: context) - - let signer = KeychainSigner(modelContainer: authorized.modelContainer) - try await signer.withAdditionalSigningKeys([ - ( - publicKey: validated.authenticationKey.publicKeyData, - privateKey: derivedMaterial.authenticationPrivateKey - ), - ( - publicKey: validated.encryptionKey.publicKeyData, - privateKey: derivedMaterial.encryptionPrivateKey - ), - ]) { - try await authorized.wallet.updateIdentity( - identityId: authorized.identityId, - addPublicKeys: missingKeys.map(Self.makeManagedIdentityPubkey), - signer: signer - ) - } - - await markActive(pendingConnection, in: authorized.stores) - } - /// The context to go on with after a wait — a PIN prompt, a turn at /// the operation gate — which can outlast a wallet, network or identity /// switch: what is active now, and only while it is still the identity, @@ -2092,107 +1756,6 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { return context } - /// Confirms this identity's unconfirmed registrations whose key it now - /// holds, and makes the row of each app this identity holds a recorded - /// live key of active and one-QR, adding one if it has none: the key is - /// live and has to be reachable from Connections. That also covers a - /// grant confirmed earlier whose row was never saved, or was saved by a - /// two-QR login. - private func confirmRegistrations( - identityId: String, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - modelContainer: ModelContainer, - in stores: Stores - ) async { - guard stores.grants.load().contains(where: { $0.identityId == identityId && $0.keyDisabled != true }) - else { return } - // Without the store's bindings no unconfirmed record is confirmed, - // and a confirmed one does not need them. - let bindings = (try? Self.storedKeyBindings(identityId: identityId, modelContainer: modelContainer)) ?? [] - if stores.grants.load().contains(where: { $0.identityId == identityId && $0.isUnconfirmed }) { - let confirmed = updateGrants(in: stores) { grants in - AppConnect.confirmRegistrations( - in: &grants, identityId: identityId, - currentIdentityPublicKeys: currentIdentityPublicKeys, bindings: bindings) - } - if !confirmed.isEmpty { - Self.logger.info("🔗 DASHCONNECT :: \(confirmed.count, privacy: .public) unconfirmed session key(s) found on the identity") - } - } - let appIds = Self.appIdsWithoutTheirOneQRRow( - grants: stores.grants.load(), identityId: identityId, - currentIdentityPublicKeys: currentIdentityPublicKeys, bindings: bindings, - rows: rows(in: stores)) - guard !appIds.isEmpty else { return } - Self.logger.info("🔗 DASHCONNECT :: \(appIds.count, privacy: .public) app(s) with a live session key get their row back") - let confirmedAt = now() - await updateRows(in: stores) { rows in - Self.rowsAfterConfirming(appIds: appIds, in: rows, at: confirmedAt) - } - } - - /// The apps `identityId` holds a live key of by a confirmed grant record - /// whose row is missing from `rows` or is not an active one-QR row. - static func appIdsWithoutTheirOneQRRow( - grants: [AppConnectGrant], - identityId: String, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - bindings: [AppConnect.KeyBinding], - rows: [DAppConnection] - ) -> Set { - let live = grants.filter { - $0.identityId == identityId && !$0.isUnconfirmed && $0.keyDisabled != true - && AppConnect.holdsRecordedKey( - $0, currentIdentityPublicKeys: currentIdentityPublicKeys, bindings: bindings) - } - return Set(live.map(\.appContractId)).filter { appId in - !rows.contains { $0.id == appId && $0.status == .active && $0.loginKind == .oneQR } - } - } - - /// `rows` once the apps in `appIds` hold a live one-QR key: each app's - /// row becomes active and one-QR, keeping its branding and scope (a - /// two-QR row waiting for its second scan would otherwise keep showing - /// that banner instead of the disconnect switch), and an app with no row - /// gets one. - static func rowsAfterConfirming(appIds: Set, in rows: [DAppConnection], at confirmedAt: Date) -> [DAppConnection] { - let reconciled = rows.map { connection in - guard appIds.contains(connection.id) else { return connection } - var updated = DAppConnection( - id: connection.id, - name: connection.name, - url: connection.url, - status: .active, updatedAt: confirmedAt, loginKind: .oneQR) - updated.scope = connection.scope - return updated - } - let missing = appIds.subtracting(rows.map(\.id)) - return reconciled + missing.sorted().map { appId in - let branding = DashConnectFallbackAppMetadata.resolve(contractId: appId, unauthenticatedLabel: "") - return DAppConnection( - id: appId, - name: branding.name.isEmpty ? NSLocalizedString("Unknown app", comment: "DashConnect") : branding.name, - url: branding.url, - status: .active, updatedAt: confirmedAt, loginKind: .oneQR) - } - } - - private func markActive(_ pendingConnection: DAppConnection, in stores: Stores) async { - let activatedAt = now() - await updateRows(in: stores) { rows in - rows.map { connection in - guard connection.id == pendingConnection.id else { return connection } - return DAppConnection( - id: connection.id, - name: connection.name, - url: connection.url, - status: .active, - updatedAt: activatedAt - ) - } - } - } - /// Builds the user-facing approval request for a parsed token purchase, /// refusing purchases that name someone else's identity. Reads the token's /// denomination from the contract over the network (see @@ -2319,995 +1882,270 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { // on the user, and the active wallet or identity can change while // it is open — a switch, a wipe-and-restore. Building the signer // from the context captured beforehand would sign for an identity - // the user never saw on the sheet and debit its credits. - let authorized = try await requireContext() - guard authorized.identityId == request.ownerId, - authorized.identityId == context.identityId else { - throw DashConnectPlatformError.tokenPurchaseWrongIdentity - } - context = authorized - signer = KeychainSigner(modelContainer: authorized.modelContainer) - } catch { - // Everything above happens before anything is signed or sent, so - // the purchase provably did not start and the caller may offer it - // again. - throw DashConnectTokenPurchaseFailure.beforeSubmission(error) - } - - // `expectedTotalCost` is the same credits figure the approval sheet - // rendered, and it is a CEILING: Platform rejects the transition when - // the on-chain price is higher, and charges the lower amount when it - // is lower. So the user can never be charged more than what they - // approved, but they may be charged less. - // `signingKeyId` is left at its default: the signer selects a - // CRITICAL key itself and fails with a clear error when the identity - // has none. - do { - try await context.wallet.tokenPurchase( - identityId: context.identityId, - contractId: request.dataContractId, - tokenPosition: request.tokenContractPosition, - amount: request.tokenCount, - expectedTotalCost: request.totalAgreedPriceCredits, - signer: signer - ) - } catch { - // One opaque error covers "the transition was rejected" and "it - // was submitted and the wait for its outcome failed", and nothing - // in the FFI result separates them. Report the ambiguity rather - // than guess: a purchase that did land must not be offered for a - // retry that would buy the tokens again on the next nonce. - Self.logger.error( - "🔗 DASHCONNECT :: token purchase failed after submission; outcome unknown: \(String(describing: error), privacy: .public)") - throw DashConnectTokenPurchaseFailure.outcomeUnknown(error) - } - } - - func remove(id: String, scope: String?) async { - // A row published for another wallet was not picked from this one. - guard let stores = await showActiveWalletRows(), scope == stores.scope else { return } - await updateRows(in: stores) { rows in rows.filter { $0.id != id } } - } - - @discardableResult - func disconnect(id: String, scope: String?) async throws -> DashConnectDisconnectResult { - try await gated { try await disconnectInTurn(id: id, scope: scope) } - } - - /// The key ids this identity's confirmed grant records name. An - /// unconfirmed record's id may belong to another key by now. - private static func recordedKeyIds(of identityId: String, in stores: Stores) -> Set { - Set(stores.grants.load().filter { $0.identityId == identityId && !$0.isUnconfirmed }.flatMap(\.keyIds)) - } - - private func disconnectInTurn(id: String, scope: String?) async throws -> DashConnectDisconnectResult { - guard let stores = await showActiveWalletRows() else { - throw DashConnectPlatformError.noWallet - } - // The row names the wallet it was published for. When that is not - // the wallet that is active now, nothing of the row's wallet can be - // turned off from here, and a row this wallet has for the same app - // is not the one that was picked. - guard scope == stores.scope else { - throw DashConnectPlatformError.walletChanged - } - let rowIsOneQR = rows(in: stores).first { $0.id == id }?.loginKind == .oneQR - // What can reach Platform: a confirmed grant of the app, and a - // registration of it whose outcome is not known yet. Which of the - // two disconnects runs is settled by the revocation, from a fresh - // view of the identity, not by the row alone. Records of every - // identity of the wallet count: the row is shared, and one held by - // another identity is reported by the revocation. - let hasGrants = stores.grants.load().contains { - $0.appContractId == id && (!$0.isUnconfirmed || $0.submittedRevision != nil) - } - var result = DashConnectDisconnectResult() - if rowIsOneQR || hasGrants { - let revocation = try await revokeAppConnectGrants( - appContractId: id, rowIsOneQR: rowIsOneQR, stores: stores) - // The row stands for the app, and the app still holds a key on - // another identity of this wallet, or may still be given one - // there. That identity's keys can only be read and disabled - // while it is the active one, so the row stays to get there, and - // the user is told; this identity's keys are off. - if let heldElsewhere = revocation.heldElsewhere { throw heldElsewhere } - result = revocation.profileKeys - if revocation.asOneQR { - // The session keys are disabled, and so are the keys of an - // earlier two-QR login that were found: the same QR can no - // longer be approved and there is no second step to wait - // for, so the row goes instead of sitting in the two-QR - // "approved" state. - await updateRows(in: stores) { rows in rows.filter { $0.id != id } } - return result - } - } - - let disconnectedAt = now() - // Local-only for a two-QR connection: its `loginKeyResponse` document - // stays, and re-approving the same `dash-key:` QR returns it to - // `.active` while the identity keys are still registered. - await updateRows(in: stores) { rows in - rows.map { connection in - guard connection.id == id else { return connection } - return DAppConnection( - id: connection.id, - name: connection.name, - url: connection.url, - status: .approved, - updatedAt: disconnectedAt - ) - } - } - return result - } - - /// Whether a disconnect of the app takes the one-QR path. A live session - /// key of a confirmed grant makes it one-QR however the row reads: a row - /// write lost after the grant was confirmed leaves the app's two-QR row - /// in place. So does a confirmed grant not yet recorded as off while no - /// key of the two-QR login is live: a one-QR disconnect that stopped - /// after disabling its keys, those of the two-QR login among them. With - /// a two-QR login key live, that login came after the grant's key went - /// off, and the row is its. So does a registration that may still land: - /// any disable update the one-QR path then sends lands above the - /// revision that registration was built on, after which it can never - /// land. - static func disconnectsAsOneQR( - rowIsOneQR: Bool, - holdsLiveGrantedKey: Bool, - holdsUnrevokedGrant: Bool, - holdsLiveTwoQRLoginKey: Bool, - hasRegistrationThatMayStillLand: Bool - ) -> Bool { - rowIsOneQR || holdsLiveGrantedKey || (holdsUnrevokedGrant && !holdsLiveTwoQRLoginKey) - || hasRegistrationThatMayStillLand - } - - /// What a view of the identity at `identityRevision` tells of an - /// unconfirmed registration. - enum RegistrationOutcome: Equatable { - /// The key is on the identity, live, under the id the registration - /// was submitted with. The same key under another id came from - /// another submission of the request, which has its own record. - case keyLive - /// The identity is at the update's revision or past it without that - /// key live, so the update can never land. - case cannotLand - /// The identity is below the update's revision: the update may still - /// land. - case mayStillLand - /// The record does not note the revision it was submitted with. - case unknownRevision - } - - static func registrationOutcome( - of grant: AppConnectGrant, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - identityRevision: UInt64 - ) -> RegistrationOutcome { - let isLive = currentIdentityPublicKeys.contains { - UInt32(bitPattern: $0.keyId) == grant.sessionKeyId && $0.disabledAt == nil - && $0.keyType == .ecdsaHash160 && $0.data.toHexString() == grant.unconfirmedKeyHash160 - } - if isLive { return .keyLive } - guard let submitted = grant.submittedRevision else { return .unknownRevision } - guard identityRevision >= submitted else { return .mayStillLand } - return .cannotLand - } - - /// The ids of the keys that registrations which might still land put on - /// the identity after all, read once an update of this disconnect has - /// landed: none of them can land any more, so each key is either live - /// now or never will be. Throws when the read still shows one that - /// could land: the node that answered is behind that update. - static func keyIdsOfRegistrationsThatLanded( - _ registrations: [AppConnectGrant], - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo], - identityRevision: UInt64 - ) throws -> [UInt32] { - try registrations.compactMap { registration in - switch registrationOutcome( - of: registration, - currentIdentityPublicKeys: currentIdentityPublicKeys, - identityRevision: identityRevision - ) { - case .keyLive: return registration.sessionKeyId - case .cannotLand: return nil - case .mayStillLand, .unknownRevision: throw DashConnectPlatformError.identityKeysOutOfDate - } - } - } - - /// Why the app's row has to stay for another identity of this wallet, - /// as the error to show, or `nil` when no identity but `identityId` has - /// part in it. A live key there (`heldOnAnotherIdentity` covers the keys - /// no record names) comes first; a registration there that may still - /// land, one with a noted revision, is settled only by a read of that - /// identity, once it is the active one. - static func reasonHeldElsewhere( - grants: [AppConnectGrant], - appContractId: String, - identityId: String, - heldOnAnotherIdentity: Bool - ) -> DashConnectPlatformError? { - let elsewhere = grants.filter { $0.appContractId == appContractId && $0.identityId != identityId } - if heldOnAnotherIdentity || elsewhere.contains(where: { !$0.isUnconfirmed && $0.keyDisabled != true }) { - return .grantOnAnotherIdentity - } - if elsewhere.contains(where: { $0.isUnconfirmed && $0.submittedRevision != nil }) { - return .registrationPendingOnAnotherIdentity - } - return nil - } - - /// Ends the access one-QR logins gave an app: disables its session keys - /// on the identity, then deletes the responses that carried them. - /// - /// The key goes first because it is what the app signs with. A response - /// that could not be deleted afterwards stays recorded, with its key - /// marked disabled, and is retried by the next login with this identity. - /// - /// The keys are the ones recorded here plus the live keys on the identity - /// that are bound to the app's contract and shaped as this login - /// registers them, so the keys a reinstalled wallet kept no record of go - /// too. For a one-QR disconnect that includes the shapes App Connect v2 - /// registers (`AppConnect.appsV2KeyIds`). Every live DashPay profile key - /// no record names goes as well: its bound names no app, so it may be - /// another app's, and it is turned off with any app's disconnect - /// (`AppConnect.sharedProfileKeyIdsToDisable`), only when the disconnect - /// turns off keys of the app's and completes on this identity; what was - /// done with them is returned as `profileKeys`. A key another wallet gave the app in any other - /// shape stays. - /// TODO(app-connect-orphan-responses): the response behind a key with no - /// record stays on Platform. It can only be found by its request hash, - /// which the record held. - /// - /// For a row made by the one-QR login the keys of an earlier two-QR - /// login to the app are disabled as well. That login derives the same keys - /// every time and Platform never re-adds a key, so the app cannot sign - /// in with two QRs again. A two-QR row keeps them. - /// - /// Returns, as `heldElsewhere`, the error to show when a grant record - /// shows the app with a live key on another identity of this wallet, or - /// with a registration there that may still land - /// (`reasonHeldElsewhere`). When this identity gave it none, that is - /// thrown instead, before anything is signed: nothing was turned off, - /// the profile keys included. For a one-QR disconnect that - /// also covers keys on another identity that no grant record names, as - /// far as the wallet's store shows them. `asOneQR` says which disconnect - /// this was. - /// - /// For a row made by the one-QR login, with no record for this identity, - /// the keys are still looked for on it. When it holds none bound to the - /// app, there was nothing to turn off here and the call returns without - /// an error. - /// - /// Which disconnect this is, one-QR or two-QR, is settled after the - /// identity is read again (`disconnectsAsOneQR`) and returned. This - /// identity's registrations of the app whose outcome was not known are - /// settled by that read (`registrationOutcome`): a live key that cannot - /// be confirmed stops the disconnect, one that can never land is - /// dropped, and one that may still land is settled by one more read once - /// a disable update has landed, its key disabled if it turned up; with - /// no key to disable it stops the disconnect. - private func revokeAppConnectGrants( - appContractId: String, - rowIsOneQR: Bool, - stores: Stores - ) async throws -> (heldElsewhere: DashConnectPlatformError?, asOneQR: Bool, profileKeys: DashConnectDisconnectResult) { - // The row was picked in the wallet `stores` belongs to; another - // wallet's identity is not the one the row belongs to. - var context = try await requireContext(pinnedTo: stores) - let identityId = context.identityId.toBase58String() - func isGranted(_ grant: AppConnectGrant) -> Bool { - grant.identityId == identityId && grant.appContractId == appContractId - } - // TODO(dashconnect-unconfirmed-row): a registration of the app on - // another identity that does not note its revision (from a build - // before `submittedRevision`) is not counted here. If it lands after - // this disconnect, its key is shown again only by the next one-QR - // approval with that identity. - func hasLiveGrantElsewhere() -> Bool { - Self.reasonHeldElsewhere( - grants: stores.grants.load(), appContractId: appContractId, identityId: identityId, - heldOnAnotherIdentity: false) == .grantOnAnotherIdentity - } - func reasonHeldElsewhere(heldOnAnotherIdentity: Bool = false) -> DashConnectPlatformError? { - Self.reasonHeldElsewhere( - grants: stores.grants.load(), appContractId: appContractId, identityId: identityId, - heldOnAnotherIdentity: heldOnAnotherIdentity) - } - guard let appContract = Self.decodeIdentifier(appContractId) else { - throw DashConnectPlatformError.loginContractUnavailable - } - if !stores.grants.load().contains(where: { - isGranted($0) && (!$0.isUnconfirmed || $0.submittedRevision != nil) - }) { - // Before the PIN prompt, from the store alone: whether this - // identity holds a key of the app's that has no record. - let holdsUnrecordedKey = try rowIsOneQR && Self - .storedKeyBindings(identityId: identityId, modelContainer: context.modelContainer) - .contains { $0.singleContractId == appContract && !$0.isDisabled && $0.isSessionKeyShaped } - // A one-QR row goes on to the PIN prompt either way: the keys of - // an earlier two-QR login can only be looked for after it. - if !holdsUnrecordedKey, !rowIsOneQR { - if let heldElsewhere = reasonHeldElsewhere() { throw heldElsewhere } - return (heldElsewhere: nil, asOneQR: false, profileKeys: DashConnectDisconnectResult()) - } - } - - try await authorize() - context = try await contextAfterAuthorization(matching: context) - - let signer = KeychainSigner(modelContainer: context.modelContainer) - let (currentPublicKeys, revision) = try await refreshedIdentityKeysAndRevision(context: context) - // A registration whose key has turned up is confirmed. - await confirmRegistrations( - identityId: identityId, currentIdentityPublicKeys: currentPublicKeys, - modelContainer: context.modelContainer, in: stores) - // One that has not is settled by its revision. One that does not - // note it takes no part: its key id may belong to another key, and - // its absence says nothing. - // TODO(dashconnect-unconfirmed-row): such a record (from a build - // before `submittedRevision`) whose update lands after this - // disconnect is shown again only by the next one-QR approval with - // this identity. - var mayStillLand: Set = [] - var cannotLand: Set = [] - for grant in stores.grants.load() where isGranted(grant) && grant.isUnconfirmed { - switch Self.registrationOutcome( - of: grant, currentIdentityPublicKeys: currentPublicKeys, identityRevision: revision) { - case .keyLive: - // The key landed live under the record's id but the record - // could not be confirmed: the key store has no readable - // bound for it, or the key differs from what the record says - // was submitted. - Self.logger.error("🔗 DASHCONNECT :: an unconfirmed session key of the app is live, but its record could not be confirmed") - throw DashConnectPlatformError.identityKeysOutOfDate - case .cannotLand: cannotLand.insert(grant.key) - case .mayStillLand: mayStillLand.insert(grant.key) - case .unknownRevision: break - } - } - if !cannotLand.isEmpty { - Self.logger.info("🔗 DASHCONNECT :: dropping \(cannotLand.count, privacy: .public) session key registration(s) that can no longer land") - updateGrants(in: stores) { grants in grants.removeAll { cannotLand.contains($0.key) } } - } - let granted = stores.grants.load().filter { isGranted($0) && !$0.isUnconfirmed } - // The keys the two-QR login derives for this app, known before - // anything is disabled: its authentication key has the kind and the - // bound of a session key. A one-QR row disables both of them; a - // two-QR row keeps them, so there the authentication key is named - // as one to leave. If they cannot be derived, nothing is turned off. - let twoQRKeys = try await twoQRLoginPublicKeys(appContractId: appContract, context: context) - let liveTwoQRLoginKeyIds = Self.liveLoginKeyIds( - authenticationPublicKeyHash160: twoQRKeys.authenticationPublicKeyHash160, - encryptionPublicKey: twoQRKeys.encryptionPublicKey, - currentIdentityPublicKeys: currentPublicKeys - ) - let asOneQR = Self.disconnectsAsOneQR( - rowIsOneQR: rowIsOneQR, - holdsLiveGrantedKey: granted.contains { grant in - currentPublicKeys.contains { grant.keyIds.contains(UInt32(bitPattern: $0.keyId)) && $0.disabledAt == nil } - }, - holdsUnrevokedGrant: granted.contains { $0.keyDisabled != true }, - holdsLiveTwoQRLoginKey: !liveTwoQRLoginKeyIds.isEmpty, - hasRegistrationThatMayStillLand: !mayStillLand.isEmpty) - let checksUnrecordedKeys = asOneQR - guard AppConnect.sessionKeyIdsMissing(from: currentPublicKeys, for: granted).isEmpty else { - // Platform never removes a key, so the node that answered is - // behind. A key it does not know cannot be shown to be disabled, - // so nothing is reported as turned off. - throw DashConnectPlatformError.identityKeysOutOfDate - } - let bindings = try Self.storedKeyBindings(identityId: identityId, modelContainer: context.modelContainer) - guard AppConnect.sessionKeyIdsWithUnknownBinding( - for: granted, - bindings: bindings, - currentIdentityPublicKeys: currentPublicKeys - ).isEmpty, AppConnect.boundKeyIdsMissing( - from: currentPublicKeys, - appContractId: appContract, - bindings: bindings - ).isEmpty else { - // A live session key the wallet's store cannot place may be this - // app's, and a stored key of the app's that the fetched list - // lacks means the list is behind. Either way nothing is reported - // as turned off. - throw DashConnectPlatformError.identityKeysOutOfDate - } - var keyIds = AppConnect.sessionKeyIdsToDisable( - for: granted, - appContractId: appContract, - bindings: bindings, - currentIdentityPublicKeys: currentPublicKeys, - twoQRAuthenticationKeyHash160: checksUnrecordedKeys ? nil : twoQRKeys.authenticationPublicKeyHash160 - ) - let recordedKeyIds = Self.recordedKeyIds(of: identityId, in: stores) - if checksUnrecordedKeys { - // The keys of v2 grants whose record is gone. A contract or a - // group they are bound to is the app's if the app's owner owns - // it, which only the network says; if it cannot be read, - // nothing is turned off and the row stays. - let unrecorded = AppConnect.unrecordedV2Keys( - recordedKeyIds: recordedKeyIds, bindings: bindings, currentIdentityPublicKeys: currentPublicKeys) - // The store keeps every key it was ever given, the fetched view - // only what the node answered with. A stored key of the app's - // that the view lacks means the view is behind. - let storedUnrecorded = AppConnect.unrecordedV2Keys(recordedKeyIds: recordedKeyIds, bindings: bindings) - let candidates = AppConnect.unrecordedV2KeyBoundIds( - appContractId: appContract, keys: unrecorded + storedUnrecorded) - let owned = try await Self.ownedByOwner( - of: appContract, contractIds: candidates.contracts, groupIds: candidates.groups, sdk: context.sdk) - let fetchedKeyIds = Set(currentPublicKeys.map { UInt32(bitPattern: $0.keyId) }) - guard AppConnect.appsV2KeyIds( - appContractIds: owned.contracts, appGroupIds: owned.groups, keys: storedUnrecorded - ).allSatisfy(fetchedKeyIds.contains) else { - throw DashConnectPlatformError.identityKeysOutOfDate - } - let unrecordedV2KeyIds = AppConnect.appsV2KeyIds( - appContractIds: owned.contracts, appGroupIds: owned.groups, keys: unrecorded) - keyIds = Array(Set(keyIds).union(liveTwoQRLoginKeyIds).union(unrecordedV2KeyIds)).sorted() - } - if !mayStillLand.isEmpty, keyIds.isEmpty { - // No update would be sent, so nothing settles the registration. - // This identity's own state comes first: whatever another - // identity holds, this one cannot be told to be done. - // TODO(dashconnect-pending-registration): an update that was - // refused, or never sent, cannot be told from one still on its - // way, so this stays until the identity's revision moves or the - // app's code is approved again. Until then the record also holds - // the row for the wallet's other identities - // (`registrationPendingOnAnotherIdentity`). - Self.logger.error("🔗 DASHCONNECT :: a session key registration of the app may still land, and there is no key to disable") - throw DashConnectPlatformError.registrationPending - } - // For a one-QR row, the keys on another identity that no grant - // record shows. `nil` when that could not be told. - let heldOnAnotherIdentity: Bool? = checksUnrecordedKeys && !hasLiveGrantElsewhere() - ? await anotherIdentityHoldsAppKeys(appContractId: appContract, context: context) - : false - if granted.isEmpty, keyIds.isEmpty, - let heldElsewhere = reasonHeldElsewhere(heldOnAnotherIdentity: heldOnAnotherIdentity == true) { - throw heldElsewhere - } - // The DashPay profile keys no record names: their bound does not say - // which app was given them, so they go with the disconnect of any - // app rather than being left on for none to reach. Only with a - // disconnect of an app this identity holds keys or a grant of, that - // ends here: one with nothing of the app's here, or that ends with - // the app held on another identity (or not checked there), leaves - // them. A grant whose keys went in an earlier try that then failed - // still counts, so a retry reaches them; so does an app key that - // stays live because the app's keys are disabled after the profile - // keys (`AppConnect.disableOrder`). When the set cannot be told from - // the store (a stored key no record names whose bound it cannot read - // and that the view lacks, a stored profile key the view lacks, a - // record it cannot read), none of them is touched, and the app's own - // keys still go. A live key in the view whose bound the store cannot - // read stops the whole disconnect earlier - // (`sessionKeyIdsWithUnknownBinding`): it may be the app's own. - // TODO(app-connect-v2-pending-record): a v2 approval writes its record - // only once its update is seen to land, so the profile key of one whose - // outcome was unknown when it failed has no record and is turned off - // here like any other. - let completesHere = (!keyIds.isEmpty || !granted.isEmpty) && heldOnAnotherIdentity == false - && reasonHeldElsewhere(heldOnAnotherIdentity: false) == nil - var profileKeysOff: [UInt32] = [] - var profileKeysUnchecked = false - if completesHere { - let profileKeyIds: [UInt32]? = stores.grants.hasUnreadableRows(identityId: identityId) - ? nil - : AppConnect.sharedProfileKeyIdsToDisable( - recordedKeyIds: recordedKeyIds, - bindings: bindings, - currentIdentityPublicKeys: currentPublicKeys, - nowMilliseconds: Int64(AppConnect.milliseconds(now()))) - if let profileKeyIds { - profileKeysOff = profileKeyIds.filter { !keyIds.contains($0) } - keyIds = AppConnect.disableOrder(appKeyIds: keyIds, profileKeyIds: profileKeysOff) - } else { - Self.logger.error("🔗 DASHCONNECT :: DashPay profile keys no record names could not be told; none turned off") - profileKeysUnchecked = true - } - } - if !keyIds.isEmpty { - Self.logger.info("🔗 DASHCONNECT :: disabling \(keyIds.count, privacy: .public) app key(s)") - // Platform takes a limited number of keys per update. A failure - // part way leaves the rest live and the row in place; the next - // attempt picks up what is still live. - try await disableKeys(keyIds, context: context, signer: signer) - Self.logger.info("🔗 DASHCONNECT :: app key(s) disabled") - // The reload writes the disabled keys to the store. The keys are - // off either way. - if mayStillLand.isEmpty { - _ = try? await refreshedIdentityPublicKeys(context: context) - } - // Each registration that might still land names a revision above - // `revision`, the one below it the identity was already at. The - // update that just landed took one above the identity's revision - // when it was built, at least the revision such a registration - // names, and a revision only grows: none of them can land now. - // One may have landed since `revision` was read, though, and the - // update was built on whatever copy of the identity the SDK held - // by then, which a reload elsewhere may have moved past that - // read: its key is not among `keyIds`. One more read settles - // each of them, and a key that turned up is disabled as well. - // Until then the records and the row stay. - if !mayStillLand.isEmpty { - let (keysAfter, revisionAfter) = try await refreshedIdentityKeysAndRevision(context: context) - let landedKeyIds = try Self.keyIdsOfRegistrationsThatLanded( - stores.grants.load().filter { mayStillLand.contains($0.key) }, - currentIdentityPublicKeys: keysAfter, - identityRevision: revisionAfter) - if !landedKeyIds.isEmpty { - Self.logger.info("🔗 DASHCONNECT :: disabling \(landedKeyIds.count, privacy: .public) session key(s) registered after the identity was read") - try await disableKeys(landedKeyIds.sorted(), context: context, signer: signer) - } - updateGrants(in: stores) { grants in grants.removeAll { mayStillLand.contains($0.key) } } + // the user never saw on the sheet and debit its credits. + let authorized = try await requireContext() + guard authorized.identityId == request.ownerId, + authorized.identityId == context.identityId else { + throw DashConnectPlatformError.tokenPurchaseWrongIdentity } + context = authorized + signer = KeychainSigner(modelContainer: authorized.modelContainer) + } catch { + // Everything above happens before anything is signed or sent, so + // the purchase provably did not start and the caller may offer it + // again. + throw DashConnectTokenPurchaseFailure.beforeSubmission(error) } - // The session keys of the grants read above are now off, and only - // those are marked. - let revoked = Set(granted.map(\.key)) - func isRevoked(_ grant: AppConnectGrant) -> Bool { revoked.contains(grant.key) } - updateGrants(in: stores) { AppConnect.markKeysDisabled(in: &$0, where: isRevoked) } - - if let responseContractId = Self.decodeIdentifier(AppConnect.contractId) { - await deleteAppConnectResponses( - where: isRevoked, - responseContractId: responseContractId, - context: context, + // `expectedTotalCost` is the same credits figure the approval sheet + // rendered, and it is a CEILING: Platform rejects the transition when + // the on-chain price is higher, and charges the lower amount when it + // is lower. So the user can never be charged more than what they + // approved, but they may be charged less. + // `signingKeyId` is left at its default: the signer selects a + // CRITICAL key itself and fails with a clear error when the identity + // has none. + do { + try await context.wallet.tokenPurchase( + identityId: context.identityId, + contractId: request.dataContractId, + tokenPosition: request.tokenContractPosition, + amount: request.tokenCount, + expectedTotalCost: request.totalAgreedPriceCredits, signer: signer ) + } catch { + // One opaque error covers "the transition was rejected" and "it + // was submitted and the wait for its outcome failed", and nothing + // in the FFI result separates them. Report the ambiguity rather + // than guess: a purchase that did land must not be offered for a + // retry that would buy the tokens again on the next nonce. + Self.logger.error( + "🔗 DASHCONNECT :: token purchase failed after submission; outcome unknown: \(String(describing: error), privacy: .public)") + throw DashConnectTokenPurchaseFailure.outcomeUnknown(error) } - if let heldElsewhere = reasonHeldElsewhere(heldOnAnotherIdentity: heldOnAnotherIdentity == true) { - return (heldElsewhere: heldElsewhere, asOneQR: asOneQR, profileKeys: DashConnectDisconnectResult()) - } - // This identity's keys are off. Whether another one holds a key of - // the app could not be read from the store, so the row stays, with - // an error rather than without one. - guard heldOnAnotherIdentity != nil else { throw DashConnectPlatformError.otherIdentitiesNotChecked } - return (heldElsewhere: nil, asOneQR: asOneQR, profileKeys: DashConnectDisconnectResult( - profileKeysTurnedOff: profileKeysOff.count, profileKeysUnchecked: profileKeysUnchecked)) } - /// Disables `keyIds` on the identity, as many per update as Platform - /// takes. - private func disableKeys(_ keyIds: [UInt32], context: Context, signer: KeychainSigner) async throws { - for start in stride(from: 0, to: keyIds.count, by: AppConnect.maxKeysDisabledPerUpdate) { - try await context.wallet.updateIdentity( - identityId: context.identityId, - disablePublicKeyIds: Array(keyIds[start ..< min(start + AppConnect.maxKeysDisabledPerUpdate, keyIds.count)]), - signer: signer - ) - } + func remove(id: String, scope: String?) async { + // A row published for another wallet was not picked from this one. + guard let stores = await showActiveWalletRows(), scope == stores.scope else { return } + await updateRows(in: stores) { rows in rows.filter { $0.id != id } } } - /// Whether the wallet's store shows another identity of this wallet with - /// a live key of the app that no grant record names: a session key bound - /// to the app's contract, or a key the two-QR login derives for it. - /// `nil` when no identity shows one and at least one could not be told: - /// its keys are not in the store, a live session-shaped key there has a - /// bound this build cannot read, or its two-QR keys could not be derived. - /// TODO(app-connect-other-identity-keys): the store is as fresh as each - /// identity's last load from Platform, and an identity it does not hold - /// is not seen, so the row can go while such a key is live. - /// The v2 shapes no record names count too (`AppConnect.appsV2KeyIds`), - /// with the contracts and groups the app's owner owns read from - /// Platform; an identity whose read fails cannot be told. - private func anotherIdentityHoldsAppKeys(appContractId: Data, context: Context) async -> Bool? { - let others: [(identityId: Data, identityIndex: UInt32)] + func refreshConnections() async { do { - others = try Self.storedWalletIdentities( - walletId: context.wallet.walletId, - network: context.network, - modelContainer: context.modelContainer - ).filter { $0.identityId != context.identityId } - } catch { - Self.logger.error( - "🔗 DASHCONNECT :: other identities not read — \(error.localizedDescription, privacy: .public)") - return nil - } - // One identity that cannot be told does not hide a key found on - // another. - var hasUnknown = false - for other in others { - do { - let bindings = try Self.storedKeyBindings( - identityId: other.identityId.toBase58String(), modelContainer: context.modelContainer) - if AppConnect.holdsLiveSessionKey(appContractId: appContractId, bindings: bindings) { return true } - let otherIdentityId = other.identityId.toBase58String() - let unrecorded = AppConnect.unrecordedV2Keys( - recordedKeyIds: Self.recordedKeyIds(of: otherIdentityId, in: context.stores), - bindings: bindings) - if !unrecorded.isEmpty { - let candidates = AppConnect.unrecordedV2KeyBoundIds(appContractId: appContractId, keys: unrecorded) - let owned = try await Self.ownedByOwner( - of: appContractId, contractIds: candidates.contracts, groupIds: candidates.groups, - sdk: context.sdk) - if !AppConnect.appsV2KeyIds( - appContractIds: owned.contracts, appGroupIds: owned.groups, keys: unrecorded - ).isEmpty { - return true - } - } - // An identity always has keys, so none stored means not - // loaded; and a session-shaped key with an unreadable bound - // may be the app's. - if bindings.isEmpty || bindings.contains(where: { - !$0.isDisabled && ($0.isSessionKeyShaped || $0.isV2AuthKeyShaped) && $0.hasUnreadableBound - }) { - hasUnknown = true - } - // Derive only for an identity that has a live key of either - // two-QR kind at all. - guard bindings.contains(where: { - !$0.isDisabled && ($0.isTwoQRAuthenticationKeyShaped || $0.isTwoQREncryptionKeyShaped) - }) else { continue } - let twoQRKeys = try await twoQRLoginPublicKeys( - appContractId: appContractId, - identityId: other.identityId, - identityIndex: other.identityIndex, - context: context) - if AppConnect.holdsLiveTwoQRLoginKey( - authenticationPublicKeyHash160: twoQRKeys.authenticationPublicKeyHash160, - encryptionPublicKey: twoQRKeys.encryptionPublicKey, - bindings: bindings - ) { - return true - } - } catch { - Self.logger.error( - "🔗 DASHCONNECT :: keys of another identity not checked — \(error.localizedDescription, privacy: .public)") - hasUnknown = true + try await gated { + guard let stores = await showActiveWalletRows() else { return } + let context = try await requireContext(pinnedTo: stores) + let snapshot = try await identitySnapshot(context: context).snapshot + await recordPublishedResponses(in: snapshot, context: context) + await refreshRows(from: snapshot, context: context) } - } - return hasUnknown ? nil : false - } - - /// The identities the SDK's store attaches to this wallet on `network`. - private static func storedWalletIdentities( - walletId: Data, - network: Network, - modelContainer: ModelContainer - ) throws -> [(identityId: Data, identityIndex: UInt32)] { - let descriptor = FetchDescriptor(predicate: PersistentIdentity.predicate(network: network)) - let modelContext = ModelContext(modelContainer) - // The rows are only readable while their context is alive. - return try withExtendedLifetime(modelContext) { - try modelContext.fetch(descriptor) - .filter { $0.wallet?.walletId == walletId } - .map { ($0.identityId, $0.identityIndex) } + } catch { + Self.logger.info("🔗 DASHCONNECT :: connections not refreshed — \(error.localizedDescription, privacy: .public)") } } - /// The public halves of the keys the two-QR login derives for the active - /// identity and an app. - private func twoQRLoginPublicKeys( - appContractId: Data, - context: Context - ) async throws -> (authenticationPublicKeyHash160: Data, encryptionPublicKey: Data) { - try await twoQRLoginPublicKeys( - appContractId: appContractId, - identityId: context.identityId, - identityIndex: context.identityIndex, - context: context) + @discardableResult + func disconnect(id: String, scope: String?, includingUnrecorded: Bool) async throws -> DashConnectDisconnectResult { + try await gated { try await disconnectInTurn(id: id, scope: scope, includingUnrecorded: includingUnrecorded) } } - /// The same for any identity of the active wallet, by its index. - private func twoQRLoginPublicKeys( - appContractId: Data, - identityId: Data, - identityIndex: UInt32, - context: Context - ) async throws -> (authenticationPublicKeyHash160: Data, encryptionPublicKey: Data) { - var derivedMaterial = try await deriveKeyRegistrationMaterial( - appContractId: appContractId, - identityId: identityId, - identityIndex: identityIndex, - context: context) - defer { - Self.zero(&derivedMaterial.loginKey) - Self.zero(&derivedMaterial.authenticationPrivateKey) - Self.zero(&derivedMaterial.encryptionPrivateKey) - } - return (derivedMaterial.authenticationPublicKeyHash160, derivedMaterial.encryptionPublicKey) - } - - static func buildLoginKeyResponseDraft( - loginKey: Data, - appContractId: Data, - appEphemeralPubKey: Data, - walletEphemeralPrivateKey: inout Data, - encryptLoginKey: (Data, Data, Data) throws -> Data = { loginKey, walletPriv, appPub in - try KeyExchangeCrypto.encryptLoginKey( - loginKey, - walletEphemeralPriv: walletPriv, - appEphemeralPub: appPub - ) + private func disconnectInTurn( + id: String, + scope: String?, + includingUnrecorded: Bool + ) async throws -> DashConnectDisconnectResult { + guard let stores = await showActiveWalletRows() else { + throw DashConnectPlatformError.noWallet } - ) throws -> DashConnectLoginKeyResponseDraft { - let sealed = try AppConnect.seal( - loginKey, - appEphemeralPubKey: appEphemeralPubKey, - walletEphemeralPrivateKey: &walletEphemeralPrivateKey, - encrypt: encryptLoginKey - ) - let values = AppConnect.ResponseValues(sealed) - - return DashConnectLoginKeyResponseDraft( - properties: [ - "contractId": appContractId.toBase58String(), - "appEphemeralPubKeyHash": values.appEphemeralPubKeyHash, - "walletEphemeralPubKey": values.walletEphemeralPubKey, - "encryptedPayload": values.encryptedPayload, - "keyIndex": LoginKeyDerivation.defaultKeyIndex, - ], - walletEphemeralPublicKey: sealed.walletEphemeralPublicKey, - encryptedPayload: sealed.encryptedPayload - ) - } - - static func validateKeyRegistration( - _ transition: DashConnectKeyRegistrationTransition, - chainKeyPrivateBytes: Data, - identityId: Data, - appContractId: Data - ) throws -> DashConnectKeyRegistrationValidationResult { - var derivedMaterial = try deriveKeyRegistrationMaterial( - chainKeyPrivateBytes: chainKeyPrivateBytes, - identityId: identityId, - appContractId: appContractId - ) - defer { - zero(&derivedMaterial.loginKey) - zero(&derivedMaterial.authenticationPrivateKey) - zero(&derivedMaterial.encryptionPrivateKey) + // The row names the wallet it was published for. When that is not + // the wallet that is active now, nothing of the row's wallet can be + // turned off from here. + guard scope == stores.scope else { + throw DashConnectPlatformError.walletChanged } - - return try validateKeyRegistration( - transition, - identityId: identityId, - appContractId: appContractId, - derivedMaterial: derivedMaterial - ) - } - - /// The two-QR login's keys for the active identity and one app. The - /// caller wipes the returned private keys. - private func deriveKeyRegistrationMaterial( - appContractId: Data, - context: Context - ) async throws -> DashConnectKeyRegistrationDerivedMaterial { - try await deriveKeyRegistrationMaterial( - appContractId: appContractId, - identityId: context.identityId, - identityIndex: context.identityIndex, - context: context) - } - - /// The same for any identity of the active wallet, by its index. - private func deriveKeyRegistrationMaterial( - appContractId: Data, - identityId: Data, - identityIndex: UInt32, - context: Context - ) async throws -> DashConnectKeyRegistrationDerivedMaterial { - // `deriveIdentityAuthKeyAtSlot` is main-actor isolated in the SDK. - var chainKey = try await MainActor.run { - try context.wallet.deriveIdentityAuthKeyAtSlot( - identityIndex: identityIndex, - keyId: UInt32(LoginKeyDerivation.defaultKeyIndex), - network: context.network - ).privateKeyData - } - defer { Self.zero(&chainKey) } - return try Self.deriveKeyRegistrationMaterial( - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - } - - private static func deriveKeyRegistrationMaterial( - chainKeyPrivateBytes: Data, - identityId: Data, - appContractId: Data - ) throws -> DashConnectKeyRegistrationDerivedMaterial { - var loginKey = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKeyPrivateBytes, - identityId: identityId, - appContractId: appContractId - ) - var authenticationPrivateKey = Data() - var encryptionPrivateKey = Data() - - do { - authenticationPrivateKey = try KeyExchangeCrypto.deriveAuthPrivateKey( - loginKey: loginKey, - identityId: identityId - ) - let authenticationPublicKey = try Secp256k1.compressedPublicKey( - privateKey: authenticationPrivateKey - ) - let authenticationPublicKeyHash160 = try KeyExchangeCrypto.hash160(authenticationPublicKey) - - encryptionPrivateKey = try KeyExchangeCrypto.deriveEncryptionPrivateKey( - loginKey: loginKey, - identityId: identityId - ) - let encryptionPublicKey = try Secp256k1.compressedPublicKey( - privateKey: encryptionPrivateKey - ) - - return DashConnectKeyRegistrationDerivedMaterial( - loginKey: loginKey, - authenticationPrivateKey: authenticationPrivateKey, - authenticationPublicKeyHash160: authenticationPublicKeyHash160, - encryptionPrivateKey: encryptionPrivateKey, - encryptionPublicKey: encryptionPublicKey - ) - } catch { - zero(&loginKey) - zero(&authenticationPrivateKey) - zero(&encryptionPrivateKey) - throw error + guard let appId = Self.decodeIdentifier(id) else { + throw DashConnectPlatformError.loginContractUnavailable } - } - - private static func validateKeyRegistration( - _ transition: DashConnectKeyRegistrationTransition, - identityId: Data, - appContractId: Data, - derivedMaterial: DashConnectKeyRegistrationDerivedMaterial - ) throws -> DashConnectKeyRegistrationValidationResult { - guard transition.identityId == identityId else { - throw DashConnectPlatformError.keyRegistrationWrongIdentity - } - guard transition.disablePublicKeyIds.isEmpty else { - throw DashConnectPlatformError.keyRegistrationUnexpectedMutation - } - guard transition.addPublicKeys.count == 2 else { - throw DashConnectPlatformError.keyRegistrationUnexpectedMutation - } - - var authenticationKey: DashConnectKeyRegistrationKey? - var encryptionKey: DashConnectKeyRegistrationKey? - - for key in transition.addPublicKeys { - switch key.purpose { - case .authentication: - guard authenticationKey == nil, - key.keyType == .ecdsaHash160, - key.securityLevel == .high, - key.publicKeyData == derivedMaterial.authenticationPublicKeyHash160 else { - throw DashConnectPlatformError.keyRegistrationMismatchedDerivedKey(.authentication) - } - authenticationKey = key - case .encryption: - guard encryptionKey == nil, - key.keyType == .ecdsaSecp256k1, - key.securityLevel == .medium, - key.publicKeyData == derivedMaterial.encryptionPublicKey else { - throw DashConnectPlatformError.keyRegistrationMismatchedDerivedKey(.encryption) + var context = try await requireContext(pinnedTo: stores) + // An intent this build cannot read may name keys of the app that are + // still to land: nothing is turned off until it can be read. + guard !stores.intents.hasUnreadableRows(identityId: context.identityId) else { + throw DashConnectPlatformError.intentsUnreadable + } + var planned = try await disconnectPlan(appId: appId, includingUnrecorded: includingUnrecorded, 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) + } + let plan = planned.plan + let signer = KeychainSigner(modelContainer: context.modelContainer) + if !plan.fence.isEmpty || !plan.disable.isEmpty { + try await fenceAndDisable(plan, context: context, signer: signer) + } + let after = plan.fence.isEmpty && plan.disable.isEmpty + ? planned.snapshot + : 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, + // with its Disconnect, through `rows(_:after:of:intents:at:)`. + let closedAt = now() + updateIntents(in: stores) { intents in + for index in intents.indices + where intents[index].appId == appId && intents[index].identityId == context.identityId + && intents[index].closedAt == nil { + switch AppConnect.status(of: intents[index], in: after) { + case .disconnected, .neverLanded: intents[index].closedAt = closedAt + case .active, .confirming, .expired: break } - encryptionKey = key - default: - throw DashConnectPlatformError.keyRegistrationUnexpectedMutation } } - - guard let authenticationKey, let encryptionKey else { - throw DashConnectPlatformError.keyRegistrationUnexpectedMutation + // With the PIN given, the responses an earlier disconnect could not + // delete go too, whether or not this app has one of its own. + if !plan.isEmpty, let responseContractId = Self.decodeIdentifier(AppConnect.contractId) { + let ids = Set(plan.deleteResponses).union(AppConnect.responsesLeft(identityId: context.identityId, intents: stores.intents.load())) + if !ids.isEmpty { + await deleteResponses(of: Array(ids), responseContractId: responseContractId, context: context, signer: signer) + } } + await refreshRows(from: after, context: context) - return DashConnectKeyRegistrationValidationResult( - appContractId: appContractId, - authenticationKey: authenticationKey, - encryptionKey: encryptionKey - ) - } - - static func hasRegisteredLoginKeys( - authenticationPublicKeyHash160: Data, - encryptionPublicKey: Data, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> Bool { - hasRegisteredAuthenticationKey( - authenticationPublicKeyHash160: authenticationPublicKeyHash160, - currentIdentityPublicKeys: currentIdentityPublicKeys - ) && hasRegisteredEncryptionKey( - encryptionPublicKey: encryptionPublicKey, - currentIdentityPublicKeys: currentIdentityPublicKeys - ) - } - - /// The ids of the two-QR login's keys that are on the identity and not - /// disabled. - static func liveLoginKeyIds( - authenticationPublicKeyHash160: Data, - encryptionPublicKey: Data, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> [UInt32] { - currentIdentityPublicKeys - .filter { key in - hasRegisteredAuthenticationKey( - authenticationPublicKeyHash160: authenticationPublicKeyHash160, - currentIdentityPublicKeys: [key] - ) || hasRegisteredEncryptionKey( - encryptionPublicKey: encryptionPublicKey, - currentIdentityPublicKeys: [key] - ) + // 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. + let ownIntents = stores.intents.load().filter { $0.appId == appId && $0.identityId == context.identityId } + let stillOn = plan.disable.contains { id in after.keys.contains { $0.id == id && $0.disabledAt == nil } } + guard ownIntents.allSatisfy({ $0.closedAt != nil }), !stillOn else { + throw DashConnectPlatformError.identityKeysOutOfDate + } + // The app's intents on another identity of this wallet can only be + // reached while that identity is the active one. + if stores.intents.load().contains(where: { + $0.appId == appId && $0.identityId != context.identityId && $0.closedAt == nil + }) { + throw DashConnectPlatformError.grantOnAnotherIdentity + } + return DashConnectDisconnectResult( + keysTurnedOff: planned.appKeysOff, + unrecordedKeysLeft: includingUnrecorded ? 0 : planned.unrecordedLeft, + keysNotChecked: planned.unplaced, + // 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 of `appId` submits on the active identity, from a + /// fresh read, and how many keys no intent names it leaves when + /// `includingUnrecorded` is off. + private func disconnectPlan( + appId: Data, + includingUnrecorded: Bool, + context: Context + ) async throws -> ( + plan: AppConnect.DisconnectPlan, snapshot: AppConnect.IdentitySnapshot, + appKeysOff: Int, unrecordedLeft: Int, unplaced: Int + ) { + 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) + } + + /// The ids of this wallet's fence keys that are still live: a fence is + /// turned off once it holds its id, and an update that failed in between + /// leaves it on. + private func liveFenceKeyIds( + snapshot: AppConnect.IdentitySnapshot, + intents: [AppConnect.ConnectionIntent], + context: Context + ) async throws -> [UInt32] { + let ids = Set(intents.filter { $0.identityId == snapshot.identityId }.flatMap { $0.authKeys.map(\.id) }) + var live: [UInt32] = [] + for key in snapshot.keys where key.disabledAt == nil && ids.contains(key.id) && key.bound == nil + && key.keyType == .ecdsaHash160 { + let leaf = AppConnect.fenceKeyLeaf(identityId: context.identityId, keyId: key.id) + let (publicKey, derivedPrivateKey) = try await MainActor.run { + let derived = try context.wallet.deriveConnectKey( + subFeature: .sessionAuthentication, identityId: context.identityId, leaf: leaf, network: context.network) + return (derived.publicKeyData, derived.privateKeyData) + } + var privateKey = derivedPrivateKey + Self.zero(&privateKey) + if try KeyExchangeCrypto.hash160(publicKey) == key.data { live.append(key.id) } + } + return live + } + + /// Submits a disconnect: a fence key under each id an intent may still + /// land on, and every key to turn off, as many per update as Platform + /// takes. + private func fenceAndDisable( + _ plan: AppConnect.DisconnectPlan, + context: Context, + signer: KeychainSigner + ) async throws { + var fences: [(key: ManagedPlatformWallet.IdentityPubkey, privateKey: Data)] = [] + defer { for index in fences.indices { Self.zero(&fences[index].privateKey) } } + for id in plan.fence { + let leaf = AppConnect.fenceKeyLeaf(identityId: context.identityId, keyId: id) + let (publicKey, derivedPrivateKey) = try await MainActor.run { + let key = try context.wallet.deriveConnectKey( + subFeature: .sessionAuthentication, identityId: context.identityId, leaf: leaf, network: context.network) + return (key.publicKeyData, key.privateKeyData) } - .map { UInt32(bitPattern: $0.keyId) } - .sorted() - } - - static func missingKeyRegistrationKeys( - _ validated: DashConnectKeyRegistrationValidationResult, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> [DashConnectKeyRegistrationKey] { - let hasAuthenticationKey = hasRegisteredAuthenticationKey( - authenticationPublicKeyHash160: validated.authenticationKey.publicKeyData, - currentIdentityPublicKeys: currentIdentityPublicKeys - ) - let hasEncryptionKey = hasRegisteredEncryptionKey( - encryptionPublicKey: validated.encryptionKey.publicKeyData, - currentIdentityPublicKeys: currentIdentityPublicKeys - ) - - var missingKeys: [DashConnectKeyRegistrationKey] = [] - if !hasAuthenticationKey { - missingKeys.append(validated.authenticationKey) + var privateKey = derivedPrivateKey + defer { Self.zero(&privateKey) } + fences.append((AppConnect.fenceKey(keyId: id, publicKeyHash160: try KeyExchangeCrypto.hash160(publicKey)), + privateKey)) } - if !hasEncryptionKey { - missingKeys.append(validated.encryptionKey) + Self.logger.info("🔗 DASHCONNECT :: fencing \(fences.count, privacy: .public) key id(s), disabling \(plan.disable.count, privacy: .public) key(s)") + let addBatches = stride(from: 0, to: fences.count, by: AppConnect.maxKeysAddedPerUpdate).map { + Array(fences[$0 ..< min($0 + AppConnect.maxKeysAddedPerUpdate, fences.count)]) } - return missingKeys - } - - private static func makeConnection( - preview: ConnectionRequest, - status: ConnectionStatus, - updatedAt: Date, - loginKind: DashConnectLoginKind = .twoQR - ) -> DAppConnection { - DAppConnection( - id: preview.appContractId, - name: preview.appLabel.isEmpty ? NSLocalizedString("Unknown app", comment: "DashConnect") : preview.appLabel, - url: preview.appUrl, - status: status, - updatedAt: updatedAt, - loginKind: loginKind - ) - } - - private static func hasRegisteredAuthenticationKey( - authenticationPublicKeyHash160: Data, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> Bool { - currentIdentityPublicKeys.contains { - $0.purpose == .authentication - && $0.securityLevel == .high - && $0.keyType == .ecdsaHash160 - && $0.disabledAt == nil - && $0.data == authenticationPublicKeyHash160 + let disableBatches = stride(from: 0, to: plan.disable.count, by: AppConnect.maxKeysDisabledPerUpdate).map { + Array(plan.disable[$0 ..< min($0 + AppConnect.maxKeysDisabledPerUpdate, plan.disable.count)]) } - } - - private static func hasRegisteredEncryptionKey( - encryptionPublicKey: Data, - currentIdentityPublicKeys: [ManagedIdentity.IdentityPublicKeyInfo] - ) -> Bool { - currentIdentityPublicKeys.contains { - $0.purpose == .encryption - && $0.securityLevel == .medium - && $0.keyType == .ecdsaSecp256k1 - && $0.disabledAt == nil - && $0.data == encryptionPublicKey + for index in 0 ..< max(addBatches.count, disableBatches.count) { + let add = index < addBatches.count ? addBatches[index] : [] + let disable = index < disableBatches.count ? disableBatches[index] : [] + try await signer.withAdditionalSigningKeys(add.map { ($0.key.pubkeyBytes, $0.privateKey) }) { + try await context.wallet.updateIdentity( + identityId: context.identityId, + addPublicKeys: add.map(\.key), + disablePublicKeyIds: disable, + signer: signer) + } + } + // A disabled key still holds its id, so the fences are turned off once + // they are there: none stays able to sign. One left on by a failure + // here is the wallet's own key, limited to one credit. + let fenceIds = fences.map(\.key.keyId) + for start in stride(from: 0, to: fenceIds.count, by: AppConnect.maxKeysDisabledPerUpdate) { + try await context.wallet.updateIdentity( + identityId: context.identityId, + disablePublicKeyIds: Array(fenceIds[start ..< min(start + AppConnect.maxKeysDisabledPerUpdate, fenceIds.count)]), + signer: signer) } } @@ -3315,14 +2153,14 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { private static func pinnedStores( walletIdHex: String?, store: any DashConnectStore, - responseStore: any AppConnectResponseStore, + intentStore: any AppConnectIntentStore, endpoint: String? ) -> Stores? { guard let walletIdHex, !walletIdHex.isEmpty else { return nil } return Stores( walletIdHex: walletIdHex, connections: store.pinned(toWalletIdHex: walletIdHex), - grants: responseStore.pinned(toWalletIdHex: walletIdHex), + intents: intentStore.pinned(toWalletIdHex: walletIdHex), endpoint: endpoint) } @@ -3330,7 +2168,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { /// once; `nil` with no wallet. private func pinnedActiveStores() -> Stores? { Self.pinnedStores( - walletIdHex: activeWalletIdHex(), store: store, responseStore: responseStore, + walletIdHex: activeWalletIdHex(), store: store, intentStore: intentStore, endpoint: networkEndpoint()) } @@ -3368,81 +2206,6 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { if shownRows.scope == stores.scope { subject.send(stores.published(sorted)) } } - /// The contract every bounded key in the transition points at, or `nil` - /// when the transition carries no bounds — or carries bounds that disagree, - /// which names no single app and so identifies nothing. - static func boundAppContractId( - in transition: DashConnectKeyRegistrationTransition - ) -> Data? { - let boundIds = transition.addPublicKeys.compactMap { key -> Data? in - switch key.contractBounds { - case .singleContract(let id): - return id - case .singleContractDocumentType(let id, _): - return id - case nil: - return nil - } - } - - guard let first = boundIds.first, boundIds.allSatisfy({ $0 == first }) else { - return nil - } - return first - } - - static func pendingApprovedConnectionForKeyRegistration( - in connections: [DAppConnection], - boundContractId: Data? - ) throws -> DAppConnection { - let approved = connections.filter { $0.status == .approved } - guard !approved.isEmpty else { - throw DashConnectPlatformError.noApprovedConnectionAwaitingKeyRegistration - } - - // The transition names its app whenever its keys are bounded. That is - // an exact answer, so it wins over any ordering heuristic. - if let boundContractId { - guard let match = approved.first(where: { - Self.decodeIdentifier($0.id) == boundContractId - }) else { - throw DashConnectPlatformError.noApprovedConnectionAwaitingKeyRegistration - } - return match - } - - // Unbounded transitions are valid but anonymous. Recency is only safe - // when there is nothing to confuse it with: with two apps approved, - // guessing wrong derives the wrong keys and rejects a legitimate scan. - guard approved.count == 1 else { - throw DashConnectPlatformError.ambiguousKeyRegistrationConnection - } - return approved[0] - } - - /// The `loginKeyResponse` contract id for the network this data source - /// serves. Testnet is pinned; devnet reads the user-entered id from - /// `DevnetConfiguration` and throws a normal, user-visible error when it - /// is absent or not a 32-byte base58 identifier — never a crash on - /// user input. - private func loginKeyExchangeContractId() throws -> Data { - switch supportedNetwork { - case .testnet: - return Self.testnetLoginKeyExchangeContractId - case .devnet: - guard let raw = DevnetConfiguration.dashConnectContractId, - let data = Data.identifier(fromBase58: raw), - data.count == 32 else { - throw DashConnectPlatformError.devnetLoginContractNotConfigured - } - return data - case .mainnet: - // Unreachable through the app (mainnet gets the mock data - // source); fail closed rather than publish against a guess. - throw DashConnectPlatformError.loginContractUnavailable - } - } - private func validateNetwork(_ network: DashConnectNetwork) throws { guard network == supportedNetwork else { throw DashConnectPlatformError.unsupportedRequestNetwork( @@ -3462,18 +2225,6 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } } - /// The identity's keys as Platform has them now. The SDK's own copy is - /// only replaced when an identity update returns success, so a - /// registration or a disable that landed without confirming is missing - /// from it; deciding from that copy would add the key twice or disable it - /// twice. The reload also replaces the copy the SDK signs the next update - /// against. - private func refreshedIdentityPublicKeys( - context: Context - ) async throws -> [ManagedIdentity.IdentityPublicKeyInfo] { - try await refreshedIdentityKeysAndRevision(context: context).keys - } - /// The identity's keys and revision as Platform has them, both read from /// one copy of the identity. private func refreshedIdentityKeysAndRevision( @@ -3505,11 +2256,6 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { boundIds: $0.contractBounds ), isDisabled: $0.disabledAt != nil, - isSessionKeyShaped: $0.keyTypeEnum == .ecdsaHash160 - && $0.purposeEnum == .authentication - && $0.securityLevelEnum == .high - && $0.totalBudget != nil - && $0.expiresAt != nil, // A bound of a kind this build reads whose ids or name it // cannot place is as unknown as a kind it does not read. hasUnreadableBound: !AppConnect.isReadableBound( @@ -3520,22 +2266,11 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { boundIds: $0.contractBounds, documentTypeName: $0.contractBoundsDocumentTypeName ) == nil), - isTwoQRAuthenticationKeyShaped: $0.keyTypeEnum == .ecdsaHash160 - && $0.purposeEnum == .authentication - && $0.securityLevelEnum == .high, - isTwoQREncryptionKeyShaped: $0.keyTypeEnum == .ecdsaSecp256k1 - && $0.purposeEnum == .encryption - && $0.securityLevelEnum == .medium, bound: AppConnect.storedBound( boundsKind: $0.effectiveContractBoundsKind, boundIds: $0.contractBounds, documentTypeName: $0.contractBoundsDocumentTypeName - ), - isV2AuthKeyShaped: $0.keyTypeEnum == .ecdsaHash160 - && $0.purposeEnum == .authentication - && ($0.securityLevelEnum == .high || $0.securityLevelEnum == .critical) - && $0.expiresAt != nil, - expiresAt: $0.expiresAt + ) ) } } @@ -3596,7 +2331,7 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { let stores = Stores( walletIdHex: walletIdHex, connections: store.pinned(toWalletIdHex: walletIdHex), - grants: responseStore.pinned(toWalletIdHex: walletIdHex), + intents: intentStore.pinned(toWalletIdHex: walletIdHex), endpoint: networkEndpoint()) guard await MainActor.run(body: { SwiftDashSDKHost.shared.sdk === sdk }) else { Self.logger.error("🔗 DASHCONNECT :: the SDK runtime changed while its context was read") @@ -3651,96 +2386,6 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { return context.storedUsername } - /// Publishes the login-key response, replacing the existing document when - /// this identity already has one for this app. - private func writeLoginKeyResponseDocument( - context: Context, - appContractId: Data, - propertiesJSON: String, - signer: KeychainSigner - ) async throws { - func replace(documentId: Data) async throws { - let signingKeyId = try selectDocumentSigningKeyId( - wallet: context.wallet, - identityId: context.identityId - ) - _ = try await context.wallet.replaceDocument( - ownerIdentityId: context.identityId, - contractId: try loginKeyExchangeContractId(), - documentType: Self.loginKeyExchangeDocumentType, - documentId: documentId, - propertiesJSON: propertiesJSON, - signingKeyId: signingKeyId, - signer: signer - ) - } - - if let existingDocumentId = try await findLoginKeyResponseDocumentId( - ownerIdentityId: context.identityId, - appContractId: appContractId, - sdk: context.sdk - ) { - try await replace(documentId: existingDocumentId) - return - } - - do { - _ = try await context.wallet.createDocument( - ownerIdentityId: context.identityId, - contractId: try loginKeyExchangeContractId(), - documentType: Self.loginKeyExchangeDocumentType, - propertiesJSON: propertiesJSON, - signer: signer - ) - } catch { - // The document can appear between the lookup and the create. Ask - // once more: if it is there now, the create lost that race and a - // replace is correct; if it is not, this failure is something else - // and has to surface. - guard let racedDocumentId = try? await findLoginKeyResponseDocumentId( - ownerIdentityId: context.identityId, - appContractId: appContractId, - sdk: context.sdk - ) else { - throw error - } - - try await replace(documentId: racedDocumentId) - } - } - - /// `nil` means no such document exists; a failed lookup throws. The - /// create-or-replace branch is decided on this result, so "absent" and - /// "could not tell" must not collapse into the same value. - private func findLoginKeyResponseDocumentId( - ownerIdentityId: Data, - appContractId: Data, - sdk: SDK - ) async throws -> Data? { - let whereClause = """ - [["$ownerId","==","\(ownerIdentityId.toBase58String())"],["contractId","==","\(appContractId.toBase58String())"]] - """ - - let response = try await sdk.documentList( - dataContractId: try loginKeyExchangeContractId().toBase58String(), - documentType: Self.loginKeyExchangeDocumentType, - whereClause: whereClause, - limit: 1 - ) - - guard let documents = response["documents"] as? [[String: Any]] else { - throw DashConnectPlatformError.existingDocumentLookupFailed - } - - guard let id = documents.first?["$id"] as? String else { return nil } - - guard let identifier = Self.decodeIdentifier(id), identifier.count == 32 else { - throw DashConnectPlatformError.existingDocumentLookupFailed - } - - return identifier - } - private func selectDocumentSigningKeyId( wallet: ManagedPlatformWallet, identityId: Data @@ -3797,35 +2442,12 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { } } - private static func makeManagedIdentityPubkey( - from key: DashConnectKeyRegistrationKey - ) -> ManagedPlatformWallet.IdentityPubkey { - ManagedPlatformWallet.IdentityPubkey( - keyId: key.keyId, - keyType: key.keyType, - purpose: key.purpose, - securityLevel: key.securityLevel, - pubkeyBytes: key.publicKeyData, - contractBounds: key.contractBounds.map { - switch $0 { - case .singleContract(let id): - return .singleContract(id: id) - case .singleContractDocumentType(let id, let documentTypeName): - return .singleContractDocumentType(id: id, documentTypeName: documentTypeName) - } - }, - totalBudget: key.totalBudget, - expiresAt: key.expiresAt - ) - } - /// A random 32-byte value is a valid secp256k1 scalar with overwhelming /// probability, so this exits on the first pass in practice. The bound is /// for the other failure mode: if `Secp256k1` is failing for a reason that /// has nothing to do with the candidate, an unbounded loop would hang /// `approveLogin` forever instead of surfacing an error. private static let ephemeralKeyGenerationAttempts = 8 - private static func generateEphemeralPrivateKey() throws -> Data { for _ in 0 ..< ephemeralKeyGenerationAttempts { var candidate = try randomBytes(count: 32) @@ -3860,15 +2482,6 @@ final class PlatformDashConnectDataSource: DashConnectDataSource { return nil } - private static func makeJSONObjectString(from properties: [String: AnyHashable]) throws -> String { - let dictionary = Dictionary(uniqueKeysWithValues: properties.map { ($0.key, $0.value.base) }) - let data = try JSONSerialization.data(withJSONObject: dictionary, options: [.sortedKeys]) - guard let string = String(data: data, encoding: .utf8) else { - throw CocoaError(.coderInvalidValue) - } - return string - } - /// Every key this wallet derives for one encryption grant /// (`AppConnect.derivableEncryptionKeys`): rotations at the DIP-13 path /// with the rotation level, and on testnet and devnet the path without diff --git a/DashWallet/Sources/Models/DashConnect/Protocol/DashConnectUri.swift b/DashWallet/Sources/Models/DashConnect/Protocol/DashConnectUri.swift index 6416941bdf..8283106b92 100644 --- a/DashWallet/Sources/Models/DashConnect/Protocol/DashConnectUri.swift +++ b/DashWallet/Sources/Models/DashConnect/Protocol/DashConnectUri.swift @@ -80,17 +80,15 @@ enum DashConnectUri { /// `dash-key:` is fully specified: version + compressed point + contract id /// + label length + label. /// - /// `dash-st:` carries one `IdentityUpdateTransition` that adds the two - /// login keys: identity id, revision, nonce, two key entries with their - /// contract bounds and per-key signatures, and the transition signature — - /// well under a kilobyte. The ceiling is deliberately not Platform's own - /// state-transition limit, which is far larger than this format ever needs - /// and which the decode below cannot afford: its cost is quadratic in the - /// encoded length, so a 32 KiB ceiling would admit a ~44,800-character body - /// worth ~1.5 billion inner iterations — seconds of CPU per link, from any - /// installed app. 4 KiB costs ~23 million, tens of milliseconds, and still - /// leaves several times the headroom a longer key form or an added field - /// would need. + /// `dash-st:` carries the one state transition the wallet takes, a token + /// purchase — well under a kilobyte. The ceiling is deliberately not + /// Platform's own state-transition limit, which is far larger than this + /// format ever needs and which the decode below cannot afford: its cost + /// is quadratic in the encoded length, so a 32 KiB ceiling would admit a + /// ~44,800-character body worth ~1.5 billion inner iterations — seconds + /// of CPU per link, from any installed app. 4 KiB costs ~23 million, tens + /// of milliseconds, and still leaves several times the headroom an added + /// field would need. private static let maxKeyPayloadLength = minKeyPayloadLength + maxLabelLength private static let maxStPayloadLength = 4 * 1024 /// The largest App Connect request the format defines today (a 64-byte diff --git a/DashWallet/Sources/Models/DashConnect/Protocol/KeyExchangeCrypto.swift b/DashWallet/Sources/Models/DashConnect/Protocol/KeyExchangeCrypto.swift index 92f3f36261..9fff999229 100644 --- a/DashWallet/Sources/Models/DashConnect/Protocol/KeyExchangeCrypto.swift +++ b/DashWallet/Sources/Models/DashConnect/Protocol/KeyExchangeCrypto.swift @@ -6,10 +6,7 @@ import SwiftDashSDK enum KeyExchangeCrypto { private enum CryptoError: LocalizedError { case invalidSharedXLength - case invalidLoginKeyLength - case invalidIdentityIdLength case invalidNonceLength - case invalidPayloadLength case randomNonceGenerationFailed(OSStatus) case invalidEncryptedPayload case hash160Failed @@ -20,14 +17,8 @@ enum KeyExchangeCrypto { switch self { case .invalidSharedXLength: "The ECDH shared X coordinate must be exactly 32 bytes." - case .invalidLoginKeyLength: - "DashConnect login keys must be exactly 32 bytes." - case .invalidIdentityIdLength: - "DashConnect identity IDs must be exactly 32 bytes." case .invalidNonceLength: "DashConnect AES-GCM nonces must be exactly 12 bytes." - case .invalidPayloadLength: - "DashConnect encrypted login-key payloads must be exactly 60 bytes." case .randomNonceGenerationFailed(let status): "Failed to generate a random AES-GCM nonce (\(status))." case .invalidEncryptedPayload: @@ -46,13 +37,10 @@ enum KeyExchangeCrypto { private static let aesKeyLength = 32 private static let loginKeyLength = 32 private static let nonceLength = 12 - private static let encryptedPayloadLength = 60 private static let keyExchangeSalt = Data("dash:key-exchange:v1".utf8) private static let appConnectInfo = Data("app-connect:v2".utf8) private static let appConnectAssociatedDataPrefix = Data("dash:app-connect:v2".utf8) private static let maxAppConnectSlots = 17 - private static let authInfo = Data("auth".utf8) - private static let encryptionInfo = Data("encryption".utf8) /// RIPEMD160(SHA256(data)) using the shared Rust FFI helper. /// @@ -93,20 +81,8 @@ enum KeyExchangeCrypto { return result } - /// The returned Data is owned by the caller to clear. - static func deriveAesKey(sharedX: Data) throws -> Data { - try requireLength(sharedX, expected: aesKeyLength, error: CryptoError.invalidSharedXLength) - return try deriveHKDFKey( - inputKeyMaterial: sharedX, - salt: keyExchangeSalt, - info: Data(), - outputByteCount: aesKeyLength - ) - } - - /// The AES key of an App Connect v2 response. Same salt as the legacy - /// exchange with its own `info`, so it never equals a v1 key. The - /// returned Data is owned by the caller to clear. + /// The AES key of an App Connect v2 response. The returned Data is + /// owned by the caller to clear. static func deriveAppConnectAesKey(sharedX: Data) throws -> Data { try requireLength(sharedX, expected: aesKeyLength, error: CryptoError.invalidSharedXLength) return try deriveHKDFKey( @@ -203,18 +179,6 @@ enum KeyExchangeCrypto { } } - /// The returned Data is owned by the caller to clear. - static func encryptLoginKey(_ loginKey: Data, - walletEphemeralPriv: Data, - appEphemeralPub: Data) throws -> Data { - try encryptLoginKey( - loginKey, - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub, - nonce: try randomNonce() - ) - } - private static func randomNonce() throws -> Data { var nonceBytes = [UInt8](repeating: 0, count: nonceLength) let status = SecRandomCopyBytes(kSecRandomDefault, nonceBytes.count, &nonceBytes) @@ -228,79 +192,6 @@ enum KeyExchangeCrypto { return nonce } - /// Fixed-nonce variant. Tests only — never call from the login flow. - /// - /// The returned Data is owned by the caller to clear. - static func encryptLoginKey(_ loginKey: Data, - walletEphemeralPriv: Data, - appEphemeralPub: Data, - nonce: Data) throws -> Data { - try requireLength(loginKey, expected: loginKeyLength, error: CryptoError.invalidLoginKeyLength) - try requireLength(nonce, expected: nonceLength, error: CryptoError.invalidNonceLength) - - let sharedX = try Secp256k1.ecdhSharedX(privateKey: walletEphemeralPriv, publicKey: appEphemeralPub) - let aesKey = try deriveAesKey(sharedX: sharedX) - let symmetricKey = SymmetricKey(data: aesKey) - let sealedBox = try AES.GCM.seal( - loginKey, - using: symmetricKey, - nonce: try AES.GCM.Nonce(data: nonce) - ) - - guard let combined = sealedBox.combined else { - throw CryptoError.invalidEncryptedPayload - } - assert(combined.count == encryptedPayloadLength) - guard combined.count == encryptedPayloadLength else { - throw CryptoError.invalidPayloadLength - } - - return combined - } - - /// Tests only — this exists to verify the key-exchange round trip and is not used by - /// the login flow. The returned Data is owned by the caller to clear. - static func decryptLoginKey(_ payload: Data, - walletEphemeralPriv: Data, - appEphemeralPub: Data) throws -> Data { - try requireLength(payload, expected: encryptedPayloadLength, error: CryptoError.invalidPayloadLength) - - let sharedX = try Secp256k1.ecdhSharedX(privateKey: walletEphemeralPriv, publicKey: appEphemeralPub) - let aesKey = try deriveAesKey(sharedX: sharedX) - let symmetricKey = SymmetricKey(data: aesKey) - let sealedBox = try AES.GCM.SealedBox(combined: payload) - let loginKey = try AES.GCM.open(sealedBox, using: symmetricKey) - - try requireLength(loginKey, expected: loginKeyLength, error: CryptoError.invalidLoginKeyLength) - return loginKey - } - - /// The returned Data is owned by the caller to clear. - static func deriveAuthPrivateKey(loginKey: Data, identityId: Data) throws -> Data { - try requireLength(loginKey, expected: loginKeyLength, error: CryptoError.invalidLoginKeyLength) - try requireLength(identityId, expected: loginKeyLength, error: CryptoError.invalidIdentityIdLength) - - return try deriveHKDFKey( - inputKeyMaterial: loginKey, - salt: identityId, - info: authInfo, - outputByteCount: loginKeyLength - ) - } - - /// The returned Data is owned by the caller to clear. - static func deriveEncryptionPrivateKey(loginKey: Data, identityId: Data) throws -> Data { - try requireLength(loginKey, expected: loginKeyLength, error: CryptoError.invalidLoginKeyLength) - try requireLength(identityId, expected: loginKeyLength, error: CryptoError.invalidIdentityIdLength) - - return try deriveHKDFKey( - inputKeyMaterial: loginKey, - salt: identityId, - info: encryptionInfo, - outputByteCount: loginKeyLength - ) - } - private static func deriveHKDFKey(inputKeyMaterial: Data, salt: Data, info: Data, diff --git a/DashWallet/Sources/Models/DashConnect/Protocol/LoginKeyDerivation.swift b/DashWallet/Sources/Models/DashConnect/Protocol/LoginKeyDerivation.swift deleted file mode 100644 index 8c5eca8c86..0000000000 --- a/DashWallet/Sources/Models/DashConnect/Protocol/LoginKeyDerivation.swift +++ /dev/null @@ -1,68 +0,0 @@ -import CryptoKit -import Foundation - -enum LoginKeyDerivation { - static let defaultKeyIndex = 0 - - private enum DerivationError: LocalizedError { - case invalidChainKeyLength - case invalidIdentityIdLength - case invalidAppContractIdLength - - var errorDescription: String? { - switch self { - case .invalidChainKeyLength: - "The identity auth-chain private key must be exactly 32 bytes." - case .invalidIdentityIdLength: - "DashConnect identity IDs must be exactly 32 bytes." - case .invalidAppContractIdLength: - "DashConnect app contract IDs must be exactly 32 bytes." - } - } - } - - private static let loginKeyInfoPrefix = Data("dash:login-key:v1".utf8) - private static let keyLength = 32 - - /// The returned Data is owned by the caller to clear. - static func deriveLoginKey(chainKeyPrivateBytes: Data, - identityId: Data, - appContractId: Data) throws -> Data { - guard chainKeyPrivateBytes.count == keyLength else { - throw DerivationError.invalidChainKeyLength - } - guard identityId.count == keyLength else { - throw DerivationError.invalidIdentityIdLength - } - guard appContractId.count == keyLength else { - throw DerivationError.invalidAppContractIdLength - } - - var info = loginKeyInfoPrefix - info.append(appContractId) - // The HKDF info is protocol metadata (`dash:login-key:v1` + contract ID), not a - // secret. The returned login key remains caller-owned to clear. - return try deriveHKDFKey( - inputKeyMaterial: chainKeyPrivateBytes, - salt: identityId, - info: info, - outputByteCount: keyLength - ) - } - - private static func deriveHKDFKey(inputKeyMaterial: Data, - salt: Data, - info: Data, - outputByteCount: Int) throws -> Data { - let key = HKDF.deriveKey( - inputKeyMaterial: SymmetricKey(data: inputKeyMaterial), - salt: salt, - info: info, - outputByteCount: outputByteCount - ) - - return key.withUnsafeBytes { bytes in - Data(bytes) - } - } -} diff --git a/DashWallet/Sources/UI/DashConnect/ApproveConnectionSheet.swift b/DashWallet/Sources/UI/DashConnect/ApproveConnectionSheet.swift index c4a1ef3779..001c3928e1 100644 --- a/DashWallet/Sources/UI/DashConnect/ApproveConnectionSheet.swift +++ b/DashWallet/Sources/UI/DashConnect/ApproveConnectionSheet.swift @@ -70,7 +70,7 @@ struct ApproveConnectionSheet: View { // The name above can be one the code or the // contract's owner chose. This id is what the - // approval is for: a one-QR key is bound to it. Shown + // approval is for: the app's keys are bound to it. Shown // in full and selectable, so it can be compared with // the one the app publishes. VStack(alignment: .leading, spacing: 2) { @@ -91,9 +91,9 @@ struct ApproveConnectionSheet: View { reloginNotice(existingConnection) } - // The one-QR login gives the app a key with limits of its - // own, so its terms are spelled out on a repeat sign-in - // too, and when it replaces a two-QR connection. + // An App Connect plan gives the app keys with limits of + // their own, so its terms are spelled out on a repeat + // sign-in too. if request.login == .unresolved { Text(NSLocalizedString( "This wallet could not check what this sign-in would give the app.", @@ -116,12 +116,6 @@ struct ApproveConnectionSheet: View { .foregroundColor(.secondaryText) } else if let plan = request.login.grantPlan { appConnectPermissions(plan) - } else if let terms = request.login.sessionKeyTerms { - sessionKeyPermissions(terms) - } else if isRelogin { - reloginPermissionsSummary - } else { - fullPermissions } if request.walletUsername != nil || request.walletIdentityId != nil { @@ -226,56 +220,6 @@ struct ApproveConnectionSheet: View { return candidates.first(where: { !$0.isEmpty }) ?? NSLocalizedString("Unknown app", comment: "DashConnect") } - private var fullPermissions: some View { - permissions( - granted: [ - NSLocalizedString("See your username", comment: "DashConnect"), - NSLocalizedString("Verify your identity", comment: "DashConnect"), - ], - withheld: [ - NSLocalizedString("Your private keys", comment: "DashConnect"), - NSLocalizedString("Withdraw funds", comment: "DashConnect"), - ] - ) - } - - /// The one-QR login gives the app a key of its own on the identity, so - /// the sheet names what that key can spend and when it stops working. - private func sessionKeyPermissions(_ terms: AppConnect.SessionKeyTerms) -> some View { - VStack(alignment: .leading, spacing: 20) { - permissions( - granted: [ - NSLocalizedString("See your username", comment: "DashConnect"), - NSLocalizedString("Verify your identity", comment: "DashConnect"), - NSLocalizedString("Act as you in this app without asking each time", comment: "DashConnect one-QR login"), - // Per sign-in: an earlier sign-in to the app keeps its - // own key and limit until the app is disconnected. - String( - format: NSLocalizedString( - "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit.", - comment: "DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH"), - terms.budgetText - ), - ], - withheld: [ - NSLocalizedString("Your recovery phrase or wallet keys", comment: "DashConnect one-QR login"), - NSLocalizedString("Your Dash balance", comment: "DashConnect one-QR login"), - ] - ) - - Text( - String.localizedStringWithFormat( - NSLocalizedString( - "This access ends after %d days, or when you disconnect the app.", - comment: "DashConnect one-QR login"), - terms.lifetimeDays - ) - ) - .font(.footnote) - .foregroundColor(.secondaryText) - } - } - /// An App Connect request v2: one line per key the app is given, with /// what it can spend and until when, then how old the request is and /// where the wallet returns. A draft: per-binding toggles and budget and @@ -293,8 +237,8 @@ struct ApproveConnectionSheet: View { resolvedAppLabel) }, withheld: [ - NSLocalizedString("Your recovery phrase or wallet keys", comment: "DashConnect one-QR login"), - NSLocalizedString("Your Dash balance", comment: "DashConnect one-QR login"), + NSLocalizedString("Your recovery phrase or wallet keys", comment: "DashConnect App Connect"), + NSLocalizedString("Your Dash balance", comment: "DashConnect App Connect"), NSLocalizedString("Registering names or changing your keys", comment: "DashConnect App Connect v2"), ] ) @@ -472,17 +416,6 @@ struct ApproveConnectionSheet: View { } } - private var reloginPermissionsSummary: some View { - HStack(spacing: 8) { - Icon(name: .custom("dashconnect.check.circle", maxHeight: 18)) - .frame(width: 18, height: 18) - - Text(NSLocalizedString("Same permissions as before", comment: "DashConnect re-login")) - .font(.subhead) - .foregroundColor(.primaryText) - } - } - private func reloginNotice(_ existingConnection: DAppConnection) -> some View { VStack(alignment: .leading, spacing: 6) { Text(NSLocalizedString("This connection already exists.", comment: "DashConnect re-login")) @@ -581,23 +514,7 @@ private let dashConnectTruncateMiddleCheck: Bool = { ) } -#Preview("Approve One-QR") { - ApproveConnectionSheet( - request: ConnectionRequest( - loginRequest: MockDashConnectDataSource.sampleLoginRequest, - appLabel: "Yappr", - appUrl: "yap.pr", - walletUsername: "dashuser", - walletIdentityId: "5DbLwAxEWR695MsqP4KybNQD5n7CUDWydJYNg63FzUo8", - existingConnection: nil, - login: .oneQR(.current) - ), - onApprove: {}, - onDeny: {} - ) -} - -#Preview("Approve Re-Login") { +#Preview("Older Sign-In Refused") { ApproveConnectionSheet( request: ConnectionRequest( loginRequest: MockDashConnectDataSource.sampleLoginRequest, @@ -606,7 +523,7 @@ private let dashConnectTruncateMiddleCheck: Bool = { walletUsername: "dashuser", walletIdentityId: "5DbLwAxEWR695MsqP4KybNQD5n7CUDWydJYNg63FzUo8", existingConnection: MockDashConnectDataSource.sample(.active), - login: .twoQR + login: .refused(AppConnect.v1Refusal) ), onApprove: {}, onDeny: {} diff --git a/DashWallet/Sources/UI/DashConnect/Components/ConnectionRow.swift b/DashWallet/Sources/UI/DashConnect/Components/ConnectionRow.swift index 00ac7e770c..1c4a5808aa 100644 --- a/DashWallet/Sources/UI/DashConnect/Components/ConnectionRow.swift +++ b/DashWallet/Sources/UI/DashConnect/Components/ConnectionRow.swift @@ -20,16 +20,10 @@ import DashUIKit import SwiftUI -/// One connected app: its name and url, the current status, and — once the -/// connection is live — the switch that lets this wallet forget it. -/// -/// An approved connection is not usable yet, so the row carries the prompt to -/// finish the login underneath itself rather than leaving the list to know -/// which rows need it. +/// One connected app: its name and url, the current status, and the switch +/// that turns it off. struct ConnectionRow: View { let connection: DAppConnection - let onPrimaryAction: () -> Void - let onMockScan: () -> Void let onDisconnect: () -> Void private enum Layout { @@ -48,25 +42,19 @@ struct ConnectionRow: View { } var body: some View { - VStack(alignment: .leading, spacing: 2) { - HStack(spacing: 12) { - identity - - ConnectionStatusBadge(status: connection.status, updatedAt: connection.updatedAt) - .fixedSize(horizontal: true, vertical: false) + HStack(spacing: 12) { + identity - if connection.status == .active { - activeSwitch - } - } - .padding(.horizontal, 14) - .padding(.vertical, 12) - .frame(maxWidth: .infinity, alignment: .leading) + ConnectionStatusBadge(status: connection.status, updatedAt: connection.updatedAt) + .fixedSize(horizontal: true, vertical: false) - if connection.status == .approved { - ScanToCompleteBanner(onScanQR: onPrimaryAction, onMockScan: onMockScan) - } + // A confirming connection may get its keys yet: turning it off + // makes sure it never does. + activeSwitch } + .padding(.horizontal, 14) + .padding(.vertical, 12) + .frame(maxWidth: .infinity, alignment: .leading) } private var identity: some View { @@ -86,12 +74,9 @@ struct ConnectionRow: View { .frame(maxWidth: .infinity, alignment: .topLeading) } - /// Always reads as on: the row only shows it for an active connection, and - /// only the off direction is reachable from here. What turning it off does - /// depends on the login that made the connection (see - /// `DashConnectDataSource.disconnect`): a one-QR connection has the app's - /// key disabled on the identity and its row removed; a two-QR connection - /// is downgraded to `.approved` locally and the app keeps its keys. + /// Always reads as on: only the off direction is reachable from here. + /// Turning it off turns the app's keys off on the identity and removes + /// the row (see `DashConnectDataSource.disconnect`). private var activeSwitch: some View { ZStack { SwitchView(isOn: .constant(true)) @@ -119,8 +104,6 @@ struct ConnectionRow: View { status: status, updatedAt: Date(timeIntervalSince1970: 1_754_232_520) ), - onPrimaryAction: {}, - onMockScan: {}, onDisconnect: {} ) } diff --git a/DashWallet/Sources/UI/DashConnect/Components/ConnectionStatusBadge.swift b/DashWallet/Sources/UI/DashConnect/Components/ConnectionStatusBadge.swift index 1883126f14..5d03863021 100644 --- a/DashWallet/Sources/UI/DashConnect/Components/ConnectionStatusBadge.swift +++ b/DashWallet/Sources/UI/DashConnect/Components/ConnectionStatusBadge.swift @@ -53,18 +53,25 @@ struct ConnectionStatusBadge: View { } } - /// Green only once the connection is live; the only other state is - /// `approved`, which reads as neutral blue while it waits for the next scan. + /// Green once the connection is live; `confirming` (waiting for the + /// network) reads as neutral blue, and `undelivered` (keys the app never + /// got) as orange. private var dotColor: Color { - status == .active ? Color.dash.green : Color.dash.blue + switch status { + case .active: return Color.dash.green + case .confirming: return Color.dash.blue + case .undelivered: return Color.dash.orange + } } private var title: String { switch status { - case .approved: - return NSLocalizedString("Approved", comment: "DashConnect") + case .confirming: + return NSLocalizedString("Confirming", comment: "DashConnect: an approval whose identity update may still land") case .active: return NSLocalizedString("Active", comment: "DashConnect") + case .undelivered: + return NSLocalizedString("Not delivered", comment: "DashConnect: keys are on the identity, but the app never got its response") } } } diff --git a/DashWallet/Sources/UI/DashConnect/Components/ConnectionsList.swift b/DashWallet/Sources/UI/DashConnect/Components/ConnectionsList.swift index 2fbfea899d..81f10ea7c0 100644 --- a/DashWallet/Sources/UI/DashConnect/Components/ConnectionsList.swift +++ b/DashWallet/Sources/UI/DashConnect/Components/ConnectionsList.swift @@ -20,12 +20,10 @@ import DashUIKit import SwiftUI -/// The populated state: every connection stacked in one card. Rows carry their -/// own status-specific content, so this only owns the card chrome and scroll. +/// The populated state: every connection stacked in one card. This owns the +/// card chrome and scroll. struct ConnectionsList: View { let connections: [DAppConnection] - let onScanQR: () -> Void - let onMockScan: () -> Void let onDisconnect: (DAppConnection) -> Void var body: some View { @@ -34,8 +32,6 @@ struct ConnectionsList: View { ForEach(connections) { connection in ConnectionRow( connection: connection, - onPrimaryAction: onScanQR, - onMockScan: onMockScan, onDisconnect: { onDisconnect(connection) } ) } @@ -56,8 +52,6 @@ struct ConnectionsList: View { updatedAt: Date() ) }, - onScanQR: {}, - onMockScan: {}, onDisconnect: { _ in } ) .padding(20) diff --git a/DashWallet/Sources/UI/DashConnect/Components/ScanToCompleteBanner.swift b/DashWallet/Sources/UI/DashConnect/Components/ScanToCompleteBanner.swift deleted file mode 100644 index b430344e39..0000000000 --- a/DashWallet/Sources/UI/DashConnect/Components/ScanToCompleteBanner.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// ScanToCompleteBanner.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 - -/// Prompt attached to an approved connection: approval alone does not log the -/// user in, and the same button accepts either the follow-up `dash-st:` QR or -/// a fresh `dash-key:` QR for the same app. -struct ScanToCompleteBanner: View { - let onScanQR: () -> Void - let onMockScan: () -> Void - - var body: some View { - HStack(alignment: .top, spacing: 10) { - HStack(alignment: .center, spacing: 0) { - DashIcon.SystemMessage.infoRectSmall.image - .resizable() - .scaledToFit() - .frame(width: 24, height: 24) - } - .frame(width: 30, height: 30, alignment: .center) - - HStack(alignment: .top, spacing: 20) { - Text( - NSLocalizedString("Scan the QR code to complete the login process", comment: "DashConnect") - ) - .dashFont(.subhead) - .foregroundColor(Color.dash.primaryText) - .frame(maxWidth: .infinity, alignment: .leading) - - ScanQRButton(size: .small, onScanQR: onScanQR, onMockScan: onMockScan) - } - .padding(.vertical, 5) - } - .padding(10) - .frame(maxWidth: .infinity, alignment: .topLeading) - .background(Color.dash.blueAlpha5) - .cornerRadius(20) - } -} - -#Preview { - ScanToCompleteBanner(onScanQR: {}, onMockScan: {}) - .padding() - .background(Color.primaryBackground) -} diff --git a/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift b/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift index 795b6d9b7d..9237070f7a 100644 --- a/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift +++ b/DashWallet/Sources/UI/DashConnect/ConnectionsScreen.swift @@ -40,6 +40,15 @@ struct ConnectionsScreen: View { DashUIKit.NavigationBar( leading: { DashUIKit.NavigationBarElement.back.button { vc.popViewController(animated: true) } + }, + trailing: { + // The empty state has its own scan button; a list + // needs one too, for a new code after a request that + // could not be completed. + if !viewModel.featureUnavailable && !viewModel.connections.isEmpty { + DashUIKit.NavigationBarElement.plus.button(action: showScanner) + .accessibilityLabel(Text(NSLocalizedString("Connect an app", comment: "DashConnect"))) + } } ) @@ -66,8 +75,21 @@ struct ConnectionsScreen: View { } .background(Color.primaryBackground) .navigationBarHidden(true) + .task { await viewModel.refreshConnections() } .alert(item: messageBinding) { message in - Alert( + if let connection = message.unrecordedKeysOf { + return Alert( + title: Text(message.title), + message: Text(message.text), + primaryButton: .destructive(Text(NSLocalizedString("Turn them off", comment: "DashConnect"))) { + viewModel.message = nil + viewModel.disconnect(connection, includingUnrecorded: true) + }, + secondaryButton: .cancel(Text(NSLocalizedString("Leave them", comment: "DashConnect"))) { + viewModel.message = nil + }) + } + return Alert( title: Text(message.title), message: Text(message.text), dismissButton: .default(Text(NSLocalizedString("OK", comment: ""))) { @@ -97,8 +119,6 @@ struct ConnectionsScreen: View { } else { ConnectionsList( connections: viewModel.connections, - onScanQR: showScanner, - onMockScan: mockScan, onDisconnect: viewModel.disconnect ) .padding(.horizontal, 20) @@ -114,9 +134,9 @@ struct ConnectionsScreen: View { onRetry: { viewModel.retryPendingRequest() }, onDeny: { viewModel.denyPendingRequest() } ) - // The one-QR terms make the sheet longer than the fixed height + // An App Connect plan makes the sheet longer than the fixed height // shows; who pays and when access ends must not sit below the fold. - .approveSheetPresentation(isLoading: viewModel.isApproving, isTall: request.login.sessionKeyTerms != nil || request.login.grantPlan != nil) + .approveSheetPresentation(isLoading: viewModel.isApproving, isTall: request.login.grantPlan != nil) } private func tokenPurchaseSheet(for purchase: DashConnectTokenPurchaseRequest) -> some View { @@ -205,17 +225,21 @@ struct ConnectionsScreen: View { ) } -#Preview("Approved") { +#Preview("Confirming") { + ConnectionsScreen( + vc: UINavigationController(), + viewModel: ConnectionsViewModel( + dataSource: MockDashConnectDataSource(initial: [MockDashConnectDataSource.sample(.confirming)]), + featureUnavailable: false + ) + ) +} + +#Preview("Not Delivered") { ConnectionsScreen( vc: UINavigationController(), viewModel: ConnectionsViewModel( - dataSource: MockDashConnectDataSource(initial: [.init( - id: MockDashConnectDataSource.sample(.approved).id, - name: MockDashConnectDataSource.sample(.approved).name, - url: MockDashConnectDataSource.sample(.approved).url, - status: .approved, - updatedAt: MockDashConnectDataSource.sample(.approved).updatedAt - )]), + dataSource: MockDashConnectDataSource(initial: [MockDashConnectDataSource.sample(.undelivered)]), featureUnavailable: false ) ) diff --git a/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift b/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift index 951c633952..7790868af6 100644 --- a/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift +++ b/DashWallet/Sources/UI/DashConnect/ConnectionsViewModel.swift @@ -25,10 +25,15 @@ struct ConnectionsScreenMessage: Identifiable, Equatable { enum Kind: String { case error case success + /// A question the user answers from the message itself. + case question } let kind: Kind let text: String + /// A connection the user can also turn its unrecorded keys off for, + /// from the same message. + var unrecordedKeysOf: DAppConnection? = nil var id: String { "\(kind.rawValue):\(text)" @@ -40,6 +45,8 @@ struct ConnectionsScreenMessage: Identifiable, Equatable { return NSLocalizedString("Error", comment: "") case .success: return NSLocalizedString("Success", comment: "DashConnect") + case .question: + return NSLocalizedString("Keys left on your identity", comment: "DashConnect: title of the question after a disconnect") } } } @@ -94,8 +101,8 @@ final class ConnectionsViewModel: ObservableObject { private var requestGeneration = 0 /// Whether a request is mid-flight. A newer request may supersede one that - /// is still resolving, but nothing may interrupt an approval or a key - /// registration, which are already committing to the network. + /// is still resolving, but nothing may interrupt an approval, which is + /// already committing to the network. private var isResolvingRequest = false init( @@ -187,11 +194,6 @@ final class ConnectionsViewModel: ObservableObject { defer { isProcessingStateTransition = false } switch try await dataSource.handleStateTransition(request) { - case .keyRegistrationCompleted: - message = ConnectionsScreenMessage( - kind: .success, - text: NSLocalizedString("DashConnect key registration completed.", comment: "DashConnect") - ) case let .tokenPurchaseApprovalRequired(purchase): pendingTokenPurchase = purchase } @@ -253,6 +255,7 @@ final class ConnectionsViewModel: ObservableObject { // instead of Approve; when it can again, the note says why // the approval did not go through. let rebuilt = await dataSource.makeConnectionRequest(from: pendingLoginRequest) + self.pendingFailureStatus = nil self.pendingRequest = rebuilt self.approveError = rebuilt.login == .unresolved ? nil : DashConnectPlatformError.loginUnresolved.localizedDescription @@ -376,35 +379,68 @@ final class ConnectionsViewModel: ObservableObject { } func disconnect(_ connection: DAppConnection) { - // Disconnecting a one-QR 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 screen or in - // flight, a request still resolving, a `dash-st:` in progress. + disconnect(connection, includingUnrecorded: false) + } + + /// `includingUnrecorded`: also turn off the live keys of the app, and the + /// 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) { + // 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 + // screen or in flight, a request still resolving, a `dash-st:` in + // progress. guard !isDisconnecting, !isProcessingStateTransition, !isApproving, !isApprovingPurchase, - !isResolvingRequest, pendingRequest == nil, pendingTokenPurchase == nil else { return } + !isResolvingRequest, pendingRequest == nil, pendingTokenPurchase == nil else { + // Asked for from the message after a disconnect: say why nothing + // happened rather than nothing. + if includingUnrecorded { + message = ConnectionsScreenMessage( + kind: .error, + text: NSLocalizedString( + "Finish the request on screen, then disconnect the app again.", + comment: "DashConnect: turning off unrecorded keys while another request is in progress")) + } + return + } isDisconnecting = true Task { [weak self] in guard let self else { return } defer { self.isDisconnecting = false } do { - let result = try await self.dataSource.disconnect(id: connection.id, scope: connection.scope) - // What the disconnect did with the DashPay profile keys no - // connection accounts for; said, since they may have been - // another app's. - if result.profileKeysUnchecked { - self.message = ConnectionsScreenMessage( - kind: .success, - text: NSLocalizedString( - "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off.", - comment: "DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart")) - } else if result.profileKeysTurnedOff > 0 { + let result = try await self.dataSource.disconnect( + id: connection.id, scope: connection.scope, includingUnrecorded: includingUnrecorded) + if result.unrecordedKeysLeft > 0 { + let text = result.keysTurnedOff > 0 + ? NSLocalizedString( + "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?", + comment: "DashConnect: after a disconnect that left keys no approval of this wallet names") + : NSLocalizedString( + "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?", + comment: "DashConnect: a disconnect of an app whose keys no approval of this wallet names") self.message = ConnectionsScreenMessage( - kind: .success, - text: String.localizedStringWithFormat( + 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( - "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d.", - comment: "DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off"), - result.profileKeysTurnedOff)) + "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")) } } catch { self.message = ConnectionsScreenMessage( @@ -416,6 +452,15 @@ final class ConnectionsViewModel: ObservableObject { } } + /// Reads the active identity again when the screen shows, so a + /// connection whose update landed or was turned off elsewhere shows as it + /// is. Skipped while anything else is running. + func refreshConnections() async { + guard !featureUnavailable, !isDisconnecting, !isApproving, !isApprovingPurchase, + !isProcessingStateTransition else { return } + await dataSource.refreshConnections() + } + func removeConnection(_ connection: DAppConnection) { Task { await dataSource.remove(id: connection.id, scope: connection.scope) diff --git a/DashWallet/Sources/UI/Menu/Settings/DevnetSettingsScreen.swift b/DashWallet/Sources/UI/Menu/Settings/DevnetSettingsScreen.swift index 6651179536..8313d47454 100644 --- a/DashWallet/Sources/UI/Menu/Settings/DevnetSettingsScreen.swift +++ b/DashWallet/Sources/UI/Menu/Settings/DevnetSettingsScreen.swift @@ -23,7 +23,7 @@ import UIKit // MARK: - DevnetSettingsViewModel -/// Settings → Devnet Settings. Edits the three user-editable devnet values +/// Settings → Devnet Settings. Edits the two user-editable devnet values /// (`DevnetConfiguration`) and, when the wallet is already running on /// devnet, restarts the runtime so a changed quorum URL / devnet name takes /// effect immediately (the SDK reads them only at build/SPV-start time). @@ -31,7 +31,6 @@ import UIKit final class DevnetSettingsViewModel: ObservableObject { @Published var quorumURL: String @Published var devnetName: String - @Published var dashConnectContractId: String @Published var statusMessage: String? /// Why the typed devnet name was refused, shown under the field. Nil /// while the name is usable — including while it is empty, which is how @@ -53,7 +52,6 @@ final class DevnetSettingsViewModel: ObservableObject { let name = DevnetConfiguration.devnetName ?? "" quorumURL = quorum devnetName = name - dashConnectContractId = DevnetConfiguration.dashConnectContractId ?? "" initialQuorumURL = quorum initialDevnetName = name } @@ -71,7 +69,6 @@ final class DevnetSettingsViewModel: ObservableObject { devnetNameError = nil let newQuorumURL = quorumURL.trimmingCharacters(in: .whitespacesAndNewlines) - let newContractId = dashConnectContractId.trimmingCharacters(in: .whitespacesAndNewlines) let networkValuesChanged = newQuorumURL != initialQuorumURL || trimmedName != initialDevnetName let willBeConfigured = !newQuorumURL.isEmpty && !trimmedName.isEmpty @@ -87,8 +84,6 @@ final class DevnetSettingsViewModel: ObservableObject { "Saved, but Devnet needs both a Quorum URL and a Devnet Name — syncing will fail until both are set.", comment: "Devnet") } else if !networkValuesChanged { - // The contract id is read per DashConnect approval; no runtime - // restart is needed for it. statusMessage = NSLocalizedString("Saved.", comment: "Devnet") } else { statusMessage = NSLocalizedString( @@ -113,7 +108,6 @@ final class DevnetSettingsViewModel: ObservableObject { ) { DevnetConfiguration.setQuorumURL(newQuorumURL) DevnetConfiguration.setDevnetName(trimmedName) - DevnetConfiguration.setDashConnectContractId(newContractId) } self?.isApplying = false } @@ -165,15 +159,6 @@ struct DevnetSettingsScreen: View { comment: "Devnet"), error: viewModel.devnetNameError) - field( - title: NSLocalizedString("DashConnect Contract ID", comment: "Devnet"), - placeholder: NSLocalizedString("Base58 identifier (optional)", comment: "Devnet"), - text: $viewModel.dashConnectContractId, - keyboard: .default, - helper: NSLocalizedString( - "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise.", - comment: "Devnet")) - DashButton( text: NSLocalizedString("Save", comment: ""), style: .filled, diff --git a/DashWallet/ar.lproj/Localizable.strings b/DashWallet/ar.lproj/Localizable.strings index a7d85e1176..d5863cfa5a 100644 --- a/DashWallet/ar.lproj/Localizable.strings +++ b/DashWallet/ar.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "لا يمكن لعبارة استرداد محفظة واحدة أن تصرّح بحذف عدة محافظ مختلفة."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "نشط"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "تم قطع الاتصال"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "تُخزَّن المفاتيح في سلسلة مفاتيح هذا الجهاز ولا تغادرها أبدًا إلا لتوقيع الإجراء الذي تطلبه."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "المفاتيح على هذا الجهاز"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "دع مستخدم Dash Wallet آخر يمسح هذا الرمز لإضافتك كجهة اتصال."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "حفظ"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "مسح للإرسال"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "تأكيد الانفاق"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "السلسلة قيد المزامنة ..."; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "لا يمكن اختيار الهوية الرئيسية إلا من المحفظة النشطة"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "يطبّق هذا خيارًا واحدًا على جميع أسماء المستخدمين المحددة البالغ عددها %d."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "تعذّر على هذه المحفظة اشتقاق مفتاح التصويت لهذه العقدة."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "لا تحتفظ هذه المحفظة بمفتاح المالك ولا بمفتاح عنوان الدفع لهذه الـ evonode، لذا لا يمكن سحب رصيدها من هنا."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "رصيدك الخاص. المبالغ والعناوين مشفّرة على السلسلة، فتبقى ممتلكاتك وسجلك سريّين."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/bg.lproj/Localizable.strings b/DashWallet/bg.lproj/Localizable.strings index c6ef9f6a2c..6e1616cc92 100644 --- a/DashWallet/bg.lproj/Localizable.strings +++ b/DashWallet/bg.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Фразата за възстановяване на един портфейл не може да разреши изтриването на няколко различни портфейла."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Активен"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Ключовете се съхраняват в keychain на това устройство и никога не го напускат, освен за да подпишат действието, което поискате."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Ключове на това устройство"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Нека друг потребител на Dash Wallet сканира този код, за да ви добави като контакт."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Съхрани"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Сканиране за изпращане"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Потвърждение за похарчване"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Основната самоличност може да бъде избрана само от активния портфейл"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Това прилага един избор върху всички %d избрани потребителски имена."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Този портфейл не успя да изведе ключа за гласуване за този възел."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Този портфейл не притежава нито ключа на собственика, нито ключа на адреса за изплащане на този evonode, така че балансът му не може да бъде изтеглен оттук."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Включи парола за устройството"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Вашият поверителен баланс. Сумите и адресите са криптирани във веригата, така че притежанията и историята ви остават поверителни."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/ca.lproj/Localizable.strings b/DashWallet/ca.lproj/Localizable.strings index 0e43326608..818470670f 100644 --- a/DashWallet/ca.lproj/Localizable.strings +++ b/DashWallet/ca.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "La frase de recuperació d'una sola cartera no pot autoritzar la supressió de diverses carteres diferents."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Actiu"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Les claus es desen al clauer d'aquest dispositiu i mai no en surten, tret de per signar l'acció que demanis."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Claus en aquest dispositiu"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Deixa que un altre usuari de Dash Wallet escanegi aquest codi per afegir-te com a contacte."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Desa"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "La identitat principal només es pot triar des de la cartera activa"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Això aplica una sola opció a tots els %d noms d'usuari seleccionats."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Aquesta cartera no ha pogut derivar la clau de vot d'aquest node."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Aquesta cartera no té ni la clau de propietari ni la clau de l'adreça de pagament d'aquest evonode, així que el seu saldo no es pot retirar des d'aquí."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "El teu saldo privat. Els imports i les adreces estan xifrats a la cadena, de manera que les teves tinences i el teu historial es mantenen confidencials."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/cs.lproj/Localizable.strings b/DashWallet/cs.lproj/Localizable.strings index c33654520b..b776a617aa 100644 --- a/DashWallet/cs.lproj/Localizable.strings +++ b/DashWallet/cs.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Fráze pro obnovení jedné peněženky nemůže autorizovat smazání několika různých peněženek."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktivní"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Odpojeno"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Klíče jsou uloženy v keychainu tohoto zařízení a nikdy jej neopouštějí, kromě podepsání akce, o kterou požádáte."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Klíče na tomto zařízení"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Nechte jiného uživatele Dash Wallet naskenovat tento kód, aby si vás přidal jako kontakt."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Uložit"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Poslat skenováním"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Potvrzení"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Hlavní identitu lze vybrat pouze z aktivní peněženky"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Toto použije jednu volbu na všech %d vybraných uživatelských jmen."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Tato peněženka nedokázala odvodit hlasovací klíč pro tento uzel."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Tato peněženka nemá ani klíč vlastníka, ani klíč výplatní adresy tohoto evonodu, takže jeho zůstatek odsud vybrat nelze."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Zapněte bezpečnostní kód zařízení"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Váš soukromý zůstatek. Částky a adresy jsou v řetězci zašifrované, takže vaše prostředky i historie zůstávají důvěrné."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/da.lproj/Localizable.strings b/DashWallet/da.lproj/Localizable.strings index 53d53ad6ab..26d14f2de3 100644 --- a/DashWallet/da.lproj/Localizable.strings +++ b/DashWallet/da.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "En enkelt tegnebogs gendannelsessætning kan ikke godkende sletning af flere forskellige tegnebøger."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiv"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Nøglerne opbevares i denne enheds keychain og forlader den aldrig, undtagen for at signere den handling, du beder om."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Nøgler på denne enhed"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Lad en anden Dash Wallet-bruger scanne denne kode for at tilføje dig som kontakt."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Gem"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Den primære identitet kan kun vælges fra den aktive tegnebog"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Dette anvender ét valg på alle %d valgte brugernavne."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Denne tegnebog kunne ikke aflede afstemningsnøglen til denne node."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Denne tegnebog har hverken ejernøglen eller nøglen til udbetalingsadressen for denne evonode, så dens saldo kan ikke hæves herfra."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Din private saldo. Beløb og adresser er krypteret på kæden, så din beholdning og din historik forbliver fortrolige."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/de.lproj/Localizable.strings b/DashWallet/de.lproj/Localizable.strings index d830aae755..f7019c3334 100644 --- a/DashWallet/de.lproj/Localizable.strings +++ b/DashWallet/de.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Die Wiederherstellungs-Wortfolge einer einzelnen Wallet kann das Löschen mehrerer verschiedener Wallets nicht autorisieren."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiv"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "zurück"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Verbinde deine Krypto-Wallets mit der Zenledger Plattform. Lerne mehr darüber und beginne mit deinen Transaktionen in der Dash Wallet."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Verbindung getrennt"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Rabatt"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Schlüssel werden in der Keychain dieses Geräts gespeichert und verlassen sie nur, um die von dir angeforderte Aktion zu signieren."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Schlüssel auf diesem Gerät"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Lass einen anderen Dash-Wallet-Nutzer diesen Code scannen, um dich als Kontakt hinzuzufügen."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Nicht festgelegt"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Speichern"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scanne den QR Code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Zum Senden scannen"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Ausgegeben"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Zahlungsbestätigungen"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Die Chain synchronisiert..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Die Hauptidentität kann nur aus der aktiven Wallet gewählt werden"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Dies wendet eine Auswahl auf alle %d ausgewählten Benutzernamen an."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Diese Wallet konnte den Abstimmungsschlüssel für diesen Node nicht ableiten."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Diese Wallet besitzt weder den Besitzer-Schlüssel noch den Schlüssel der Auszahlungsadresse dieses Evonodes, daher kann sein Guthaben nicht von hier ausgezahlt werden."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Gerätecode aktivieren"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Dein privates Guthaben. Beträge und Adressen sind on-chain verschlüsselt, sodass deine Bestände und dein Verlauf vertraulich bleiben."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/el.lproj/Localizable.strings b/DashWallet/el.lproj/Localizable.strings index b83b348168..ceff7f8425 100644 --- a/DashWallet/el.lproj/Localizable.strings +++ b/DashWallet/el.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Η φράση ανάκτησης ενός μόνο πορτοφολιού δεν μπορεί να εξουσιοδοτήσει τη διαγραφή πολλών διαφορετικών πορτοφολιών."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Ενεργό"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "πίσω "; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Συνδέστε τα πορτοφόλια σας με την πλατφόρμα ZenLedger. Μάθετε περισσότερα και ξεκινήστε τις συναλλαγές σας με το Dash Wallet."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Αποσυνδεδεμένο"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Έκπτωση"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Τα κλειδιά αποθηκεύονται στο keychain αυτής της συσκευής και δεν το εγκαταλείπουν ποτέ, παρά μόνο για να υπογράψουν την ενέργεια που ζητάτε."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Κλειδιά σε αυτή τη συσκευή"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Αφήστε έναν άλλο χρήστη του Dash Wallet να σαρώσει αυτόν τον κωδικό για να σας προσθέσει ως επαφή."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Δεν έχει καθοριστεί"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Αποθήκευση"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Σάρωση QR κωδικού"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Σαρώστε για να Στείλετε"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Ξοδέψτε"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Επιβεβαίωση Ξοδέματος"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Το blockchain συγχρονίζεται..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Η κύρια ταυτότητα μπορεί να επιλεγεί μόνο από το ενεργό πορτοφόλι"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Αυτό εφαρμόζει μία επιλογή σε όλα τα %d επιλεγμένα ονόματα χρήστη."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Αυτό το πορτοφόλι δεν μπόρεσε να παραγάγει το κλειδί ψήφου για αυτόν τον κόμβο."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Αυτό το πορτοφόλι δεν κατέχει ούτε το κλειδί ιδιοκτήτη ούτε το κλειδί της διεύθυνσης πληρωμής αυτού του evonode, οπότε το υπόλοιπό του δεν μπορεί να αποσυρθεί από εδώ."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Ενεργοποιήστε τον κωδικό πρόσβασης της συσκευής"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Το ιδιωτικό σας υπόλοιπο. Τα ποσά και οι διευθύνσεις είναι κρυπτογραφημένα στην αλυσίδα, ώστε τα διαθέσιμα και το ιστορικό σας να παραμένουν εμπιστευτικά."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/en.lproj/Localizable.strings b/DashWallet/en.lproj/Localizable.strings index 09ed91dbce..e7d88634b9 100644 --- a/DashWallet/en.lproj/Localizable.strings +++ b/DashWallet/en.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "A single wallet's recovery phrase cannot authorize deleting multiple different wallets."; @@ -409,9 +403,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* Wallet preparation and support */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Active"; @@ -674,9 +665,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -831,9 +819,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1231,9 +1216,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1658,12 +1649,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1782,11 +1767,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2170,6 +2152,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2725,6 +2710,9 @@ /* Tracked masternodes */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Keys are stored in this device's keychain and never leave it except to sign the action you request."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* Tracked masternodes */ "Keys on this device" = "Keys on this device"; @@ -2792,6 +2780,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Let another Dash Wallet user scan this code to add you as a contact."; @@ -3497,6 +3488,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Save"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5016,9 +5004,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5314,12 +5299,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5374,9 +5353,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5422,9 +5398,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "The main identity can only be chosen from the active wallet"; @@ -5461,6 +5434,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5659,9 +5635,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5686,15 +5659,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "This applies one choice to all %d selected usernames."; @@ -5911,6 +5893,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "This wallet could not derive the voting key for this node."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5923,6 +5914,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* Evonode withdrawal */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7169,8 +7166,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/eo.lproj/Localizable.strings b/DashWallet/eo.lproj/Localizable.strings index 7f908b83ed..23f8ae483b 100644 --- a/DashWallet/eo.lproj/Localizable.strings +++ b/DashWallet/eo.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "La reakira frazo de unu sola monujo ne povas rajtigi la forigon de pluraj malsamaj monujoj."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiva"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "La ŝlosiloj estas konservataj en la ŝlosilaro de ĉi tiu aparato kaj neniam forlasas ĝin, krom por subskribi la agon, kiun vi petas."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Ŝlosiloj sur ĉi tiu aparato"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Lasu alian uzanton de Dash Wallet skani ĉi tiun kodon por aldoni vin kiel kontakton."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Savi"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "La ĉefa identeco elekteblas nur el la aktiva monujo"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Ĉi tio aplikas unu elekton al ĉiuj %d elektitaj uzantnomoj."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Ĉi tiu monujo ne povis derivi la voĉdonan ŝlosilon por ĉi tiu nodo."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ĉi tiu monujo havas nek la ŝlosilon de la posedanto nek la ŝlosilon de la pagadreso de ĉi tiu evonode, do ĝia saldo ne estas elprenebla de ĉi tie."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Via privata saldo. Sumoj kaj adresoj estas ĉifritaj en la ĉeno, do viaj havaĵoj kaj historio restas konfidencaj."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/es.lproj/Localizable.strings b/DashWallet/es.lproj/Localizable.strings index e757fed54c..2566be3312 100644 --- a/DashWallet/es.lproj/Localizable.strings +++ b/DashWallet/es.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "La frase de recuperación de una sola cartera no puede autorizar la eliminación de varias carteras distintas."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Activo"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "detrás"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Conecta tus billeteras criptográficas a la plataforma ZenLedger. Obten más información y comienza con tus transacciones de Dash Wallet."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Desconectado"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Descuento"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Las claves se guardan en el llavero de este dispositivo y nunca salen de él salvo para firmar la acción que solicites."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Claves en este dispositivo"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Deja que otro usuario de Dash Wallet escanee este código para añadirte como contacto."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "No determinado"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Guardar"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Escanear código QR"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Escanear para Envia"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Gastar"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Confirmación de Gasto"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "La cadena esta sincronizando..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "La identidad principal solo se puede elegir desde la billetera activa"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Esto aplica una opción a los %d nombres de usuario seleccionados."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Esta billetera no pudo derivar la llave de voto de este nodo."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Esta cartera no tiene ni la clave de propietario ni la clave de la dirección de pago de este evonode, así que su saldo no se puede retirar desde aquí."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Habilita la clave de acceso de tu dispositivo"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Tu saldo privado. Los importes y las direcciones están cifrados en la cadena, así que tus fondos y tu historial se mantienen confidenciales."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/et.lproj/Localizable.strings b/DashWallet/et.lproj/Localizable.strings index 12d30c04c7..de10796817 100644 --- a/DashWallet/et.lproj/Localizable.strings +++ b/DashWallet/et.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Ühe rahakoti taastefraas ei saa lubada mitme erineva rahakoti kustutamist."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiivne"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Võtmeid hoitakse selle seadme võtmehoidjas ja need ei lahku sealt kunagi, välja arvatud sinu soovitud toimingu allkirjastamiseks."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Võtmed selles seadmes"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Lase teisel Dash Walleti kasutajal see kood skannida, et lisada sind kontaktiks."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Save"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Peamist identiteeti saab valida ainult aktiivsest rahakotist"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "See rakendab ühe valiku kõigile %d valitud kasutajanimele."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "See rahakott ei suutnud selle sõlme hääletusvõtit tuletada."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Sellel rahakotil pole ei selle evonode'i omaniku võtit ega väljamakseaadressi võtit, seega ei saa selle jääki siit välja võtta."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Su privaatne jääk. Summad ja aadressid on ahelas krüptitud, nii et su varad ja ajalugu jäävad konfidentsiaalseks."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/fa.lproj/Localizable.strings b/DashWallet/fa.lproj/Localizable.strings index fc2371df5d..c9ed14db48 100644 --- a/DashWallet/fa.lproj/Localizable.strings +++ b/DashWallet/fa.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "عبارت بازیابی یک کیف پول نمی‌تواند حذف چند کیف پول متفاوت را مجاز کند."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "فعال"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "عقب"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "کیف‌های پول‌تان را به پلتفرم ذن‌لجر متصل کنید. اطلاعات بیشتر و آغاز به کار با تراکنش‌هایتان در دش والت"; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "عدم اتصال به شبکه"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "تخفیف"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "کلیدها در کی‌چین این دستگاه ذخیره می‌شوند و جز برای امضای کاری که درخواست می‌کنید هرگز از آن خارج نمی‌شوند."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "کلیدهای روی این دستگاه"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "بگذارید کاربر دیگر Dash Wallet این کد را اسکن کند تا شما را به‌عنوان مخاطب اضافه کند."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "ذخیره"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "اسکن برای ارسال "; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "خرج کردن"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "تائید پرداخت"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "بلاکچین در حال به‌روزرسانی..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "هویت اصلی را تنها می‌توان از کیف پول فعال انتخاب کرد"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "این کار یک انتخاب را روی هر %d نام کاربری انتخاب‌شده اعمال می‌کند."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "این کیف پول نتوانست کلید رأی‌گیری این گره را اشتقاق دهد."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "این کیف پول نه کلید مالک و نه کلید نشانی پرداخت این evonode را دارد، بنابراین موجودی آن را نمی‌توان از اینجا برداشت کرد."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "موجودی خصوصی شما. مبالغ و نشانی‌ها روی زنجیره رمزگذاری می‌شوند، پس دارایی‌ها و تاریخچه شما محرمانه می‌مانند."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/fi.lproj/Localizable.strings b/DashWallet/fi.lproj/Localizable.strings index 7b0696abeb..ea0ae8887f 100644 --- a/DashWallet/fi.lproj/Localizable.strings +++ b/DashWallet/fi.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Yhden lompakon palautuslause ei voi valtuuttaa useiden eri lompakoiden poistamista."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiivinen"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Avaimet säilytetään tämän laitteen avainnipussa eivätkä ne poistu siitä muutoin kuin pyytämäsi toiminnon allekirjoittamiseksi."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Avaimet tällä laitteella"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Anna toisen Dash Wallet -käyttäjän skannata tämä koodi lisätäkseen sinut yhteystiedoksi."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Tallenna"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Pääidentiteetin voi valita vain aktiivisesta lompakosta"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Tämä soveltaa yhtä valintaa kaikkiin %d valittuun käyttäjätunnukseen."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Tämä lompakko ei pystynyt johtamaan äänestysavainta tälle solmulle."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Tässä lompakossa ei ole tämän evonoden omistajan avainta eikä maksuosoitteen avainta, joten sen saldoa ei voi nostaa täältä."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Yksityinen saldosi. Summat ja osoitteet on salattu ketjussa, joten omistuksesi ja historiasi pysyvät luottamuksellisina."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/fil.lproj/Localizable.strings b/DashWallet/fil.lproj/Localizable.strings index 59144625e8..d620c0fa1a 100644 --- a/DashWallet/fil.lproj/Localizable.strings +++ b/DashWallet/fil.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Hindi puwedeng pahintulutan ng recovery phrase ng iisang wallet ang pagbura ng maraming magkakaibang wallet."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktibo"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "sa huli"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Ikonekta ang iyong mga crypto wallet sa platform ng ZenLedger. Matuto pa at magsimula sa iyong mga transaksyon sa Dash Wallet."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Idiskonekta"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Diskwento"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Nakaimbak ang mga key sa keychain ng device na ito at hindi kailanman umaalis dito maliban para lagdaan ang aksyong hinihiling mo."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Mga key sa device na ito"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Pa-scan ang code na ito sa ibang user ng Dash Wallet para maidagdag ka bilang contact."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Hindi determinado"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "I-save"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "I-scan ang QR Code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "I-scan para magpadala"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Gumastos"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Kumpirmasyon ng nagastos"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Nagsi-sync ang chain…"; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Mapipili lang ang pangunahing pagkakakilanlan mula sa aktibong wallet"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Inilalapat nito ang iisang pagpipilian sa lahat ng %d napiling username."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Hindi nailabas ng wallet na ito ang voting key para sa node na ito."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Hindi hawak ng wallet na ito ang owner key o ang key ng payout address ng evonode na ito, kaya hindi mai-withdraw mula rito ang balanse nito."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "I-turn on ang device passcode"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Ang iyong pribadong balanse. Naka-encrypt on-chain ang mga halaga at address, kaya nananatiling kumpidensyal ang hawak at kasaysayan mo."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/fr.lproj/Localizable.strings b/DashWallet/fr.lproj/Localizable.strings index d03707ac4a..becd285443 100644 --- a/DashWallet/fr.lproj/Localizable.strings +++ b/DashWallet/fr.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "La phrase de récupération d'un seul portefeuille ne peut pas autoriser la suppression de plusieurs portefeuilles différents."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Actif"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "en arrière"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connectez vos portefeuilles crypto à la plateforme ZenLedger. En savoir plus et se lancer avec vos transactions Dash Wallet."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Déconnecté"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Réduction"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Les clés sont stockées dans le trousseau de cet appareil et n'en sortent jamais, sauf pour signer l'action que vous demandez."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Clés sur cet appareil"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Laissez un autre utilisateur de Dash Wallet scanner ce code pour vous ajouter en contact."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Indéterminé"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Enregistrer"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scanner le code QR"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scanner pour envoyer"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Dépenser"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Confirmation de dépense"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Synchronisation de la chaîne..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "L'identité principale ne peut être choisie que dans le portefeuille actif"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Cela applique un seul choix aux %d noms d'utilisateur sélectionnés."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Ce portefeuille n'a pas pu dériver la clé de vote de ce nœud."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ce portefeuille ne détient ni la clé de propriétaire ni la clé de l'adresse de paiement de cet evonode : son solde ne peut donc pas être retiré d'ici."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Activer le code d'accès de l'appareil"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Votre solde privé. Les montants et les adresses sont chiffrés on-chain, vos avoirs et votre historique restent donc confidentiels."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/hr.lproj/Localizable.strings b/DashWallet/hr.lproj/Localizable.strings index 4b83aa2180..82a30400d8 100644 --- a/DashWallet/hr.lproj/Localizable.strings +++ b/DashWallet/hr.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Fraza za oporavak jednog novčanika ne može odobriti brisanje više različitih novčanika."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktivan"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Ključevi se čuvaju u keychainu ovog uređaja i nikada ga ne napuštaju, osim da potpišu radnju koju zatražite."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Ključevi na ovom uređaju"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Neka drugi korisnik Dash Walleta skenira ovaj kod kako bi vas dodao kao kontakt."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Spremi"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Glavni identitet može se odabrati samo iz aktivnog novčanika"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Ovo primjenjuje jedan odabir na svih %d odabranih korisničkih imena."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Ovaj novčanik nije mogao izvesti ključ za glasanje za ovaj čvor."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ovaj novčanik nema ni ključ vlasnika ni ključ adrese za isplatu ovog evonodea, pa se njegovo stanje ne može povući odavde."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Vaše privatno stanje. Iznosi i adrese šifrirani su na lancu, pa vaša sredstva i povijest ostaju povjerljivi."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/hu.lproj/Localizable.strings b/DashWallet/hu.lproj/Localizable.strings index 96f9d91b41..b9de039984 100644 --- a/DashWallet/hu.lproj/Localizable.strings +++ b/DashWallet/hu.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Egyetlen tárca helyreállítási kifejezése nem engedélyezheti több különböző tárca törlését."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktív"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "A kulcsok ennek az eszköznek a kulcstartójában vannak, és soha nem hagyják el, kivéve az általad kért művelet aláírásához."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Kulcsok ezen az eszközön"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Olvastasd be ezt a kódot egy másik Dash Wallet felhasználóval, hogy felvegyen a névjegyei közé."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Mentés"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "A fő identitás csak az aktív tárcából választható"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Ez egyetlen választást alkalmaz mind a(z) %d kijelölt felhasználónévre."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Ez a tárca nem tudta származtatni a szavazókulcsot ehhez a csomóponthoz."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ez a tárca sem az evonode tulajdonosi kulcsát, sem a kifizetési címének kulcsát nem birtokolja, így az egyenlege innen nem vehető ki."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "A privát egyenleged. Az összegek és a címek titkosítva vannak a láncon, így a vagyonod és az előzményeid bizalmasak maradnak."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/id.lproj/Localizable.strings b/DashWallet/id.lproj/Localizable.strings index ac9881a0f6..39346c5406 100644 --- a/DashWallet/id.lproj/Localizable.strings +++ b/DashWallet/id.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Frasa pemulihan satu dompet tidak dapat mengizinkan penghapusan beberapa dompet berbeda."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktif"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "dibelakang"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Hubungkan dompet crypto anda ke platform Zenledger. Pelajari lebih lanjut dan mulai dengan transaksi Domept Dash."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Terputus"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Diskon"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Kunci disimpan di keychain perangkat ini dan tidak pernah keluar darinya kecuali untuk menandatangani tindakan yang Anda minta."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Kunci di perangkat ini"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Biarkan pengguna Dash Wallet lain memindai kode ini untuk menambahkan Anda sebagai kontak."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Tidak ditentukan"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Simpan"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan kode QR"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Pindai untuk mengirim"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Membelanjakan"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Konfirmasi Pengiriman"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Rantai sedang menyinkronkan…"; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Identitas utama hanya dapat dipilih dari dompet yang aktif"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Ini menerapkan satu pilihan ke semua %d nama pengguna yang dipilih."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Dompet ini tidak dapat menurunkan kunci pemungutan suara untuk node ini."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Dompet ini tidak memegang kunci pemilik maupun kunci alamat pembayaran evonode ini, jadi saldonya tidak dapat ditarik dari sini."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Aktifkan kode sandi perangkat"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Saldo privat Anda. Jumlah dan alamat dienkripsi on-chain, sehingga kepemilikan dan riwayat Anda tetap rahasia."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/it.lproj/Localizable.strings b/DashWallet/it.lproj/Localizable.strings index 850b6ba7d4..83549f40bd 100644 --- a/DashWallet/it.lproj/Localizable.strings +++ b/DashWallet/it.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "La frase di recupero di un singolo portafoglio non può autorizzare l'eliminazione di più portafogli diversi."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Attivo"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "indietro"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Collega i tuoi portafogli crypto alla piattaforma ZenLedger. Scopri di più e inizia con le transazioni del tuo Portafoglio Dash."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnesso"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Sconto"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Le chiavi sono conservate nel portachiavi di questo dispositivo e non lo lasciano mai, se non per firmare l'azione che richiedi."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Chiavi su questo dispositivo"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Fai scansionare questo codice a un altro utente di Dash Wallet per farti aggiungere come contatto."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Non determinato"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Salva"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scansiona il codice QR"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scansiona per inviare"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Speso"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Conferma della spesa"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "La catena si sta sincronizzando..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "L'identità principale può essere scelta solo dal portafoglio attivo"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Questo applica una sola scelta a tutti i %d nomi utente selezionati."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Questo portafoglio non è riuscito a derivare la chiave di voto per questo nodo."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Questo portafoglio non possiede né la chiave del proprietario né la chiave dell'indirizzo di pagamento di questo evonode, quindi il suo saldo non può essere prelevato da qui."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Attiva codice d'accesso dispositivo"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Il tuo saldo privato. Importi e indirizzi sono cifrati on-chain, così le tue disponibilità e la tua cronologia restano riservate."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/ja.lproj/Localizable.strings b/DashWallet/ja.lproj/Localizable.strings index b1fa0581c0..2e11969ff5 100644 --- a/DashWallet/ja.lproj/Localizable.strings +++ b/DashWallet/ja.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "1 つのウォレットの復元フレーズでは、複数の異なるウォレットの削除を承認できません。"; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "有効"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "下回る"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "お手持ちのクリプトウォレットをZenLedgerのプラットフォームと紐づけましょう。詳細をご確認の上、Dashウォレットの取引を始めましょう。"; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "切断されました"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "割引"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "キーはこの端末のキーチェーンに保存され、あなたが要求した操作に署名する場合を除き、外部に出ることはありません。"; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "この端末のキー"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "別の Dash Wallet ユーザーにこのコードをスキャンしてもらうと、あなたを連絡先に追加できます。"; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "未定"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "保存する"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "QRコードをスキャンする"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "スキャンして送金する"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "使う"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "支出の確認"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "チェーンを同期中"; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "メインのアイデンティティはアクティブなウォレットからのみ選択できます"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "選択した %d 件のユーザー名すべてに 1 つの選択を適用します。"; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "このウォレットはこのノードの投票キーを導出できませんでした。"; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "このウォレットはこの evonode のオーナー キーも支払アドレス キーも保持していないため、その残高をここから出金することはできません。"; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "端末のパスコードを有効に"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "プライベートな残高です。金額とアドレスはオンチェーンで暗号化されるため、保有額と履歴は非公開のままです。"; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/ko.lproj/Localizable.strings b/DashWallet/ko.lproj/Localizable.strings index ddfb7c45b5..b7d910e5d4 100644 --- a/DashWallet/ko.lproj/Localizable.strings +++ b/DashWallet/ko.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "지갑 하나의 복원 문구로는 여러 다른 지갑의 삭제를 승인할 수 없습니다."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "활성"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "뒤"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "당신의 암호화폐 지갑을 Zenledger 플랫폼에 연결하세요. 자세한 내용을 확인하시고 대시 지갑 거래를 통해 지금 시작하세요."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "연결 해제"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "할인"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "키는 이 기기의 키체인에 저장되며, 회원님이 요청한 작업에 서명할 때를 제외하고는 기기를 벗어나지 않습니다."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "이 기기의 키"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "다른 Dash Wallet 사용자가 이 코드를 스캔하면 회원님을 연락처로 추가할 수 있습니다."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "결정되지 않음"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "저장"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "QR 코드 스캔"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "전송을 위해 스캔합니다"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "지출"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "승인 보내는 중"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "체인 동기화 중..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "기본 아이덴티티는 활성 지갑에서만 선택할 수 있습니다"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "선택한 %d개의 사용자 이름 전체에 하나의 선택을 적용합니다."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "이 지갑은 이 노드의 투표 키를 파생할 수 없습니다."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "이 지갑은 이 evonode의 소유자 키도 지급 주소 키도 보유하고 있지 않아 여기서는 잔액을 출금할 수 없습니다."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "비밀번호 켜기"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "비공개 잔액입니다. 금액과 주소가 온체인에서 암호화되어 보유액과 내역이 비밀로 유지됩니다."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/mk.lproj/Localizable.strings b/DashWallet/mk.lproj/Localizable.strings index 337d6520f8..a11cbc9c58 100644 --- a/DashWallet/mk.lproj/Localizable.strings +++ b/DashWallet/mk.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Фразата за обновување на еден паричник не може да овласти бришење на повеќе различни паричници."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Активен"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Клучевите се чуваат во keychain на овој уред и никогаш не го напуштаат, освен за да го потпишат дејството што го барате."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Клучеви на овој уред"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Дозволете друг корисник на Dash Wallet да го скенира овој код за да ве додаде како контакт."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Зачувај"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Главниот идентитет може да се избере само од активниот паричник"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Ова применува еден избор на сите %d избрани кориснички имиња."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Овој паричник не можеше да го изведе клучот за гласање за овој јазол."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Овој паричник го нема ниту клучот на сопственикот ниту клучот на адресата за исплата на овој evonode, па неговото салдо не може да се повлече од тука."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Вашето приватно салдо. Износите и адресите се шифрирани на синџирот, па вашите средства и историја остануваат доверливи."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/ms.lproj/Localizable.strings b/DashWallet/ms.lproj/Localizable.strings index 962cf0a040..72a5ac884d 100644 --- a/DashWallet/ms.lproj/Localizable.strings +++ b/DashWallet/ms.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Frasa pemulihan satu dompet tidak boleh membenarkan pemadaman beberapa dompet yang berbeza."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktif"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Kunci disimpan dalam keychain peranti ini dan tidak pernah keluar daripadanya kecuali untuk menandatangani tindakan yang anda minta."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Kunci pada peranti ini"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Biarkan pengguna Dash Wallet lain mengimbas kod ini untuk menambah anda sebagai kenalan."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Save"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Identiti utama hanya boleh dipilih daripada dompet aktif"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Ini menerapkan satu pilihan kepada kesemua %d nama pengguna yang dipilih."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Dompet ini tidak dapat menerbitkan kunci pengundian bagi nod ini."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Dompet ini tidak memegang kunci pemilik mahupun kunci alamat pembayaran evonode ini, jadi bakinya tidak boleh dikeluarkan dari sini."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Baki peribadi anda. Jumlah dan alamat disulitkan pada rantaian, jadi pegangan dan sejarah anda kekal sulit."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/nb.lproj/Localizable.strings b/DashWallet/nb.lproj/Localizable.strings index f0d27d0463..477844ae0c 100644 --- a/DashWallet/nb.lproj/Localizable.strings +++ b/DashWallet/nb.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Gjenopprettingsfrasen til én lommebok kan ikke godkjenne sletting av flere ulike lommebøker."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiv"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Nøklene lagres i denne enhetens nøkkelring og forlater den aldri, bortsett fra for å signere handlingen du ber om."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Nøkler på denne enheten"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "La en annen Dash Wallet-bruker skanne denne koden for å legge deg til som kontakt."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Lagre"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Hovedidentiteten kan bare velges fra den aktive lommeboken"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Dette bruker ett valg på alle de %d valgte brukernavnene."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Denne lommeboken klarte ikke å utlede stemmenøkkelen for denne noden."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Denne lommeboken har verken eiernøkkelen eller nøkkelen for utbetalingsadressen til denne evonoden, så saldoen dens kan ikke tas ut herfra."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Den private saldoen din. Beløp og adresser er kryptert på kjeden, så beholdningen og historikken din forblir konfidensielle."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/nl.lproj/Localizable.strings b/DashWallet/nl.lproj/Localizable.strings index 312a069a3d..41f8fabef6 100644 --- a/DashWallet/nl.lproj/Localizable.strings +++ b/DashWallet/nl.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "De herstelzin van één wallet kan het verwijderen van meerdere verschillende wallets niet autoriseren."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Actief"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "achter"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Verbind je crypto portemonnees met het ZenLedger platform. Kom meer te weten en ga aan de slag met je Dash portemonnee transacties."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Verbinding verbroken"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Korting"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Sleutels worden bewaard in de sleutelhanger van dit apparaat en verlaten die alleen om de actie te ondertekenen die je vraagt."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Sleutels op dit apparaat"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Laat een andere Dash Wallet-gebruiker deze code scannen om je als contact toe te voegen."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Niet bepaald"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Opslaan"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan om te verzenden"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Uitgeven"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Bevestiging van de uitgaven"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "De blockchain wordt gesynchroniseerd..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "De hoofdidentiteit kan alleen uit de actieve portemonnee worden gekozen"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Dit past één keuze toe op alle %d geselecteerde gebruikersnamen."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Deze portemonnee kon de stemsleutel voor deze node niet afleiden."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Deze wallet heeft noch de eigenaarssleutel noch de sleutel van het uitbetaaladres van deze evonode, dus het saldo kan hier niet worden opgenomen."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Zet apparaat-toegangscode aan"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Je privésaldo. Bedragen en adressen zijn versleuteld op de keten, zodat je bezit en geschiedenis vertrouwelijk blijven."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/pl.lproj/Localizable.strings b/DashWallet/pl.lproj/Localizable.strings index 01ae5b80f0..14fa453997 100644 --- a/DashWallet/pl.lproj/Localizable.strings +++ b/DashWallet/pl.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Fraza odzyskiwania jednego portfela nie może autoryzować usunięcia wielu różnych portfeli."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktywny"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "za"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Połącz swoje portfele kryptowalut z platformą ZenLedger. Dowiedz się więcej i rozpocznij wysyłanie lub otrzymywanie transakcji z Dash Wallet."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Rozłączony"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Zniżka"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Klucze są przechowywane w pęku kluczy tego urządzenia i nigdy go nie opuszczają, poza podpisaniem żądanej przez Ciebie akcji."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Klucze na tym urządzeniu"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Pozwól innemu użytkownikowi Dash Wallet zeskanować ten kod, aby dodać Cię do kontaktów."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Nieustalony"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Zapisz"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Skanuj Kod QR"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Skanuj by Wysłać"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Wydaj"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Potwierdzenie Wysłania"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Łańcuch synchronizuje się…"; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Główną tożsamość można wybrać tylko z aktywnego portfela"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "To zastosuje jeden wybór do wszystkich %d zaznaczonych nazw użytkowników."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Ten portfel nie mógł wyprowadzić klucza głosowania dla tego węzła."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ten portfel nie ma ani klucza właściciela, ani klucza adresu wypłaty tego evonode, więc jego salda nie da się stąd wypłacić."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Włącz hasło urządzenia"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Twoje prywatne saldo. Kwoty i adresy są zaszyfrowane w łańcuchu, więc Twoje środki i historia pozostają poufne."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/pt.lproj/Localizable.strings b/DashWallet/pt.lproj/Localizable.strings index 0de9344959..75a60166e1 100644 --- a/DashWallet/pt.lproj/Localizable.strings +++ b/DashWallet/pt.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "A frase de recuperação de uma única carteira não pode autorizar a exclusão de várias carteiras diferentes."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Ativo"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "atrás"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Conecte suas carteiras de criptomoedas à plataforma ZenLedger. Saiba mais e comece com suas transações da carteira Dash."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Desconectado"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Desconto"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "As chaves são guardadas no chaveiro deste dispositivo e nunca saem dele, exceto para assinar a ação que você solicitar."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Chaves neste dispositivo"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Deixe outro usuário do Dash Wallet escanear este código para adicionar você como contato."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Não determinado"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Salvar"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Escanear código QR"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scanear para Enviar"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Gastar"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Confirmação de Gastos"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "A cadeia está sendo sincronizada…"; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "A identidade principal só pode ser escolhida na carteira ativa"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Isso aplica uma escolha a todos os %d nomes de usuário selecionados."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Esta carteira não conseguiu derivar a chave de votação deste nó."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Esta carteira não tem nem a chave de proprietário nem a chave do endereço de pagamento deste evonode, então o saldo dele não pode ser sacado daqui."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Habilite a senha de dispositivo"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Seu saldo privado. Os valores e endereços são criptografados on-chain, então seus fundos e seu histórico permanecem confidenciais."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/ro.lproj/Localizable.strings b/DashWallet/ro.lproj/Localizable.strings index f294a6a84d..6c1870625e 100644 --- a/DashWallet/ro.lproj/Localizable.strings +++ b/DashWallet/ro.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Fraza de recuperare a unui singur portofel nu poate autoriza ștergerea mai multor portofele diferite."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Activ"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Cheile sunt păstrate în keychain-ul acestui dispozitiv și nu îl părăsesc niciodată, decât pentru a semna acțiunea pe care o soliciți."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Chei pe acest dispozitiv"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Lasă un alt utilizator Dash Wallet să scaneze acest cod pentru a te adăuga ca persoană de contact."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Salvează"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Identitatea principală poate fi aleasă doar din portofelul activ"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Aceasta aplică o singură alegere tuturor celor %d nume de utilizator selectate."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Acest portofel nu a putut deriva cheia de vot pentru acest nod."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Acest portofel nu deține nici cheia de proprietar, nici cheia adresei de plată a acestui evonod, deci soldul lui nu poate fi retras de aici."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Soldul tău privat. Sumele și adresele sunt criptate pe lanț, așa că deținerile și istoricul tău rămân confidențiale."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/ru.lproj/Localizable.strings b/DashWallet/ru.lproj/Localizable.strings index abb33b0de3..37bdca2a23 100644 --- a/DashWallet/ru.lproj/Localizable.strings +++ b/DashWallet/ru.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Фраза восстановления одного кошелька не может разрешить удаление нескольких разных кошельков."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Активна"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "отстаёт"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Подключите свои криптокошельки к платформе ZenLedger. Узнайте больше и начните с транзакций в Dash Wallet."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Подключение отсутствует"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Скидка"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Ключи хранятся в связке ключей этого устройства и никогда её не покидают, кроме как для подписи запрошенного вами действия."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Ключи на этом устройстве"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Дайте другому пользователю Dash Wallet отсканировать этот код, чтобы добавить вас в контакты."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Не определён"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Сохранить"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Сканировать QR-код"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Сканировать"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Потратить"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Подтверждения"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Блокчейн синхронизируется..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Основной идентификатор можно выбрать только из активного кошелька"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Это применит один выбор ко всем %d выбранным именам пользователей."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Этот кошелёк не смог получить ключ голосования для этого узла."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "В этом кошельке нет ни ключа владельца, ни ключа платёжного адреса этой эвоноды, поэтому её баланс нельзя вывести отсюда."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Включить код-пароль"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Ваш приватный баланс. Суммы и адреса зашифрованы в блокчейне, поэтому ваши средства и история остаются конфиденциальными."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/sk.lproj/Localizable.strings b/DashWallet/sk.lproj/Localizable.strings index a07578eb07..5d805d6efb 100644 --- a/DashWallet/sk.lproj/Localizable.strings +++ b/DashWallet/sk.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Fráza pre obnovenie jednej peňaženky nemôže autorizovať vymazanie viacerých rôznych peňaženiek."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktívny"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "pozadu"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Pripojte svoje kryptopeňaženky k platforme ZenLedger. Získajte viac informácií a začnite s Dash Wallet transakciami."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Odpojený"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Zľava"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Kľúče sú uložené v keychaine tohto zariadenia a nikdy ho neopúšťajú, okrem podpísania akcie, o ktorú požiadate."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Kľúče na tomto zariadení"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Nechajte iného používateľa Dash Wallet naskenovať tento kód, aby si vás pridal ako kontakt."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Neurčené"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Uložiť"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Naskenujte QR kód"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Skenovať a poslať"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Nákupy"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Potvrdenie minutia"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Reťazec sa synchronizuje..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Hlavnú identitu možno vybrať len z aktívnej peňaženky"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Toto použije jednu voľbu na všetkých %d vybraných používateľských mien."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Táto peňaženka nedokázala odvodiť hlasovací kľúč pre tento uzol."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Táto peňaženka nemá ani kľúč vlastníka, ani kľúč výplatnej adresy tohto evonodu, takže jeho zostatok sa odtiaľto vybrať nedá."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Zapnúť prístupový kód"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Váš súkromný zostatok. Sumy a adresy sú v reťazci zašifrované, takže vaše prostriedky aj história zostávajú dôverné."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/sl.lproj/Localizable.strings b/DashWallet/sl.lproj/Localizable.strings index 5a2149f006..f8d5b335c7 100644 --- a/DashWallet/sl.lproj/Localizable.strings +++ b/DashWallet/sl.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Fraza za obnovitev ene denarnice ne more odobriti brisanja več različnih denarnic."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiven"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Ključi so shranjeni v keychainu te naprave in je nikoli ne zapustijo, razen da podpišejo dejanje, ki ga zahtevate."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Ključi na tej napravi"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Naj drug uporabnik Dash Wallet skenira to kodo, da vas doda med stike."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Shranite"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Glavno identiteto je mogoče izbrati samo iz aktivne denarnice"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "S tem se ena izbira uporabi za vseh %d izbranih uporabniških imen."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Ta denarnica ni mogla izpeljati ključa za glasovanje za to vozlišče."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ta denarnica nima niti ključa lastnika niti ključa naslova za izplačilo tega evonoda, zato njegovega stanja od tu ni mogoče dvigniti."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Vaše zasebno stanje. Zneski in naslovi so v verigi šifrirani, zato vaša sredstva in zgodovina ostanejo zaupni."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/sl_SI.lproj/Localizable.strings b/DashWallet/sl_SI.lproj/Localizable.strings index 2cce3330da..b0dc167a38 100644 --- a/DashWallet/sl_SI.lproj/Localizable.strings +++ b/DashWallet/sl_SI.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Fraza za obnovitev ene denarnice ne more odobriti brisanja več različnih denarnic."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiven"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Ključi so shranjeni v keychainu te naprave in je nikoli ne zapustijo, razen da podpišejo dejanje, ki ga zahtevate."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Ključi na tej napravi"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Naj drug uporabnik Dash Wallet skenira to kodo, da vas doda med stike."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Save"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Glavno identiteto je mogoče izbrati samo iz aktivne denarnice"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "S tem se ena izbira uporabi za vseh %d izbranih uporabniških imen."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Ta denarnica ni mogla izpeljati ključa za glasovanje za to vozlišče."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ta denarnica nima niti ključa lastnika niti ključa naslova za izplačilo tega evonoda, zato njegovega stanja od tu ni mogoče dvigniti."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Vaše zasebno stanje. Zneski in naslovi so v verigi šifrirani, zato vaša sredstva in zgodovina ostanejo zaupni."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/sq.lproj/Localizable.strings b/DashWallet/sq.lproj/Localizable.strings index 5a786ac560..8f3b987a0d 100644 --- a/DashWallet/sq.lproj/Localizable.strings +++ b/DashWallet/sq.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Fraza e rikuperimit e një portofoli të vetëm nuk mund të autorizojë fshirjen e disa portofolëve të ndryshëm."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiv"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Çelësat ruhen te keychain i kësaj pajisjeje dhe nuk e lënë kurrë atë, përveçse për të nënshkruar veprimin që kërkon ti."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Çelësat në këtë pajisje"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Lëre një përdorues tjetër të Dash Wallet ta skanojë këtë kod për të të shtuar si kontakt."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Ruaj"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Identiteti kryesor mund të zgjidhet vetëm nga kuleta aktive"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Kjo zbaton një zgjedhje të vetme për të gjithë %d emrat e përzgjedhur të përdoruesve."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Kjo kuletë nuk e derivoi dot çelësin e votimit për këtë nyje."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ky portofol nuk e ka as çelësin e pronarit as çelësin e adresës së pagesës të këtij evonode-i, prandaj balanca e tij nuk mund të tërhiqet nga këtu."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Balanca juaj private. Shumat dhe adresat janë të fshehtëzuara në zinxhir, kështu që zotërimet dhe historiku juaj mbeten konfidenciale."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/sr.lproj/Localizable.strings b/DashWallet/sr.lproj/Localizable.strings index 1420b988cc..9502838071 100644 --- a/DashWallet/sr.lproj/Localizable.strings +++ b/DashWallet/sr.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Fraza za oporavak jednog novčanika ne može da odobri brisanje više različitih novčanika."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktivan"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Ključevi se čuvaju u keychain-u ovog uređaja i nikada ga ne napuštaju, osim da potpišu radnju koju zatražite."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Ključevi na ovom uređaju"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Neka drugi korisnik Dash Wallet-a skenira ovaj kod da bi vas dodao kao kontakt."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Sačuvaj"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Glavni identitet može se izabrati samo iz aktivnog novčanika"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Ovo primenjuje jedan izbor na svih %d izabranih korisničkih imena."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Ovaj novčanik nije mogao da izvede ključ za glasanje za ovaj čvor."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ovaj novčanik nema ni ključ vlasnika ni ključ adrese za isplatu ovog evonode-a, pa se njegovo stanje ne može povući odavde."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Vaše privatno stanje. Iznosi i adrese su šifrovani na lancu, pa vaša sredstva i istorija ostaju poverljivi."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/sv.lproj/Localizable.strings b/DashWallet/sv.lproj/Localizable.strings index 7de77581a6..23d92063b9 100644 --- a/DashWallet/sv.lproj/Localizable.strings +++ b/DashWallet/sv.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "En enskild plånboks återställningsfras kan inte godkänna radering av flera olika plånböcker."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Aktiv"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Nycklarna lagras i den här enhetens nyckelring och lämnar den aldrig, förutom för att signera den åtgärd du begär."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Nycklar på den här enheten"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Låt en annan Dash Wallet-användare skanna den här koden för att lägga till dig som kontakt."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Spara"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Huvudidentiteten kan bara väljas från den aktiva plånboken"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Detta tillämpar ett val på alla %d markerade användarnamn."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Den här plånboken kunde inte härleda röstningsnyckeln för den här noden."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Den här plånboken har varken ägarnyckeln eller nyckeln för utbetalningsadressen till den här evonoden, så dess saldo kan inte tas ut härifrån."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Ditt privata saldo. Belopp och adresser är krypterade på kedjan, så ditt innehav och din historik förblir konfidentiella."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/th.lproj/Localizable.strings b/DashWallet/th.lproj/Localizable.strings index d09086b563..4351ee877f 100644 --- a/DashWallet/th.lproj/Localizable.strings +++ b/DashWallet/th.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "วลีกู้คืนของกระเป๋าเงินเดียวไม่สามารถอนุญาตให้ลบกระเป๋าเงินหลายใบที่ต่างกันได้"; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "ใช้งานอยู่"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "ตัดการเชื่อมต่อ"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "คีย์เก็บอยู่ในคีย์เชนของอุปกรณ์นี้และไม่ออกจากอุปกรณ์ ยกเว้นเพื่อลงนามการกระทำที่คุณร้องขอ"; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "คีย์บนอุปกรณ์นี้"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "ให้ผู้ใช้ Dash Wallet คนอื่นสแกนโค้ดนี้เพื่อเพิ่มคุณเป็นผู้ติดต่อ"; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "ไม่ได้กำหนด"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "บันทึก"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "สแกนคิวอาร์โค้ด"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "สแกนเพื่อส่ง"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "การยืนยันการใช้จ่าย"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "โซ่กำลังซิงค์..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "เลือกตัวตนหลักได้จากกระเป๋าเงินที่ใช้งานอยู่เท่านั้น"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "การทำเช่นนี้จะใช้ตัวเลือกเดียวกับชื่อผู้ใช้ที่เลือกไว้ทั้ง %d รายการ"; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "กระเป๋าเงินนี้สร้างคีย์โหวตสำหรับโหนดนี้ไม่ได้"; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "กระเป๋าเงินนี้ไม่ได้ถือทั้งคีย์เจ้าของและคีย์ที่อยู่รับเงินของ evonode นี้ จึงถอนยอดคงเหลือจากที่นี่ไม่ได้"; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "เปิดรหัสผ่านของอุปกรณ์"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "ยอดคงเหลือส่วนตัวของคุณ จำนวนเงินและที่อยู่ถูกเข้ารหัสบนเชน สินทรัพย์และประวัติของคุณจึงเป็นความลับ"; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/tr.lproj/Localizable.strings b/DashWallet/tr.lproj/Localizable.strings index 5102056019..e27c09a985 100644 --- a/DashWallet/tr.lproj/Localizable.strings +++ b/DashWallet/tr.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Tek bir cüzdanın kurtarma sözcük grubu, birden fazla farklı cüzdanın silinmesine izin veremez."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Etkin"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Kripto cüzdanlarınızı ZenLedger platformuna bağlayın. Daha fazlasını öğrenin ve Dash Cüzdan işlemlerinize başlayın."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Bağlantı kesildi"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "İndirim"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Anahtarlar bu cihazın anahtar zincirinde saklanır ve yalnızca istediğiniz işlemi imzalamak dışında cihazdan çıkmaz."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Bu cihazdaki anahtarlar"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Sizi kişi olarak eklemesi için başka bir Dash Wallet kullanıcısının bu kodu taramasına izin verin."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Belirlenmedi"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Kaydet"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "QR kodunu tara"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Göndermek için Tara"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Harcama Onayı"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Zincir senkronize ediliyor…"; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Ana kimlik yalnızca etkin cüzdandan seçilebilir"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Bu, seçili %d kullanıcı adının tümüne tek bir seçimi uygular."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Bu cüzdan bu düğüm için oy verme anahtarını türetemedi."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Bu cüzdan bu evonode'un ne sahip anahtarını ne de ödeme adresi anahtarını tutuyor; bu nedenle bakiyesi buradan çekilemez."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Cihaz parolasını aç"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Özel bakiyeniz. Tutarlar ve adresler zincir üzerinde şifrelenir, böylece varlıklarınız ve geçmişiniz gizli kalır."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/uk.lproj/Localizable.strings b/DashWallet/uk.lproj/Localizable.strings index cb3e51f6fd..b1498c809d 100644 --- a/DashWallet/uk.lproj/Localizable.strings +++ b/DashWallet/uk.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Фраза відновлення одного гаманця не може дозволити видалення кількох різних гаманців."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Активна"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "позаду"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Підключіть свої криптогаманці до платформи ZenLedger. Дізнайтеся більше та розпочніть роботу з транзакціями Dash Wallet."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Знижка"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Ключі зберігаються у зв'язці ключів цього пристрою і ніколи її не залишають, окрім як для підпису запитаної вами дії."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Ключі на цьому пристрої"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Дайте іншому користувачеві Dash Wallet відсканувати цей код, щоб додати вас до контактів."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Не визначено"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Зберегти"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Сканувати QR код"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Сканувати для відправки"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "Витратити"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Підтвердження витрат"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "Блокчейн синхронізується..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Основний ідентифікатор можна обрати лише з активного гаманця"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Це застосує один вибір до всіх %d обраних імен користувачів."; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Цей гаманець не зміг отримати ключ голосування для цього вузла."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "У цьому гаманці немає ні ключа власника, ні ключа платіжної адреси цієї евоноди, тож її баланс не можна вивести звідси."; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "Увімкніть пароль"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Ваш приватний баланс. Суми й адреси зашифровано в ланцюжку, тож ваші кошти та історія залишаються конфіденційними."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/vi.lproj/Localizable.strings b/DashWallet/vi.lproj/Localizable.strings index 93e6e887d6..882494f3c0 100644 --- a/DashWallet/vi.lproj/Localizable.strings +++ b/DashWallet/vi.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "Cụm từ phục hồi của một ví không thể cho phép xoá nhiều ví khác nhau."; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "Đang hoạt động"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "Khoá được lưu trong keychain của thiết bị này và không bao giờ rời khỏi đó, trừ khi để ký thao tác bạn yêu cầu."; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "Khoá trên thiết bị này"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "Hãy để một người dùng Dash Wallet khác quét mã này để thêm bạn làm liên hệ."; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Lưu"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Quét để gửi"; @@ -5017,9 +5005,6 @@ /* Shortcut button on Home screen */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Xác nhận chi tiêu"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "Chỉ có thể chọn danh tính chính từ ví đang hoạt động"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "Thao tác này áp dụng một lựa chọn cho toàn bộ %d tên người dùng đã chọn."; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "Ví này không dẫn xuất được khoá bỏ phiếu cho nút này."; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "Ví này không giữ khoá chủ sở hữu lẫn khoá địa chỉ chi trả của evonode này, nên không thể rút số dư của nó từ đây."; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Hãy bật chế độ mật khẩu cho thiết bị"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "Số dư riêng tư của bạn. Số tiền và địa chỉ được mã hoá trên chuỗi, nên tài sản và lịch sử của bạn vẫn được giữ kín."; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/zh-Hans.lproj/Localizable.strings b/DashWallet/zh-Hans.lproj/Localizable.strings index 2aa8c41a99..4f22c1a1ff 100644 --- a/DashWallet/zh-Hans.lproj/Localizable.strings +++ b/DashWallet/zh-Hans.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "单个钱包的助记词无法授权删除多个不同的钱包。"; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "已激活"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "密钥存储在本设备的钥匙串中,除了为你请求的操作签名外,绝不会离开设备。"; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "本设备上的密钥"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "让另一位 Dash Wallet 用户扫描此二维码,即可把你加为联系人。"; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Save"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Translate it as short as possible! (24 symbols max) */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "只能从当前钱包中选择主要身份"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "这会将同一个选择应用于全部 %d 个所选用户名。"; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "此钱包无法为该节点派生投票密钥。"; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "该钱包既不持有此 evonode 的所有者密钥,也不持有其付款地址密钥,因此无法从这里提取其余额。"; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "您的私密余额。金额和地址在链上均已加密,因此您的持有量和记录都保持机密。"; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/zh-Hant-TW.lproj/Localizable.strings b/DashWallet/zh-Hant-TW.lproj/Localizable.strings index 8c8ce45e92..fe18ddbfc0 100644 --- a/DashWallet/zh-Hant-TW.lproj/Localizable.strings +++ b/DashWallet/zh-Hant-TW.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "單一錢包的助記詞無法授權刪除多個不同的錢包。"; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "已啟用"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "behind"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "Disconnected"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "Discount"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "鑰匙儲存在本裝置的鑰匙圈中,除了為你要求的操作簽署外,絕不會離開裝置。"; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "本裝置上的鑰匙"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "讓另一位 Dash Wallet 用戶掃描此 QR 碼,即可把你加為聯絡人。"; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "Not Determined"; @@ -4537,9 +4531,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "Save"; @@ -4579,9 +4570,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "Scan QR code"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "Scan to Send"; @@ -5017,9 +5005,6 @@ /* Translate it as short as possible! (24 symbols max) */ "Spend" = "Spend"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "Spending Confirmation"; @@ -5315,12 +5300,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "The chain is syncing…"; @@ -5375,9 +5354,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5423,9 +5399,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "只能從目前的錢包中選擇主要身分"; @@ -5462,6 +5435,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5660,9 +5636,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5687,15 +5660,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "這會將同一個選擇套用於全部 %d 個所選用戶名稱。"; @@ -5912,6 +5894,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "此錢包無法為該節點衍生投票鑰匙。"; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5924,6 +5915,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "該錢包既不持有此 evonode 的擁有者鑰匙,也不持有其付款位址鑰匙,因此無法從這裡提取其餘額。"; @@ -6196,6 +6190,9 @@ /* Alert title */ "Turn device passcode on" = "Turn device passcode on"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7168,8 +7165,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "您的私密餘額。金額和位址在鏈上均已加密,因此您的持有量和紀錄都保持機密。"; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/zh.lproj/Localizable.strings b/DashWallet/zh.lproj/Localizable.strings index 677f3b74dd..d93c35f377 100644 --- a/DashWallet/zh.lproj/Localizable.strings +++ b/DashWallet/zh.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "单个钱包的助记词无法授权删除多个不同的钱包。"; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "已激活"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "后面"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "将您的加密数字货币钱包连接至 ZenLedger 平台. 了解更多信息并开始使用您的 Dash 钱包进行交易."; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "连接断开"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "折扣"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "密钥存储在本设备的钥匙串中,除了为你请求的操作签名外,绝不会离开设备。"; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "本设备上的密钥"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "让另一位 Dash Wallet 用户扫描此二维码,即可把你加为联系人。"; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "尚未确定"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "保存"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "扫描二维码"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "扫描发送"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "消费"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "支出确认"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "区块链正在同步..."; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "只能从当前钱包中选择主要身份"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "这会将同一个选择应用于全部 %d 个所选用户名。"; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "此钱包无法为该节点派生投票密钥。"; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "该钱包既不持有此 evonode 的所有者密钥,也不持有其付款地址密钥,因此无法从这里提取其余额。"; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "打开设备密码"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "您的私密余额。金额和地址在链上均已加密,因此您的持有量和记录都保持机密。"; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWallet/zh_TW.lproj/Localizable.strings b/DashWallet/zh_TW.lproj/Localizable.strings index c34823743e..537fd4b482 100644 --- a/DashWallet/zh_TW.lproj/Localizable.strings +++ b/DashWallet/zh_TW.lproj/Localizable.strings @@ -334,12 +334,6 @@ /* Core drain recovery */ "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with." = "A previous Max transfer is still pending. Check its status or resume it before starting another. Resume pays the address it was started with."; -/* DashConnect */ -"A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again." = "A sign-in to this app may still add a key to your identity, so the app cannot be turned off yet. Try again later, or approve the app's sign-in code again."; - -/* DashConnect */ -"A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it." = "A sign-in to this app with another identity of this wallet may still add a key to that identity, so the app cannot be turned off here yet. Switch to that identity to check it."; - /* No comment provided by engineer. */ "A single wallet's recovery phrase cannot authorize deleting multiple different wallets." = "單一錢包的助記詞無法授權刪除多個不同的錢包。"; @@ -410,9 +404,6 @@ /* DashConnect App Connect v2: the placeholder is the app's name */ "Act as you in one of %@'s contracts" = "Act as you in one of %@'s contracts"; -/* DashPay username registration recovery */ -"Act as you in this app without asking each time" = "Act as you in this app without asking each time"; - /* Masternode status */ "Active" = "已啟用"; @@ -675,9 +666,6 @@ /* DashConnect token purchase */ "Approve token purchase?" = "Approve token purchase?"; -/* DashConnect */ -"Approved" = "Approved"; - /* DashConnect token purchase */ "Approving pays the total price from this identity's Platform credits." = "Approving pays the total price from this identity's Platform credits."; @@ -832,9 +820,6 @@ /* Devnet */ "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry." = "Base URL of the devnet's quorum-list server. SPV peers and Platform (DAPI) nodes are both auto-discovered from {Quorum URL}/masternodes — no manual peer entry."; -/* Devnet */ -"Base58 identifier (optional)" = "Base58 identifier (optional)"; - /* TimeSkew */ "behind" = "在後面\nZài hòumiàn"; @@ -1232,9 +1217,15 @@ /* Receive payment status */ "Confirmed in block" = "Confirmed in block"; +/* DashConnect: an approval whose identity update may still land */ +"Confirming" = "Confirming"; + /* SPV diagnostics */ "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset." = "Confirming saves birth height %u and clears this network's chain data at the next app launch, re-downloading it and rescanning filters from that height. Fully close and relaunch the app to start; the in-app Restart button does not apply this reset."; +/* DashConnect */ +"Connect an app" = "Connect an app"; + /* ZenLedger */ "Connect your crypto wallets to the ZenLedger platform. Learn more and get started with your Dash Wallet transactions." = "將您的加密錢包連接到 ZenLedger 平台。了解更多並開始使用您的達世幣錢包交易。"; @@ -1659,12 +1650,6 @@ /* Identity top-up stopped after successful unshield */ "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again." = "Dash was moved to your Platform balance. Finish the top-up from Platform after reviewing the amount again."; -/* Devnet */ -"DashConnect Contract ID" = "DashConnect Contract ID"; - -/* DashConnect */ -"DashConnect key registration completed." = "DashConnect key registration completed."; - /* DashConnect */ "DashConnect login is not yet available on mainnet" = "DashConnect login is not yet available on mainnet"; @@ -1783,11 +1768,8 @@ Coinbase Entry Point */ "Disconnected" = "斷開連接"; -/* DashConnect: after a disconnect whose unattributed DashPay profile keys could not be told apart */ -"Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off." = "Disconnected. DashPay profile keys not linked to any connection could not be checked, so none of them was turned off."; - -/* DashConnect: after a disconnect, how many unattributed DashPay profile keys were also turned off */ -"Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d." = "Disconnected. DashPay profile keys not linked to any connection were turned off as well: %d."; +/* 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?"; /* DashSpend confirmation */ "Discount" = "折扣"; @@ -2171,6 +2153,9 @@ /* DashConnect: a second request arrived during key registration */ "Finish the current DashConnect request first, then try again." = "Finish the current DashConnect request first, then try again."; +/* DashConnect: turning off unrecorded keys while another request is in progress */ +"Finish the request on screen, then disconnect the app again." = "Finish the request on screen, then disconnect the app again."; + /* SPV diagnostics */ "Finish Transfers" = "Finish Transfers"; @@ -2728,6 +2713,9 @@ /* No comment provided by engineer. */ "Keys are stored in this device's keychain and never leave it except to sign the action you request." = "鑰匙儲存在本裝置的鑰匙圈中,除了為你要求的操作簽署外,絕不會離開裝置。"; +/* DashConnect: title of the question after a disconnect */ +"Keys left on your identity" = "Keys left on your identity"; + /* No comment provided by engineer. */ "Keys on this device" = "本裝置上的鑰匙"; @@ -2795,6 +2783,9 @@ /* Wallets */ "Leave the name empty to reset it to the default." = "Leave the name empty to reset it to the default."; +/* DashConnect */ +"Leave them" = "Leave them"; + /* DashPay Contacts: caption under the user's own QR code */ "Let another Dash Wallet user scan this code to add you as a contact." = "讓另一位 Dash Wallet 用戶掃描此 QR 碼,即可把你加為聯絡人。"; @@ -3501,6 +3492,9 @@ /* Dash DEX / tx history row title */ "Not converted · %@" = "Not converted · %@"; +/* DashConnect: keys are on the identity, but the app never got its response */ +"Not delivered" = "Not delivered"; + /* Location Service Status */ "Not Determined" = "尚未決定"; @@ -4536,9 +4530,6 @@ /* SPV diagnostics */ "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions." = "Rewind this wallet's filter scan to re-download and re-match compact block filters, rediscovering any missed transactions."; -/* DashConnect re-login */ -"Same permissions as before" = "Same permissions as before"; - /* No comment provided by engineer. */ "Save" = "儲存"; @@ -4578,9 +4569,6 @@ /* (Send by) Scanning QR code */ "Scan QR code" = "掃瞄二維碼"; -/* DashConnect */ -"Scan the QR code to complete the login process" = "Scan the QR code to complete the login process"; - /* No comment provided by engineer. */ "Scan to Send" = "掃描發送"; @@ -5015,9 +5003,6 @@ /* Shortcut button on Home screen */ "Spend" = "消費"; -/* DashConnect one-QR login: the placeholder is an amount with its unit, e.g. 0.05 DASH */ -"Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit." = "Spend up to %@ of your identity's credits on those actions. Each sign-in has its own limit."; - /* No comment provided by engineer. */ "Spending Confirmation" = "支付確認"; @@ -5313,12 +5298,6 @@ /* DashConnect App Connect v2 */ "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again." = "The app's encryption key on this identity changed after this sign-in was first approved. Ask the app to sign in again."; -/* DashConnect */ -"The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key." = "The app's key was added to your identity, but this wallet could not record it. Turn the app off in Connections to remove the key."; - -/* DashConnect */ -"The app's keys on this identity are off, but this wallet could not check its other identities. Try again." = "The app's keys on this identity are off, but this wallet could not check its other identities. Try again."; - /* No comment provided by engineer. */ "The chain is syncing…" = "區塊鏈正在同步…"; @@ -5373,9 +5352,6 @@ /* Devnet */ "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history." = "The devnet chain name. It is embedded in the sync user agent (devnet.devnet-) — devnet nodes reject connections without it. Each devnet keeps its own chain state, so naming a different one does not reinterpret this one's history."; -/* DashConnect */ -"The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings." = "The devnet DashConnect contract id is not set or is not a valid identifier. Enter it in Settings → Devnet Settings."; - /* Devnet */ "The devnet name cannot contain a slash." = "The devnet name cannot contain a slash."; @@ -5421,9 +5397,6 @@ /* Usernames: proof-of-identity link visibility */ "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners." = "The link is published on Dash Platform with your identity and the name you requested. Anyone can read it, not only masternode owners."; -/* Devnet */ -"The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise." = "The loginKeyResponse data contract id registered on this devnet. Only needed for DashConnect logins; leave empty otherwise."; - /* Identities */ "The main identity can only be chosen from the active wallet" = "只能從目前的錢包中選擇主要身分"; @@ -5460,6 +5433,9 @@ /* DashPay registration context changed */ "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status." = "The name request succeeded for the original identity. Switch back to the original wallet and network to see its status."; +/* DashConnect */ +"The network answered with an older copy of your identity. Try again in a moment." = "The network answered with an older copy of your identity. Try again in a moment."; + /* DashConnect App Connect v2 */ "The network has not caught up with your identity's keys yet. Try again in a moment." = "The network has not caught up with your identity's keys yet. Try again in a moment."; @@ -5658,9 +5634,6 @@ /* Voting */ "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight." = "These nodes vote together, which publicly links them to each other. Choosing fewer nodes keeps them unlinked, at less voting weight."; -/* DashConnect one-QR login */ -"This access ends after %d days, or when you disconnect the app." = "This access ends after %d days, or when you disconnect the app."; - /* Wallet accounts */ "This account derives masternode keys. It has no on-chain addresses or balance." = "This account derives masternode keys. It has no on-chain addresses or balance."; @@ -5685,15 +5658,24 @@ /* Dash DEX / dex_error_amount_too_small */ "This amount is below the minimum for this swap. Please enter a larger amount." = "This amount is below the minimum for this swap. Please enter a larger amount."; +/* DashConnect App Connect v2 */ +"This app asks for more keys than one approval can add. Ask the app to ask for fewer." = "This app asks for more keys than one approval can add. Ask the app to ask for fewer."; + /* DashConnect */ "This app has a key on another identity of this wallet. Switch to that identity to turn it off." = "This app has a key on another identity of this wallet. Switch to that identity to turn it off."; +/* DashConnect App Connect v1 */ +"This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code." = "This app uses an older sign-in that this wallet no longer supports. Ask the app for a new code."; + /* DashConnect */ "This app will be able to:" = "This app will be able to:"; /* DashConnect */ "This app will NOT have access to:" = "This app will NOT have access to:"; +/* DashConnect App Connect v2 */ +"This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again." = "This app's earlier sign-ins left more keys than one approval can replace. Disconnect the app, then sign in again."; + /* Voting */ "This applies one choice to all %d selected usernames." = "這會將同一個選擇套用於全部 %d 個所選用戶名稱。"; @@ -5910,6 +5892,15 @@ /* Voting */ "This wallet could not derive the voting key for this node." = "此錢包無法為該節點衍生投票鑰匙。"; +/* DashConnect */ +"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."; + +/* 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?"; + /* DashConnect App Connect v2 */ "This wallet does not know this app, so it cannot confirm the name shown or where the request came from." = "This wallet does not know this app, so it cannot confirm the name shown or where the request came from."; @@ -5922,6 +5913,9 @@ /* Usernames */ "This wallet has no Platform identity yet." = "This wallet has no Platform identity yet."; +/* DashConnect */ +"This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again." = "This wallet holds DashConnect records a newer version wrote. Update the wallet, then try again."; + /* No comment provided by engineer. */ "This wallet holds neither the owner key nor the payout address key of this evonode, so its balance can't be withdrawn from here." = "該錢包既不持有此 evonode 的擁有者鑰匙,也不持有其付款位址鑰匙,因此無法從這裡提取其餘額。"; @@ -6194,6 +6188,9 @@ /* Alert title */ "Turn device passcode on" = "在設備上開啟驗證碼"; +/* DashConnect */ +"Turn them off" = "Turn them off"; + /* Notifications */ "Turned off in iOS Settings" = "Turned off in iOS Settings"; @@ -7166,8 +7163,7 @@ /* Balance info sheet */ "Your private balance. Amounts and addresses are encrypted on-chain, so your holdings and history stay confidential." = "您的私密餘額。金額和位址在鏈上均已加密,因此您的持有量和紀錄都保持機密。"; -/* DashConnect */ -"Your private keys" = "Your private keys"; +/* Usernames */ "Your recently shielded Dash can be used for this username at %@" = "Your recently shielded Dash can be used for this username at %@"; "Your recently shielded Dash can be used for this username tomorrow at %@" = "Your recently shielded Dash can be used for this username tomorrow at %@"; diff --git a/DashWalletTests/DashConnect/AppConnectProjectionTests.swift b/DashWalletTests/DashConnect/AppConnectProjectionTests.swift new file mode 100644 index 0000000000..5a8828aa3e --- /dev/null +++ b/DashWalletTests/DashConnect/AppConnectProjectionTests.swift @@ -0,0 +1,756 @@ +import Foundation +import XCTest +@testable import dashpay +@testable import SwiftDashSDK + +/// The App Connect projection: intents against one read of the identity +/// (`AppConnectProjection.swift`). +final class AppConnectProjectionTests: XCTestCase { + private typealias Key = AppConnect.IntendedKey + private typealias Intent = AppConnect.ConnectionIntent + private typealias Snapshot = AppConnect.IdentitySnapshot + + private static let identity = Data(repeating: 0x01, count: 32) + private static let otherIdentity = Data(repeating: 0x02, count: 32) + private static let app = Data(repeating: 0xA1, count: 32) + private static let otherApp = Data(repeating: 0xA2, count: 32) + private static let appGroup = Data(repeating: 0xB1, count: 32) + private static let dashPay = Data.identifier(fromBase58: AppConnect.dashPayContractId)! + private static let now: UInt64 = 1_800_000_000_000 + + private static func authKey( + _ id: UInt32, data: UInt8? = nil, bound: AppConnect.StoredBound? = .singleContract(app), expiresAt: UInt64? = now + 1000 + ) -> Key { + Key(id: id, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, + data: Data(repeating: data ?? UInt8(truncatingIfNeeded: id), count: 20), readOnly: false, bound: bound, + totalBudget: 1000, expiresAt: expiresAt) + } + + private static func encryptionKey(_ id: UInt32) -> Key { + Key(id: id, purpose: .encryption, securityLevel: .medium, keyType: .ecdsaSecp256k1, + data: Data(repeating: UInt8(id), count: 33), readOnly: false, bound: .singleContract(app), + totalBudget: nil, expiresAt: nil) + } + + /// The key as Platform shows it once its update landed. + private static func onPlatform( + _ key: Key, disabledAt: UInt64? = nil, boundKnown: Bool = true, data: Data? = nil + ) -> AppConnect.PlatformKey { + AppConnect.PlatformKey( + id: key.id, purpose: key.purpose, securityLevel: key.securityLevel, keyType: key.keyType, + data: data ?? key.data, readOnly: key.readOnly, bound: boundKnown ? key.bound : nil, + boundKnown: boundKnown, totalBudget: key.totalBudget, expiresAt: key.expiresAt, disabledAt: disabledAt) + } + + private static func intent( + _ keys: [Key], app: Data = app, identity: Data = identity, published: Bool = false, createdAt: TimeInterval = 0 + ) -> Intent { + Intent( + id: UUID(), identityId: identity, appId: app, appLabel: "App", appUrl: "", requestHash: Data(repeating: 0xEE, count: 20), + connectionId: nil, keys: keys, sentEncryptionKeyIds: [], disables: [], + response: AppConnect.ResponseValues(appEphemeralPubKeyHash: "ee", walletEphemeralPubKey: "02", encryptedPayload: "00"), + responseDocumentId: published ? Data(repeating: 0xDD, count: 32) : nil, responseRemoved: !published, createdAt: Date(timeIntervalSince1970: createdAt), closedAt: nil) + } + + private static func snapshot( + _ keys: [AppConnect.PlatformKey], identity: Data = identity, revision: UInt64 = 5, time: UInt64? = now + ) -> Snapshot { + Snapshot(identityId: identity, revision: revision, keys: keys, platformTime: time) + } + + // MARK: Status of one intent + + func testStatusOfAnIntentFollowsItsAuthKeysOnPlatform() { + let a = Self.authKey(10), b = Self.authKey(11) + let intent = Self.intent([a, b, Self.encryptionKey(12)]) + let expired = Self.authKey(10, expiresAt: Self.now - 1) + let cases: [(String, [AppConnect.PlatformKey], AppConnect.IntentStatus)] = [ + ("nothing there yet", [], .confirming), + ("all there", [Self.onPlatform(a), Self.onPlatform(b)], .active(expiresAt: Self.now + 1000)), + ("one there, one missing", [Self.onPlatform(a)], .active(expiresAt: Self.now + 1000)), + ("one id taken by another key", [Self.onPlatform(a, data: Data(repeating: 9, count: 20))], .neverLanded), + ("a live key wins over a taken id", [Self.onPlatform(a), Self.onPlatform(b, data: Data(repeating: 9, count: 20))], .active(expiresAt: Self.now + 1000)), + ("all off", [Self.onPlatform(a, disabledAt: 1), Self.onPlatform(b, disabledAt: 1)], .disconnected), + ("one off, one missing", [Self.onPlatform(a, disabledAt: 1)], .confirming), + ("expired by Platform time", [Self.onPlatform(expired), Self.onPlatform(b, disabledAt: 1)], .expired), + ] + for (name, keys, expected) in cases { + XCTAssertEqual(AppConnect.status(of: intent, in: Self.snapshot(keys)), expected, name) + } + } + + func testAKeyIsNeverJudgedExpiredWithoutPlatformTime() { + let key = Self.authKey(10, expiresAt: 1) + let intent = Self.intent([key]) + XCTAssertEqual( + AppConnect.status(of: intent, in: Self.snapshot([Self.onPlatform(key)], time: nil)), + .active(expiresAt: 1)) + } + + func testABoundTheStoreDoesNotKnowYetDoesNotMakeTheKeyAnother() { + let key = Self.authKey(10) + let intent = Self.intent([key]) + XCTAssertEqual( + AppConnect.status(of: intent, in: Self.snapshot([Self.onPlatform(key, boundKnown: false)])), + .active(expiresAt: Self.now + 1000)) + } + + func testAKnownOtherBoundMeansTheIdIsHeldByAnotherKey() { + let key = Self.authKey(10) + var other = Self.onPlatform(Self.authKey(10, bound: .singleContract(Self.otherApp))) + other = AppConnect.PlatformKey( + id: other.id, purpose: other.purpose, securityLevel: other.securityLevel, keyType: other.keyType, + data: key.data, readOnly: false, bound: other.bound, boundKnown: true, + totalBudget: other.totalBudget, expiresAt: other.expiresAt, disabledAt: nil) + XCTAssertEqual(AppConnect.status(of: Self.intent([key]), in: Self.snapshot([other])), .neverLanded) + } + + func testChangedLimitsAreTheSameKey() { + let key = Self.authKey(10) + let raised = AppConnect.PlatformKey( + id: 10, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, data: key.data, + readOnly: false, bound: key.bound, boundKnown: true, totalBudget: 5000, expiresAt: Self.now + 9000, + disabledAt: nil) + XCTAssertEqual(AppConnect.status(of: Self.intent([key]), in: Self.snapshot([raised])), .active(expiresAt: Self.now + 9000)) + } + + // MARK: Projection + + func testAnAppShowsTheStatusTheUserCanActOnFirst() { + let old = Self.intent([Self.authKey(10)], createdAt: 1) + let new = Self.intent([Self.authKey(11)], createdAt: 2) + let projection = AppConnect.project( + [Self.snapshot([Self.onPlatform(Self.authKey(10))])], intents: [old, new]) + XCTAssertEqual(projection.connections.count, 1) + XCTAssertEqual(projection.connections[0].status, .active(expiresAt: Self.now + 1000)) + XCTAssertEqual(projection.connections[0].intents.map(\.id), [new.id, old.id]) + } + + func testIntentsOnSeveralIdentitiesMakeOneConnection() { + let first = Self.intent([Self.authKey(10)]) + let second = Self.intent([Self.authKey(10)], identity: Self.otherIdentity) + let projection = AppConnect.project( + [Self.snapshot([]), Self.snapshot([Self.onPlatform(Self.authKey(10))], identity: Self.otherIdentity)], + intents: [first, second]) + XCTAssertEqual(projection.connections.map(\.status), [.active(expiresAt: Self.now + 1000)]) + } + + func testALiveAppKeyNoIntentNamesIsShownUnderItsApp() { + let group = Self.authKey(10, bound: .contractGroup(Self.appGroup)) + let intent = Self.intent([group]) + let stray = Self.onPlatform(Self.authKey(20, bound: .contractGroup(Self.appGroup))) + let projection = AppConnect.project([Self.snapshot([Self.onPlatform(group, disabledAt: 1), stray])], intents: [intent]) + XCTAssertEqual(projection.connections.count, 1) + XCTAssertEqual(projection.connections[0].appId, Self.app) + XCTAssertEqual(projection.connections[0].unrecordedKeyIds, [Self.identity: [20]]) + XCTAssertEqual(projection.connections[0].status, .active(expiresAt: nil)) + } + + func testALiveKeyOfAnAppWithNoIntentMakesItsOwnConnection() { + let stray = Self.onPlatform(Self.authKey(20, bound: .singleContract(Self.otherApp))) + let projection = AppConnect.project([Self.snapshot([stray])], intents: []) + XCTAssertEqual(projection.connections.map(\.appId), [Self.otherApp]) + XCTAssertEqual(projection.connections[0].unrecordedKeyIds, [Self.identity: [20]]) + } + + func testAProfileKeyNoIntentNamesStandsAsAConnectionOfItsOwnAndADisabledOneIsNotShown() { + let profile = Self.authKey(20, bound: .documentType(contractId: Self.dashPay, name: "profile")) + let off = Self.authKey(21, bound: .singleContract(Self.otherApp)) + let snapshot = Self.snapshot([Self.onPlatform(profile), Self.onPlatform(off, disabledAt: 1)]) + let projection = AppConnect.project([snapshot], intents: []) + XCTAssertEqual(projection.connections.map(\.appId), [Self.dashPay], "it can be turned off with no other row left") + 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, + [20]) + } + + func testAKeyAStoreCannotBindIsNotGuessedToBeAnApps() { + let unknown = Self.onPlatform(Self.authKey(20), boundKnown: false) + XCTAssertEqual(AppConnect.project([Self.snapshot([unknown])], intents: []).connections, []) + } + + // MARK: Snapshots + + func testAReadBehindOneAlreadySeenIsDropped() { + let newest = Self.snapshot([], revision: 7) + XCTAssertFalse(Self.snapshot([], revision: 6).mayReplace(newest)) + XCTAssertTrue(Self.snapshot([], revision: 7).mayReplace(newest)) + XCTAssertTrue(Self.snapshot([], revision: 1).mayReplace(nil)) + XCTAssertTrue(Self.snapshot([], identity: Self.otherIdentity, revision: 1).mayReplace(newest)) + } + + // MARK: Key ids + + func testNewIdsSkipEveryIdAnIntentMayStillLandOn() { + let pending = Self.intent([Self.authKey(14), Self.encryptionKey(15)]) + let elsewhere = Self.intent([Self.authKey(40)], identity: Self.otherIdentity) + let ids = AppConnect.newKeyIds( + count: 2, snapshot: Self.snapshot([Self.onPlatform(Self.authKey(3))]), intents: [pending, elsewhere]) + XCTAssertEqual(ids, [16, 17]) + } + + func testNewIdsTakeTheLowestFreeOnesOnceTheTopIsReached() { + let top = Self.onPlatform(Self.authKey(UInt32.max - 1)) + XCTAssertEqual(AppConnect.newKeyIds(count: 1, snapshot: Self.snapshot([top]), intents: []), [UInt32.max]) + let low = [Self.onPlatform(Self.authKey(0)), top] + let pending = Self.intent([Self.authKey(1)]) + XCTAssertEqual(AppConnect.newKeyIds(count: 2, snapshot: Self.snapshot(low), intents: [pending]), [2, 3]) + } + + // MARK: Disconnect + + func testADisconnectTurnsOffWhatIsThereAndFencesWhatMayStillLand() { + let landed = Self.intent([Self.authKey(10), Self.authKey(11)], published: true) + let waiting = Self.intent([Self.authKey(12), Self.authKey(13)]) + let dead = Self.intent([Self.authKey(14)]) + let expired = Self.authKey(11, expiresAt: Self.now - 1) + let snapshot = Self.snapshot([ + Self.onPlatform(Self.authKey(10)), Self.onPlatform(expired), + 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) + XCTAssertEqual(plan.disable, [10, 11]) + XCTAssertEqual(plan.fence, [12]) + XCTAssertEqual(plan.deleteResponses, [landed.id]) + } + + func testAPartlyLandedIntentIsFencedOnlyWhileAKeyIsMissing() { + 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) + XCTAssertEqual(plan.disable, [10]) + XCTAssertEqual(plan.fence, [11]) + } + + func testUnrecordedAppKeysAreTurnedOffOnlyWhenTheUserSaysSo() { + let intent = Self.intent([Self.authKey(10)]) + 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, + [10]) + XCTAssertEqual( + AppConnect.disconnectPlan(appId: Self.app, snapshot: snapshot, intents: [intent], includeUnrecorded: true).disable, + [10, 20]) + } + + func testADisconnectLeavesOtherAppsAndOtherIdentitiesAlone() { + let mine = Self.intent([Self.authKey(10)]) + let otherApps = Self.intent([Self.authKey(11)], app: Self.otherApp) + 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) + XCTAssertEqual(plan, AppConnect.DisconnectPlan(disable: [10])) + } + + // MARK: Store + + func testAnIntentRoundTripsThroughJSON() throws { + let intent = Self.intent([ + Self.authKey(10, bound: .documentType(contractId: Self.dashPay, name: "profile")), + Self.authKey(11, bound: .contractGroup(Self.appGroup)), Self.encryptionKey(12), + ]) + let decoded = try JSONDecoder().decode(Intent.self, from: JSONEncoder().encode(intent)) + XCTAssertEqual(decoded, intent) + } + + // MARK: Intent store + + private func intentStore(_ scope: @escaping () -> String?) -> (UserDefaultsAppConnectIntentStore, UserDefaults) { + let suite = "AppConnectProjectionTests.\(UUID().uuidString)" + let defaults = UserDefaults(suiteName: suite)! + addTeardownBlock { defaults.removePersistentDomain(forName: suite) } + return (UserDefaultsAppConnectIntentStore(defaults: defaults, network: .testnet, scopeKeyProvider: scope), defaults) + } + + func testAPinnedHandedInScopeDoesNotFollowItsProvider() { + var scope: String? = "scope-a" + let (store, _) = intentStore { scope } + let intent = Self.intent([Self.authKey(6)]) + + let pinned = store.pinned(toWalletIdHex: "wallet-a") + scope = "scope-b" + pinned.save([intent]) + + XCTAssertEqual(store.load(), []) + scope = "scope-a" + XCTAssertEqual(store.load(), [intent]) + } + + func testARowThisBuildCannotReadIsKeptAndCountsForItsIdentity() throws { + let (store, defaults) = intentStore { "scope" } + let intent = Self.intent([Self.authKey(6)]) + store.save([intent]) + let key = "scope.app-connect-intents.v1" + var rows = try XCTUnwrap(JSONSerialization.jsonObject(with: XCTUnwrap(defaults.data(forKey: key))) as? [Any]) + rows.append(["identityId": Self.identity.base64EncodedString(), "future": true]) + defaults.set(try JSONSerialization.data(withJSONObject: rows), forKey: key) + + XCTAssertEqual(store.load(), [intent]) + XCTAssertTrue(store.hasUnreadableRows(identityId: Self.identity)) + XCTAssertFalse(store.hasUnreadableRows(identityId: Self.otherIdentity)) + store.save([]) + XCTAssertTrue(store.hasUnreadableRows(identityId: Self.identity), "an unreadable row is never dropped") + } + + func testAStoredValueThatIsNotARowListIsNeverReplaced() { + let (store, defaults) = intentStore { "scope" } + defaults.set("not a list", forKey: "scope.app-connect-intents.v1") + XCTAssertFalse(store.canPersist) + store.save([Self.intent([Self.authKey(6)])]) + XCTAssertEqual(defaults.string(forKey: "scope.app-connect-intents.v1"), "not a list") + } + + // MARK: Rows + + func testRowsFollowTheProjection() { + let gone = DAppConnection( + id: Self.otherApp.toBase58String(), name: "Gone", url: "", status: .active, + updatedAt: Date(timeIntervalSince1970: 1)) + let confirming = Self.intent([Self.authKey(10)]) + let projection = AppConnect.project([Self.snapshot([])], intents: [confirming]) + let rows = PlatformDashConnectDataSource.rows( + [gone], after: projection, of: Self.identity, intents: [], at: Date(timeIntervalSince1970: 2)) + XCTAssertEqual(rows.map(\.id), [Self.app.toBase58String()]) + XCTAssertEqual(rows.last?.status, .confirming) + XCTAssertEqual(rows.last?.name, "App") + } + + func testAConnectionWhoseResponseWasNeverPublishedShowsAsNotDelivered() { + let key = Self.authKey(10) + let snapshot = Self.snapshot([Self.onPlatform(key)]) + let undelivered = AppConnect.project([snapshot], intents: [Self.intent([key])]) + XCTAssertEqual(undelivered.connections.first?.isUndelivered, true) + XCTAssertEqual( + PlatformDashConnectDataSource.rows([], after: undelivered, of: Self.identity, intents: [], at: Date(timeIntervalSince1970: 2)).map(\.status), + [.undelivered]) + let delivered = AppConnect.project([snapshot], intents: [Self.intent([key], published: true)]) + XCTAssertEqual(delivered.connections.first?.isUndelivered, false) + XCTAssertEqual( + PlatformDashConnectDataSource.rows([], after: delivered, of: Self.identity, intents: [], at: Date(timeIntervalSince1970: 2)).map(\.status), + [.active]) + let restored = AppConnect.project([Self.snapshot([Self.onPlatform(key)])], intents: []) + XCTAssertEqual(restored.connections.first?.isUndelivered, false, "keys no intent names are not judged undelivered") + } + + func testAccessSeenOnAnotherIdentityKeepsTheRowUntilThatIdentityIsReadAgain() { + let stray = Self.onPlatform(Self.authKey(20)) + let onA = AppConnect.project([Self.snapshot([stray])], intents: []) + let rowsA = PlatformDashConnectDataSource.rows([], after: onA, of: Self.identity, intents: [], at: Date(timeIntervalSince1970: 1)) + XCTAssertEqual(rowsA.first?.seenOn, [Self.identity.toBase58String()]) + let onB = AppConnect.project([Self.snapshot([], identity: Self.otherIdentity)], intents: []) + let rowsB = PlatformDashConnectDataSource.rows(rowsA, after: onB, of: Self.otherIdentity, intents: [], at: Date(timeIntervalSince1970: 2)) + XCTAssertEqual(rowsB.map(\.id), [Self.app.toBase58String()], "B's read says nothing of A") + XCTAssertEqual(rowsB.first?.status, .active) + let againA = AppConnect.project([Self.snapshot([Self.onPlatform(Self.authKey(20), disabledAt: 1)])], intents: []) + XCTAssertEqual( + PlatformDashConnectDataSource.rows(rowsB, after: againA, of: Self.identity, intents: [], at: Date(timeIntervalSince1970: 3)), + [], "A read again shows the key off") + } + + func testARowAnotherIdentityHoldsKeepsWhatOtherIdentitiesSaw() { + let a = Self.identity.toBase58String(), b = Self.otherIdentity.toBase58String() + let row = DAppConnection( + id: Self.app.toBase58String(), name: "App", url: "", status: .active, + updatedAt: Date(timeIntervalSince1970: 1), seenOn: [a, b]) + let elsewhere = Self.intent([Self.authKey(10)], identity: Self.otherIdentity) + let rows = PlatformDashConnectDataSource.rows( + [row], after: AppConnect.project([Self.snapshot([])], intents: []), of: Self.identity, intents: [elsewhere], + at: Date(timeIntervalSince1970: 2)) + XCTAssertEqual(rows.map(\.seenOn), [[b]], "only the identity read now is dropped") + } + + func testAnAppConnectRowHeldByAnotherIdentityStays() { + let row = DAppConnection( + id: Self.otherApp.toBase58String(), name: "Elsewhere", url: "", status: .active, + updatedAt: Date(timeIntervalSince1970: 1)) + let elsewhere = Self.intent([Self.authKey(10)], app: Self.otherApp, identity: Self.otherIdentity) + let rows = PlatformDashConnectDataSource.rows( + [row], after: AppConnect.project([Self.snapshot([])], intents: []), of: Self.identity, intents: [elsewhere], + at: Date(timeIntervalSince1970: 2)) + XCTAssertEqual(rows, [row]) + } + + /// While the read has a key of unknown bound, no row goes, whether its + /// intent was turned off, never landed or there is no intent at all; once + /// every key is placed, the row goes. + func testNoRowGoesWhileAKeyHasAnUnknownBound() { + let key = Self.authKey(10) + let row = DAppConnection( + id: Self.app.toBase58String(), name: "App", url: "", status: .active, + updatedAt: Date(timeIntervalSince1970: 1)) + let unplaced = Self.onPlatform(Self.authKey(20, bound: .singleContract(Self.otherApp)), boundKnown: false) + let off = Self.onPlatform(key, disabledAt: 1) + let taken = Self.onPlatform(Self.authKey(10, data: 9, bound: .singleContract(Self.otherApp))) + let cases: [(String, [AppConnect.PlatformKey], [Intent], AppConnect.IntentStatus?)] = [ + ("turned off", [off], [Self.intent([key])], .disconnected), + ("never landed", [taken], [Self.intent([key])], .neverLanded), + ("no intent", [], [], nil), + ] + for (name, keys, intents, status) in cases { + let rows = { (keys: [AppConnect.PlatformKey]) in + let projection = AppConnect.project([Self.snapshot(keys)], intents: intents) + XCTAssertEqual(projection.connections.first { $0.appId == Self.app }?.status, status, name) + return PlatformDashConnectDataSource.rows( + [row], after: projection, of: Self.identity, intents: [], at: Date(timeIntervalSince1970: 2)) + .filter { $0.id == row.id } + } + XCTAssertEqual(rows(keys + [unplaced]), [row], name) + XCTAssertEqual(rows(keys), [], name) + } + } + + // MARK: Retry + + private static func plan( + budget: UInt64? = 1000, expiresAt: UInt64 = now + 1000, critical: Bool = false, + encryption: [AppConnectRequest.EncryptionBinding] = [], connectionId: Data? = nil + ) -> AppConnect.GrantPlan { + let binding = AppConnectRequest.AuthBinding( + kind: .singleContract, securityLevel: critical ? .critical : .high, id: app, + totalBudget: budget, expiresAt: expiresAt, documentTypeName: nil) + return AppConnect.GrantPlan( + appId: app, appEphemeralPubKeyHash: Data(repeating: 0xEE, count: 20), + auth: [AppConnect.AuthGrant(bindingIndex: 0, binding: binding, totalBudget: budget, expiresAt: expiresAt)], + encryption: encryption.enumerated().map { AppConnect.EncryptionGrant(bindingIndex: $0.offset, binding: $0.element) }, + connectionId: connectionId, identityHint: nil, createdAt: 0, callbackHost: nil) + } + + // MARK: Fence + + func testAFenceKeyIsTheSameOnEveryTryAndDiffersPerId() { + let first = AppConnect.fenceKeyLeaf(identityId: Self.identity, keyId: 7) + XCTAssertEqual(first, AppConnect.fenceKeyLeaf(identityId: Self.identity, keyId: 7)) + XCTAssertNotEqual(first, AppConnect.fenceKeyLeaf(identityId: Self.identity, keyId: 8)) + XCTAssertNotEqual(first, AppConnect.fenceKeyLeaf(identityId: Self.otherIdentity, keyId: 7)) + let key = AppConnect.fenceKey(keyId: 7, publicKeyHash160: Data(repeating: 1, count: 20)) + XCTAssertEqual(key.keyId, 7) + XCTAssertEqual(key.purpose, .authentication) + XCTAssertNil(key.contractBounds) + } + + func testAnIntendedKeyIsSubmittedExactlyAsRecorded() { + let key = Self.authKey(10, bound: .documentType(contractId: Self.dashPay, name: "profile")) + let submitted = AppConnect.identityPubkey(of: key) + XCTAssertEqual(submitted.keyId, 10) + XCTAssertEqual(submitted.pubkeyBytes, key.data) + XCTAssertEqual(submitted.contractBounds, .singleContractDocumentType(id: Self.dashPay, documentTypeName: "profile")) + XCTAssertEqual(submitted.totalBudget, key.totalBudget) + XCTAssertEqual(submitted.expiresAt, key.expiresAt) + } + + // MARK: Review fixes + + func testAnUnrecordedKeyOnAContractSeveralAppsBindIsOfferedWithEachOfThem() { + let shared = Data(repeating: 0xC1, count: 32) + let mine = Self.intent([Self.authKey(10, bound: .singleContract(shared))]) + let theirs = Self.intent([Self.authKey(11, bound: .singleContract(shared))], app: Self.otherApp) + let stray = Self.onPlatform(Self.authKey(20, bound: .singleContract(shared))) + let snapshot = Self.snapshot([stray]) + let projection = AppConnect.project([snapshot], intents: [mine, theirs]) + 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, + [20]) + } + } + + func testAnUnrecordedKeyOnASharedContractGoesWithTheDisconnectOfAnyAppBindingIt() { + let shared = Data(repeating: 0xC1, count: 32) + let mine = Self.intent([Self.authKey(10, bound: .singleContract(shared))]) + var gone = Self.intent([Self.authKey(11, bound: .singleContract(shared))], app: Self.otherApp) + gone.closedAt = Date(timeIntervalSince1970: 5) + let stray = Self.onPlatform(Self.authKey(20, bound: .singleContract(shared))) + let projection = AppConnect.project([Self.snapshot([stray])], intents: [mine, gone]) + for app in [Self.app, Self.otherApp] { + XCTAssertEqual(projection.connections.first { $0.appId == app }?.unrecordedKeyIds[Self.identity], [20]) + } + for app in [Self.app, Self.otherApp] { + XCTAssertEqual( + AppConnect.disconnectPlan(appId: app, snapshot: Self.snapshot([stray]), intents: [mine, gone], includeUnrecorded: true).disable, + [20], "a disconnect of either app turns it off") + } + } + + func testALiveKeyOfAnIntentWithATakenIdStaysActionable() { + let a = Self.authKey(10), b = Self.authKey(11) + let intent = Self.intent([a, b]) + 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) + XCTAssertEqual(plan.disable, [10]) + XCTAssertEqual(plan.fence, []) + } + + func testAResponseIsNotReleasedForALandedKeyGivenMoreThanApproved() { + let key = Self.authKey(10) + let intent = Self.intent([key]) + let raised = AppConnect.PlatformKey( + id: 10, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, data: key.data, + readOnly: false, bound: key.bound, boundKnown: true, totalBudget: 5000, expiresAt: Self.now + 1000, + disabledAt: nil) + XCTAssertTrue(AppConnect.landedKeysWithinPlan(intent, Self.plan(), in: Self.snapshot([]))) + XCTAssertTrue(AppConnect.landedKeysWithinPlan(intent, Self.plan(), in: Self.snapshot([Self.onPlatform(key)]))) + XCTAssertFalse(AppConnect.landedKeysWithinPlan(intent, Self.plan(), in: Self.snapshot([raised]))) + let longer = AppConnect.PlatformKey( + id: 10, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, data: key.data, + readOnly: false, bound: key.bound, boundKnown: true, totalBudget: 1000, expiresAt: Self.now + 9000, + disabledAt: nil) + XCTAssertFalse(AppConnect.landedKeysWithinPlan(intent, Self.plan(), in: Self.snapshot([longer]))) + let lowered = AppConnect.PlatformKey( + id: 10, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, data: key.data, + readOnly: false, bound: key.bound, boundKnown: true, totalBudget: 500, expiresAt: Self.now + 1000, + disabledAt: nil) + XCTAssertTrue(AppConnect.landedKeysWithinPlan(intent, Self.plan(), in: Self.snapshot([lowered])), "less than approved") + let uncapped = AppConnect.PlatformKey( + id: 10, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, data: key.data, + readOnly: false, bound: key.bound, boundKnown: true, totalBudget: nil, expiresAt: Self.now + 1000, + disabledAt: nil) + XCTAssertFalse(AppConnect.landedKeysWithinPlan(intent, Self.plan(), in: Self.snapshot([uncapped])), "no cap is more") + XCTAssertTrue(AppConnect.landedKeysWithinPlan(intent, Self.plan(budget: nil), in: Self.snapshot([uncapped]))) + } + + func testAnExpiredKeyOfAnIntentWithATakenIdKeepsTheConnection() { + let a = Self.authKey(10, expiresAt: Self.now - 1), b = Self.authKey(11) + let intent = Self.intent([a, b]) + 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, + [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") + } + + func testAnIntentHasLandedOnlyOnceTheKeysItTurnsOffAreOff() { + let key = Self.authKey(10), earlier = Self.authKey(5) + var intent = Self.intent([key]) + intent = Intent( + id: intent.id, identityId: intent.identityId, appId: intent.appId, appLabel: intent.appLabel, + appUrl: intent.appUrl, requestHash: intent.requestHash, connectionId: nil, keys: intent.keys, + sentEncryptionKeyIds: [], disables: [5], response: intent.response, responseDocumentId: nil, + responseRemoved: true, createdAt: intent.createdAt, closedAt: nil) + let addedElsewhere = Self.snapshot([Self.onPlatform(key), Self.onPlatform(earlier)]) + XCTAssertFalse(AppConnect.hasLanded(intent, in: addedElsewhere), "the earlier key is still on") + XCTAssertEqual(AppConnect.outstandingDisables(of: intent, in: addedElsewhere), [5]) + XCTAssertTrue(AppConnect.hasLanded( + intent, in: Self.snapshot([Self.onPlatform(key), Self.onPlatform(earlier, disabledAt: 1)]))) + XCTAssertFalse(AppConnect.hasLanded(intent, in: Self.snapshot([Self.onPlatform(earlier, disabledAt: 1)]))) + } + + func testAResponseIsReleasedOnlyWhileEveryAuthKeyCanSign() { + let a = Self.authKey(10), b = Self.authKey(11) + let intent = Self.intent([a, b]) + XCTAssertTrue(AppConnect.authKeysUsable(intent, in: Self.snapshot([Self.onPlatform(a)])), "one may still land") + XCTAssertFalse( + AppConnect.authKeysUsable(intent, in: Self.snapshot([Self.onPlatform(a), Self.onPlatform(b, disabledAt: 1)])), + "one of two is off") + let expired = Self.authKey(11, expiresAt: Self.now - 1) + XCTAssertFalse(AppConnect.authKeysUsable(Self.intent([a, expired]), in: Self.snapshot([Self.onPlatform(expired)]))) + } + + func testTheResponsesEncryptionKeysAreListedByPurpose() { + let added = Self.encryptionKey(12) + var intent = Self.intent([Self.authKey(10), added]) + intent = Intent( + id: intent.id, identityId: intent.identityId, appId: intent.appId, appLabel: intent.appLabel, + appUrl: intent.appUrl, requestHash: intent.requestHash, connectionId: nil, keys: intent.keys, + sentEncryptionKeyIds: [7], disables: [], response: intent.response, + responseDocumentId: nil, responseRemoved: true, createdAt: intent.createdAt, closedAt: nil) + let decryption = AppConnect.PlatformKey( + id: 7, purpose: .decryption, securityLevel: .medium, keyType: .ecdsaSecp256k1, data: Data(repeating: 7, count: 33), + readOnly: false, bound: .singleContract(Self.app), boundKnown: true, totalBudget: nil, expiresAt: nil, disabledAt: nil) + typealias Expected = AppConnect.ExpectedCurrentKey + XCTAssertEqual( + AppConnect.expectedCurrentEncryptionKeys(of: intent, in: Self.snapshot([decryption, Self.onPlatform(added)])), + [.encryption: [Expected(id: 12, data: added.data, mayBeNone: false)], .decryption: [Expected(id: 7, data: decryption.data, mayBeNone: false)]]) + XCTAssertEqual( + AppConnect.expectedCurrentEncryptionKeys(of: intent, in: Self.snapshot([decryption])), + [.encryption: [Expected(id: 12, data: added.data, mayBeNone: true)], .decryption: [Expected(id: 7, data: decryption.data, mayBeNone: false)]]) + XCTAssertEqual( + AppConnect.expectedCurrentEncryptionKeys( + of: intent, in: Self.snapshot([decryption, Self.onPlatform(added, data: Data(repeating: 9, count: 33))])), + [.decryption: [Expected(id: 7, data: decryption.data, mayBeNone: false)]], "another key under its id is not asked about") + + let toRegister = Expected(id: 12, data: added.data, mayBeNone: true) + let resent = Expected(id: 7, data: decryption.data, mayBeNone: false) + let ours = AppConnect.CurrentContractKey(keyId: 12, keyType: nil, data: added.data, isDisabled: false) + let other = AppConnect.CurrentContractKey(keyId: 5, keyType: nil, data: Data(repeating: 5, count: 33), isDisabled: false) + let disabledOther = AppConnect.CurrentContractKey(keyId: 5, keyType: nil, data: Data(repeating: 5, count: 33), isDisabled: true) + let sameIdOtherKey = AppConnect.CurrentContractKey(keyId: 12, keyType: nil, data: Data(repeating: 9, count: 33), isDisabled: false) + let resentOff = AppConnect.CurrentContractKey(keyId: 7, keyType: nil, data: decryption.data, isDisabled: true) + XCTAssertEqual(AppConnect.check(nil, against: toRegister), .matches, "none current yet") + XCTAssertEqual(AppConnect.check(ours, against: toRegister), .matches, "it landed and the identity read was behind") + XCTAssertEqual(AppConnect.check(other, against: toRegister), .differs, "another key became current") + XCTAssertEqual(AppConnect.check(disabledOther, against: toRegister), .differs, "a disabled current key is still a current key") + XCTAssertEqual(AppConnect.check(sameIdOtherKey, against: toRegister), .differs, "another key under its id") + XCTAssertEqual(AppConnect.check(nil, against: resent), .notYet, "the node that answered may be behind") + XCTAssertEqual(AppConnect.check(resentOff, against: resent), .differs) + } + + func testAResponseIsResentOnlyWhileItsEncryptionKeysCanBeUsed() { + let added = Self.encryptionKey(12) + let intent = Self.intent([Self.authKey(10), added]) + XCTAssertTrue(AppConnect.encryptionKeysUsable(intent, in: Self.snapshot([])), "not landed yet") + XCTAssertTrue(AppConnect.encryptionKeysUsable(intent, in: Self.snapshot([Self.onPlatform(added)]))) + XCTAssertFalse( + AppConnect.encryptionKeysUsable(intent, in: Self.snapshot([Self.onPlatform(added, disabledAt: 1)])), + "an encryption key it adds was turned off") + } + + func testARowAnotherIdentityHoldsStaysAfterThisOneDisconnected() { + let row = DAppConnection( + id: Self.app.toBase58String(), name: "App", url: "", status: .active, + updatedAt: Date(timeIntervalSince1970: 1)) + let closed = Self.intent([Self.authKey(10)]) + let projection = AppConnect.project([Self.snapshot([Self.onPlatform(Self.authKey(10), disabledAt: 1)])], intents: [closed]) + let elsewhere = Self.intent([Self.authKey(10)], identity: Self.otherIdentity) + let rows = PlatformDashConnectDataSource.rows( + [row], after: projection, of: Self.identity, intents: [elsewhere], at: Date(timeIntervalSince1970: 2)) + XCTAssertEqual(rows, [row]) + } + + func testAFenceKeyCanSpendOneCreditAndNeverExpires() { + let key = AppConnect.fenceKey(keyId: 7, publicKeyHash160: Data(repeating: 1, count: 20)) + XCTAssertEqual(key.totalBudget, 1) + XCTAssertNil(key.expiresAt) + } + + // MARK: Second review round + + func testAnIdHeldByAnotherKeyEndsTheUpdateEvenWhenItIsTheEncryptionKey() { + let auth = Self.authKey(20) + let encryption = Self.encryptionKey(21) + let intent = Self.intent([auth, encryption]) + var other = Self.onPlatform(encryption) + other = AppConnect.PlatformKey( + id: 21, purpose: .encryption, securityLevel: .medium, keyType: .ecdsaSecp256k1, + data: Data(repeating: 0x77, count: 33), readOnly: false, bound: other.bound, boundKnown: true, + totalBudget: nil, expiresAt: nil, disabledAt: nil) + 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, + []) + } + + func testAKeyAtTheLastIdLeavesTheLowestFreeIds() { + let last = Self.onPlatform(Self.authKey(UInt32.max)) + XCTAssertEqual(AppConnect.newKeyIds(count: 2, snapshot: Self.snapshot([last]), intents: []), [0, 1]) + } + + // MARK: Third review round + + func testAnAppWhoseIntentsAreOnlyOnAnotherIdentityHasNoConnectionInThisRead() { + let elsewhere = Self.intent([Self.authKey(10)], identity: Self.otherIdentity) + XCTAssertEqual(AppConnect.project([Self.snapshot([])], intents: [elsewhere]).connections, []) + } + + func testOnlyKeysInAnAppConnectShapeOnAnAppsContractCountAsUnrecorded() { + let full = AppConnect.PlatformKey( + id: 20, purpose: .authentication, securityLevel: .high, keyType: .ecdsaSecp256k1, + data: Data(repeating: 2, count: 33), readOnly: false, bound: .singleContract(Self.otherApp), boundKnown: true, + totalBudget: nil, expiresAt: nil, disabledAt: nil) + let master = Self.onPlatform(Key( + id: 21, purpose: .authentication, securityLevel: .master, keyType: .ecdsaHash160, + data: Data(repeating: 3, count: 20), readOnly: false, bound: .singleContract(Self.otherApp), + totalBudget: nil, expiresAt: nil)) + let system = Self.onPlatform(Self.authKey(22, bound: .singleContract(Data.identifier(fromBase58: AppConnect.contractId)!))) + XCTAssertEqual(AppConnect.project([Self.snapshot([full, master, system])], intents: []).connections, []) + } + + // MARK: Fourth review round + + func testAProtocolTimestampAboveTheSignedRangeIsReadUnsigned() { + let far: UInt64 = 1 << 63 + 5 + let info = ManagedIdentity.IdentityPublicKeyInfo( + keyId: 4, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, readOnly: false, + disabledAt: nil, data: Data(repeating: 4, count: 20), totalBudget: nil, expiresAt: Int64(bitPattern: far)) + XCTAssertEqual(AppConnect.platformKey(info, binding: nil).expiresAt, far) + } + + func testAKeyWithoutAnExpiryIsNoAppConnectKey() { + let forever = Self.onPlatform(Self.authKey(20, bound: .singleContract(Self.otherApp), expiresAt: nil)) + XCTAssertEqual(AppConnect.project([Self.snapshot([forever])], intents: []).connections, []) + } + + func testAKeyWhoseBoundIsNotKnownYetIsReportedNotGuessed() { + let unplaced = Self.onPlatform(Self.authKey(20), boundKnown: false) + let projection = AppConnect.project([Self.snapshot([unplaced])], intents: []) + XCTAssertEqual(projection.connections, []) + XCTAssertEqual(projection.unplacedKeyIds, [Self.identity: [20]]) + } + + func testAnIdAnotherKeyHoldsIsThatKeysNotTheIntents() { + let mine = Self.intent([Self.authKey(7)]) + let theirs = Self.onPlatform(Self.authKey(7, data: 0x99, bound: .singleContract(Self.otherApp))) + let projection = AppConnect.project([Self.snapshot([theirs])], intents: [mine]) + XCTAssertEqual(projection.connections.first { $0.appId == Self.otherApp }?.unrecordedKeyIds, [Self.identity: [7]]) + } + + /// The app's keys are disabled after the other keys, so an update that + /// fails part way leaves an app key live while another key is: the app's + /// row stays, and its retry reaches the keys left (ADR-0031). + func testADisconnectDisablesTheAppsKeysAfterTheOtherKeys() { + // One app key below ten profile keys: in id order the first update + // would take the app key and nine profile keys. + let order = AppConnect.disableOrder(appKeyIds: [3], otherKeyIds: Array(4 ... 13)) + XCTAssertEqual(order, Array(4 ... 13) + [3]) + let batches = stride(from: 0, to: order.count, by: AppConnect.maxKeysDisabledPerUpdate).map { + Array(order[$0 ..< min($0 + AppConnect.maxKeysDisabledPerUpdate, order.count)]) + } + XCTAssertEqual(batches.first, Array(4 ... 13), "the first update takes only the other keys") + // Whichever update fails, while another key is still live so is an + // app key. + for failed in batches.indices { + let off = Set(batches[.. AppConnectGrant { - AppConnectGrant( - identityId: "identity", appContractId: appId, documentId: nil, - values: .init(appEphemeralPubKeyHash: requestHash, walletEphemeralPubKey: "bb", encryptedPayload: "cc"), - sessionKeyId: sessionKeyId, totalBudget: nil, expiresAt: nil, - publishedAt: Date(timeIntervalSince1970: 1_000), - additionalKeyIds: additionalKeyIds, - connectionId: connectionId) - } - // MARK: - Derivation func testEachBindingDerivesFromItsOwnLeafAndTheLeafIsStable() { @@ -115,8 +100,8 @@ final class AppConnectV2LoginTests: XCTestCase { (0 ..< AppConnectRequest.maxAuthBindings).map { AppConnect.authKeyLeaf(appEphemeralPubKey: Self.appEphemeralPubKey, bindingIndex: $0) }) - // Never the v1 session key of the same ephemeral key. - XCTAssertFalse(leaves.contains(AppConnect.requestId(appEphemeralPubKey: Self.appEphemeralPubKey))) + // Never the leaf of the v1 session key of the same ephemeral key. + XCTAssertFalse(leaves.contains(hash256(Self.appEphemeralPubKey))) // hash256(appEphPub ‖ 0x00) XCTAssertEqual(leaves[0], hash256(Self.appEphemeralPubKey + Data([0]))) // Another request derives other keys. @@ -126,7 +111,7 @@ final class AppConnectV2LoginTests: XCTestCase { } private func hash256(_ data: Data) -> Data { - AppConnect.requestId(appEphemeralPubKey: data) + Data(SHA256.hash(data: Data(SHA256.hash(data: data)))) } func testAuthKeysAreRegisteredWithTheirBindingLevelAndLimits() throws { @@ -430,307 +415,6 @@ final class AppConnectV2LoginTests: XCTestCase { // MARK: - Re-sending an auth key - func testAKeyOnTheIdentityIsSentAgainOnlyWithinThePlansTerms() throws { - let plan = try Self.vectorPlan() - let group = plan.auth[0] - func key(level: SecurityLevel = .critical, budget: UInt64? = 50_000_000_000, - expiresAt: UInt64? = Self.expiresAt, disabled: Bool = false) -> ManagedIdentity.IdentityPublicKeyInfo { - ManagedIdentity.IdentityPublicKeyInfo( - keyId: 7, purpose: .authentication, securityLevel: level, keyType: .ecdsaHash160, readOnly: false, - disabledAt: disabled ? 1 : nil, data: Data(repeating: 7, count: 20), - totalBudget: budget, expiresAt: expiresAt.map { Int64($0) }) - } - let stored = AppConnect.KeyBinding( - keyId: 7, data: Data(repeating: 7, count: 20), singleContractId: nil, bound: group.storedBound) - func resend(_ key: ManagedIdentity.IdentityPublicKeyInfo, binding: AppConnect.KeyBinding? = stored, - now: Date = AppConnectV2LoginTests.now) -> Bool { - AppConnect.canResendAuthKey(key, for: group, binding: binding, now: now) - } - XCTAssertTrue(resend(key())) - XCTAssertFalse(resend(key(disabled: true))) - XCTAssertFalse(resend(key(level: .high))) - XCTAssertFalse(resend(key(budget: 60_000_000_000))) - XCTAssertFalse(resend(key(budget: nil))) - XCTAssertFalse(resend(key(expiresAt: Self.expiresAt + 2 * Self.dayMilliseconds))) - XCTAssertFalse(resend(key(), now: Self.date(milliseconds: Self.expiresAt + 1)), "an expired key cannot sign") - // The payload alone does not make the key this binding's: the store - // has to show it with the binding's bound. - XCTAssertFalse(resend(key(), binding: nil), "a key the store does not show") - var otherBound = stored - otherBound.bound = .contractGroup(Data(repeating: 0xEE, count: 32)) - XCTAssertFalse(resend(key(), binding: otherBound), "a key bound to another group") - var wholeContract = stored - wholeContract.bound = .singleContract(group.binding.id) - XCTAssertFalse(resend(key(), binding: wholeContract), "the same id as a contract, not a group") - var unreadable = stored - unreadable.hasUnreadableBound = true - XCTAssertFalse(resend(key(), binding: unreadable)) - let otherKey = AppConnect.KeyBinding( - keyId: 8, data: Data(repeating: 7, count: 20), singleContractId: nil, bound: group.storedBound) - XCTAssertFalse(resend(key(), binding: otherKey), "a record of another key id") - } - - /// A disconnect finds the app's v2 keys that no record names: bound to - /// its contract, a document type on it, or a group its owner owns; with - /// an expiry; HIGH or CRITICAL. The allowlisted DashPay profile is shared. - func testADisconnectFindsTheAppsV2KeysThatNoRecordNames() { - let app = Data(repeating: 0xA1, count: 32) - let group = Data(repeating: 0xB2, count: 32) - let otherGroup = Data(repeating: 0xC3, count: 32) - let other = Data(repeating: 0xD4, count: 32) - let dashPay = Data.identifier(fromBase58: AppConnect.dashPayContractId)! - func key(_ id: Int32, level: SecurityLevel = .high, expires: Bool = true, disabled: Bool = false, - type: KeyType = .ecdsaHash160) -> ManagedIdentity.IdentityPublicKeyInfo { - ManagedIdentity.IdentityPublicKeyInfo( - keyId: id, purpose: .authentication, securityLevel: level, keyType: type, readOnly: false, - disabledAt: disabled ? 1 : nil, data: Data([UInt8(id)]), - totalBudget: nil, expiresAt: expires ? 9_000 : nil) - } - func binding(_ id: UInt32, _ bound: AppConnect.StoredBound?, unreadable: Bool = false) -> AppConnect.KeyBinding { - AppConnect.KeyBinding(keyId: id, data: Data([UInt8(id)]), singleContractId: nil, - hasUnreadableBound: unreadable, bound: bound) - } - let keys = [ - key(1), key(2), key(3, level: .critical), key(4, level: .critical), key(5), key(6), - key(7, expires: false), key(8, disabled: true), key(9, level: .master), key(10, type: .ecdsaSecp256k1), - key(11), key(12), - ] - let bindings = [ - binding(1, .singleContract(app)), - binding(2, .documentType(contractId: app, name: "post")), - binding(3, .contractGroup(group)), - binding(4, .contractGroup(otherGroup)), - binding(5, .documentType(contractId: dashPay, name: "profile")), - binding(6, .documentType(contractId: dashPay, name: "contactRequest")), - binding(7, .singleContract(app)), binding(8, .singleContract(app)), - binding(9, .singleContract(app)), binding(10, .singleContract(app)), - binding(11, .singleContract(other)), - binding(12, .singleContract(app)), - ] - let recorded: Set = [12] - let unrecorded = AppConnect.unrecordedV2Keys( - recordedKeyIds: recorded, bindings: bindings, currentIdentityPublicKeys: keys) - - XCTAssertEqual(unrecorded.map(\.keyId), [1, 2, 3, 4, 5, 6, 11]) - let candidates = AppConnect.unrecordedV2KeyBoundIds(appContractId: app, keys: unrecorded) - XCTAssertEqual(candidates.contracts, [other], "never the app itself, the allowlisted profile or a system contract") - XCTAssertEqual(candidates.groups, [group, otherGroup]) - XCTAssertEqual( - AppConnect.appsV2KeyIds(appContractIds: [app], appGroupIds: [group], keys: unrecorded), - [1, 2, 3]) - // Another contract of the app's owner: a binding the request could - // have had, so its key goes too. - XCTAssertEqual( - AppConnect.appsV2KeyIds(appContractIds: [app, other], appGroupIds: [group], keys: unrecorded), - [1, 2, 3, 11]) - // The DashPay profile key names no app: it is never the app's, only - // shared, and the contact-request type v2 does not allow is neither. - XCTAssertEqual(AppConnect.unattributedProfileKeyIds(keys: unrecorded), [5]) - // A key the store cannot place is the disconnect's stop, not a guess. - XCTAssertEqual( - AppConnect.unrecordedV2Keys( - recordedKeyIds: [], bindings: [binding(1, .singleContract(app), unreadable: true)], - currentIdentityPublicKeys: [key(1)]).count, - 0) - // Another identity's keys, from the store alone. - var stored = binding(1, .singleContract(app)) - stored.isV2AuthKeyShaped = true - var storedOff = binding(2, .singleContract(app)) - storedOff.isV2AuthKeyShaped = true - storedOff.isDisabled = true - XCTAssertEqual( - AppConnect.unrecordedV2Keys(recordedKeyIds: [], bindings: [stored, storedOff, binding(3, .singleContract(app))]) - .map(\.keyId), - [1]) - XCTAssertEqual( - AppConnect.sessionKeyIdsWithUnknownBinding(for: [], bindings: [], currentIdentityPublicKeys: [key(3, level: .critical)]), - [3], "a CRITICAL HASH160 key the store does not show stops a disconnect too") - } - - /// A disconnect takes the live, unexpired DashPay profile keys no - /// confirmed record names, and refuses a view of the identity it cannot - /// trust. - func testADisconnectTakesOnlyUnattributedLiveProfileKeys() { - let dashPay = Data.identifier(fromBase58: AppConnect.dashPayContractId)! - let app = Data(repeating: 0xA1, count: 32) - let now: Int64 = 100_000_000 - func key(_ id: Int32, expiresAt: Int64? = 200_000_000, disabled: Bool = false) -> ManagedIdentity.IdentityPublicKeyInfo { - ManagedIdentity.IdentityPublicKeyInfo( - keyId: id, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, readOnly: false, - disabledAt: disabled ? 1 : nil, data: Data([UInt8(id)]), - totalBudget: nil, expiresAt: expiresAt) - } - func binding(_ id: UInt32, _ bound: AppConnect.StoredBound?, expiresAt: Int64? = 200_000_000, - unreadable: Bool = false) -> AppConnect.KeyBinding { - var binding = AppConnect.KeyBinding(keyId: id, data: Data([UInt8(id)]), singleContractId: nil, - hasUnreadableBound: unreadable, bound: bound) - binding.isV2AuthKeyShaped = true - binding.expiresAt = expiresAt - return binding - } - let profile = AppConnect.StoredBound.documentType(contractId: dashPay, name: "profile") - let keys = [key(1), key(2), key(3, expiresAt: 92_800_000), key(4), key(5)] - let bindings = [ - binding(1, profile), binding(2, profile), binding(3, profile, expiresAt: 92_800_000), - binding(4, .singleContract(app)), binding(5, profile), - ] - - XCTAssertEqual( - AppConnect.sharedProfileKeyIdsToDisable( - recordedKeyIds: [5], bindings: bindings, currentIdentityPublicKeys: keys, nowMilliseconds: now), - [1, 2], "not the expired one, the app's own, or the recorded one") - XCTAssertEqual( - AppConnect.storedSharedProfileKeyIds(recordedKeyIds: [5], bindings: bindings, nowMilliseconds: now), - [1, 2]) - // Expiries past Int64.max arrive as negative bit patterns and are far - // in the future: counted, revoked, and still blocking when unplaced. - for far in [Int64.max, Int64(bitPattern: UInt64(Int64.max) + 1), -1] { - XCTAssertTrue(AppConnect.isUnexpired(far, nowMilliseconds: now)) - XCTAssertEqual(AppConnect.storedSharedProfileKeyIds( - recordedKeyIds: [], bindings: [binding(1, profile, expiresAt: far)], nowMilliseconds: now), [1]) - XCTAssertEqual(AppConnect.sharedProfileKeyIdsToDisable( - recordedKeyIds: [], bindings: [binding(1, profile, expiresAt: far)], - currentIdentityPublicKeys: [key(1, expiresAt: far)], nowMilliseconds: now), [1]) - XCTAssertTrue(AppConnect.hasUnplacedStoredKey( - recordedKeyIds: [], bindings: [binding(2, nil, expiresAt: far, unreadable: true)], nowMilliseconds: now)) - } - XCTAssertFalse(AppConnect.isUnexpired(nil, nowMilliseconds: now)) - XCTAssertFalse(AppConnect.isUnexpired(0, nowMilliseconds: now)) - // An hour of a fast device clock does not expire a working key. - XCTAssertEqual(AppConnect.storedSharedProfileKeyIds( - recordedKeyIds: [], bindings: [binding(1, profile, expiresAt: now - 1_000)], nowMilliseconds: now), [1]) - // A live v2 key the store cannot place may be a profile key. - XCTAssertNil(AppConnect.sharedProfileKeyIdsToDisable( - recordedKeyIds: [], bindings: [binding(1, nil, unreadable: true)], - currentIdentityPublicKeys: [key(1)], nowMilliseconds: now)) - XCTAssertNil(AppConnect.sharedProfileKeyIdsToDisable( - recordedKeyIds: [], bindings: [], currentIdentityPublicKeys: [key(1)], nowMilliseconds: now)) - // A live v2 key the store cannot place counts even when the fetched - // view lacks it. - XCTAssertNil(AppConnect.sharedProfileKeyIdsToDisable( - recordedKeyIds: [], bindings: [binding(1, profile), binding(2, nil, unreadable: true)], - currentIdentityPublicKeys: [key(1)], nowMilliseconds: now)) - // Not when that stored key is off, expired, or named by a record. - let placedOrOff: [(AppConnect.KeyBinding, Set)] = [ - (binding(2, nil, unreadable: true).disabled(), []), - (binding(2, nil, expiresAt: 92_800_000, unreadable: true), []), - (binding(2, nil, unreadable: true), [2]), - ] - for (stored, recorded) in placedOrOff { - XCTAssertFalse(AppConnect.hasUnplacedStoredKey( - recordedKeyIds: recorded, bindings: [stored], nowMilliseconds: now)) - } - // One the fetched view shows off does not. - XCTAssertEqual(AppConnect.sharedProfileKeyIdsToDisable( - recordedKeyIds: [], bindings: [binding(1, profile), binding(2, nil, unreadable: true)], - currentIdentityPublicKeys: [key(1), key(2, disabled: true)], nowMilliseconds: now), [1]) - // A stored profile key the fetched view lacks: the node is behind. - XCTAssertNil(AppConnect.sharedProfileKeyIdsToDisable( - recordedKeyIds: [], bindings: [binding(1, profile), binding(2, profile)], - currentIdentityPublicKeys: [key(1)], nowMilliseconds: now)) - // Disabled on Platform: nothing to do. - XCTAssertEqual(AppConnect.sharedProfileKeyIdsToDisable( - recordedKeyIds: [], bindings: [binding(1, profile)], - currentIdentityPublicKeys: [key(1, disabled: true)], nowMilliseconds: now), []) - } - - /// The app's keys are disabled after the profile keys, so an update that - /// fails part way leaves an app key live while a profile key is: the - /// retry still counts as the app's disconnect. - func testADisconnectDisablesTheAppsKeysAfterTheProfileKeys() { - // One app key below ten profile keys: in id order the first update - // would take the app key and nine profile keys. - let order = AppConnect.disableOrder(appKeyIds: [3], profileKeyIds: Array(4 ... 13)) - XCTAssertEqual(order, Array(4 ... 13) + [3]) - let batches = stride(from: 0, to: order.count, by: AppConnect.maxKeysDisabledPerUpdate).map { - Array(order[$0 ..< min($0 + AppConnect.maxKeysDisabledPerUpdate, order.count)]) - } - XCTAssertEqual(batches.first, Array(4 ... 13), "the first update takes only profile keys") - // Whichever update fails, while a profile key is still live so is an - // app key. - for failed in batches.indices { - let off = Set(batches[.. [ManagedIdentity.IdentityPublicKeyInfo] { - ids.map { Self.key($0) } - } - XCTAssertEqual(AppConnect.freeKeyIds(count: 3, currentIdentityPublicKeys: keys([0, 1, 2])), [3, 4, 5]) - XCTAssertEqual(AppConnect.freeKeyIds(count: 2, currentIdentityPublicKeys: []), [0, 1]) - XCTAssertEqual( - AppConnect.freeKeyIds(count: 2, currentIdentityPublicKeys: keys([0, 1, 2, 3, 5, .max])), [4, 6], - "past the last id: the gaps, skipping the taken 5") - XCTAssertEqual( - AppConnect.freeKeyIds(count: 3, currentIdentityPublicKeys: keys([0, .max - 1])), [.max, 1, 2], - "the last id, then the gaps, without overflowing") - XCTAssertEqual(AppConnect.freeKeyIds(count: 0, currentIdentityPublicKeys: keys([1])), []) - } - - /// After an update reported a failure, a key found under the added id is - /// taken as the added one only with everything it was registered with: - /// the same payload alone may be another request's key, bound otherwise. - func testASettledKeyIsTheAddedOneOnlyAsItWasAdded() throws { - let plan = try Self.vectorPlan() - let group = plan.auth[0] - let added = AppConnect.authIdentityPubkey(group, keyId: 7, publicKeyHash160: Data(repeating: 7, count: 20)) - func key(level: SecurityLevel = .critical, budget: UInt64? = group.totalBudget, disabled: Bool = false) - -> ManagedIdentity.IdentityPublicKeyInfo { - ManagedIdentity.IdentityPublicKeyInfo( - keyId: 7, purpose: .authentication, securityLevel: level, keyType: .ecdsaHash160, readOnly: false, - disabledAt: disabled ? 1 : nil, data: Data(repeating: 7, count: 20), - totalBudget: budget, expiresAt: Int64(group.expiresAt)) - } - let stored = AppConnect.KeyBinding( - keyId: 7, data: Data(repeating: 7, count: 20), singleContractId: nil, bound: group.storedBound) - XCTAssertTrue(AppConnect.isAddedKey(key(), added: added, binding: stored)) - var narrower = stored - narrower.bound = .documentType(contractId: group.binding.id, name: "post") - XCTAssertFalse(AppConnect.isAddedKey(key(), added: added, binding: narrower), "another request's bound") - XCTAssertFalse(AppConnect.isAddedKey(key(), added: added, binding: nil), "a key the store does not show") - XCTAssertFalse(AppConnect.isAddedKey(key(level: .high), added: added, binding: stored)) - XCTAssertFalse(AppConnect.isAddedKey(key(budget: 1), added: added, binding: stored)) - XCTAssertFalse(AppConnect.isAddedKey(key(disabled: true), added: added, binding: stored)) - } - /// A stored bound is read from the store's discriminant, ids and name. func testAStoredBoundIsReadFromTheStore() { let id = Data(repeating: 1, count: 32) @@ -1154,87 +838,6 @@ final class AppConnectV2LoginTests: XCTestCase { XCTAssertNil(try AppConnect.currentContractKey(from: response, identityId: "identity", purpose: .decryption)) } - // MARK: - Supersession (wallet rule 8) - - func testALoginReplacesTheLiveKeysOfTheSameConnectionOnly() { - let grants = [ - Self.grant(sessionKeyId: 10, additionalKeyIds: [11], connectionId: "c1"), - Self.grant(sessionKeyId: 20, additionalKeyIds: [21], requestHash: "bb", connectionId: "c2"), - Self.grant(sessionKeyId: 30, appId: "other", connectionId: "c1"), - ] - let keys = [ - Self.key(0, level: .master), Self.key(10, level: .critical), Self.key(11), Self.key(20), Self.key(21), - Self.key(30), - ] - func superseded(_ connectionId: String?, keeping: Set = []) -> [UInt32] { - AppConnect.supersededKeyIds( - grants: grants, identityId: "identity", appId: "app", connectionId: connectionId, - keeping: keeping, currentIdentityPublicKeys: keys) - } - XCTAssertEqual(superseded("c1"), [10, 11]) - XCTAssertEqual(superseded("c2"), [20, 21]) - XCTAssertEqual(superseded(nil), [], "without a connection id nothing is replaced") - XCTAssertEqual(superseded("c3"), []) - // A retry of the same request keeps the keys it sends again. - XCTAssertEqual(superseded("c1", keeping: [10, 11]), []) - } - - func testSupersessionSkipsKeysThatAreOffOrNotAppKeys() { - let grants = [Self.grant(sessionKeyId: 0, additionalKeyIds: [1, 2, 3], connectionId: "c1")] - let keys = [ - Self.key(0, level: .master), - Self.key(1, disabled: true), - Self.key(2, purpose: .transfer, level: .critical), - Self.key(3), - ] - XCTAssertEqual( - AppConnect.supersededKeyIds( - grants: grants, identityId: "identity", appId: "app", connectionId: "c1", - keeping: [], currentIdentityPublicKeys: keys), - [3], "a damaged record never gets the identity's own keys disabled") - } - - // MARK: - Disconnect and the grant record - - func testADisconnectDisablesEveryAuthKeyOfAV2Grant() { - let grant = Self.grant(sessionKeyId: 7, additionalKeyIds: [8]) - let encryption = Self.encryptionKey(9, data: Self.derivedPoint) - let keys = [Self.key(0, level: .master), Self.key(7, level: .critical), Self.key(8), encryption] - XCTAssertEqual( - AppConnect.sessionKeyIdsToDisable( - for: [grant], appContractId: Self.appId, - bindings: [ - .init(keyId: 9, data: Self.derivedPoint, singleContractId: Self.appId), - .init(keyId: 7, data: Self.key(7, level: .critical).data, singleContractId: nil, - bound: .contractGroup(Data(repeating: 0xB2, count: 32))), - ], - currentIdentityPublicKeys: keys), - [7, 8], "the group key and the profile key go; the shared encryption key stays") - XCTAssertEqual( - AppConnect.sessionKeyIdsMissing(from: [Self.key(7, level: .critical)], for: [grant]), - [8]) - } - - func testAGrantRecordWithoutTheV2FieldsStillReads() throws { - let stored = """ - {"identityId":"identity","appContractId":"app","values":{"appEphemeralPubKeyHash":"aa",\ - "walletEphemeralPubKey":"bb","encryptedPayload":"cc"},"sessionKeyId":6,"publishedAt":1000} - """ - let decoder = JSONDecoder() - decoder.dateDecodingStrategy = .millisecondsSince1970 - let grant = try decoder.decode(AppConnectGrant.self, from: Data(stored.utf8)) - XCTAssertNil(grant.additionalKeyIds) - XCTAssertNil(grant.connectionId) - XCTAssertEqual(grant.keyIds, [6]) - - let v2 = Self.grant(sessionKeyId: 7, additionalKeyIds: [8, 9], connectionId: "c1") - let encoder = JSONEncoder() - encoder.dateEncodingStrategy = .millisecondsSince1970 - let roundTripped = try decoder.decode(AppConnectGrant.self, from: encoder.encode(v2)) - XCTAssertEqual(roundTripped.keyIds, [7, 8, 9]) - XCTAssertEqual(roundTripped.connectionId, "c1") - } - // MARK: - URI and callback func testOnlyAVersionTwoKeyUriIsAnAppConnectRequest() { @@ -1282,9 +885,8 @@ final class AppConnectV2LoginTests: XCTestCase { XCTAssertEqual(AppConnect.Refusal(.invalid("label")).status, .invalid) } - func testOnlyAGrantPlanOrAKnownLoginCanBeApproved() throws { + func testOnlyAGrantPlanCanBeApproved() throws { XCTAssertTrue(AppConnect.Login.appConnect(try Self.vectorPlan()).isApprovable) - XCTAssertTrue(AppConnect.Login.twoQR.isApprovable) XCTAssertFalse(AppConnect.Login.unresolved.isApprovable) XCTAssertFalse(AppConnect.Login.refused(.init(.stale, "old")).isApprovable) } diff --git a/DashWalletTests/DashConnect/DashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/DashConnectDataSourceTests.swift index 27f03143ed..51bd3ba204 100644 --- a/DashWalletTests/DashConnect/DashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/DashConnectDataSourceTests.swift @@ -6,18 +6,15 @@ final class DashConnectDataSourceTests: XCTestCase { private let contractId = Data(repeating: 0xcd, count: 32) private let label = "Login to Yappr" - func testParseQRRoutesValidDashKeyUriToLoginRequest() async throws { + func testParseQRRefusesAVersion1DashKeyUri() async throws { let dataSource = MockDashConnectDataSource() + let uri = try validKeyUri() - let result = try await dataSource.parseQR(try validKeyUri()) - - guard case let .login(request) = result else { - return XCTFail("Expected a login request") + await XCTAssertThrowsErrorAsync({ + try await dataSource.parseQR(uri) + }) { error in + XCTAssertEqual(error as? AppConnect.Refusal, AppConnect.v1Refusal) } - - XCTAssertEqual(request.contractId, contractId) - XCTAssertEqual(request.label, label) - XCTAssertEqual(request.network, .testnet) } func testParseQRRoutesValidDashStUriToStateTransition() async throws { @@ -69,13 +66,11 @@ final class DashConnectDataSourceTests: XCTestCase { func testParseQRToleratesLeadingAndTrailingWhitespace() async throws { let dataSource = MockDashConnectDataSource() - let result = try await dataSource.parseQR(" \n\(try validKeyUri())\n\t ") + let result = try await dataSource.parseQR(" \n\(validStUri())\n\t ") - guard case let .login(request) = result else { - return XCTFail("Expected a login request") + guard case .stateTransition = result else { + return XCTFail("Expected a state transition request") } - - XCTAssertEqual(request.contractId, contractId) } func testHandleStateTransitionThrowsOnMock() async throws { @@ -100,8 +95,8 @@ final class DashConnectDataSourceTests: XCTestCase { XCTAssertEqual(request.existingConnection, existing) } - func testMakeConnectionRequestCarriesApprovedConnection() async { - let existing = MockDashConnectDataSource.sample(.approved) + func testMakeConnectionRequestCarriesAConfirmingConnection() async { + let existing = MockDashConnectDataSource.sample(.confirming) let dataSource = MockDashConnectDataSource(initial: [existing]) let request = await dataSource.makeConnectionRequest(from: MockDashConnectDataSource.sampleLoginRequest) @@ -114,10 +109,10 @@ final class DashConnectDataSourceTests: XCTestCase { // makes the assertion fail on any machine whose clock is set earlier. let initialDate = Date().addingTimeInterval(-60) let existing = DAppConnection( - id: MockDashConnectDataSource.sample(.approved).id, + id: MockDashConnectDataSource.sample(.confirming).id, name: "Yappr", url: "yap.pr", - status: .approved, + status: .confirming, updatedAt: initialDate ) let dataSource = MockDashConnectDataSource(initial: [existing]) diff --git a/DashWalletTests/DashConnect/DashConnectStoreTests.swift b/DashWalletTests/DashConnect/DashConnectStoreTests.swift index 92b923c2b2..6a90f3a617 100644 --- a/DashWalletTests/DashConnect/DashConnectStoreTests.swift +++ b/DashWalletTests/DashConnect/DashConnectStoreTests.swift @@ -22,9 +22,9 @@ final class DashConnectStoreTests: XCTestCase { func testRoundTripPreservesConnections() { let store = makeStore(network: .testnet, walletIdHex: "wallet-a") let connections = [ - sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .approved, updatedAt: Date(timeIntervalSince1970: 10)), + sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .confirming, updatedAt: Date(timeIntervalSince1970: 10)), sampleConnection(id: "7W6u4NgW63FPUuW8EnTbYzD4KybNQD5n7CUDWydJY234", name: "DashGet", url: "dashget.app", status: .active, updatedAt: Date(timeIntervalSince1970: 20)), - sampleConnection(id: "AaC695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNgA9Z", name: "PayKit", url: "paykit.dev", status: .approved, updatedAt: Date(timeIntervalSince1970: 30)), + sampleConnection(id: "AaC695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNgA9Z", name: "PayKit", url: "paykit.dev", status: .confirming, updatedAt: Date(timeIntervalSince1970: 30)), ] store.save(connections) @@ -32,21 +32,6 @@ final class DashConnectStoreTests: XCTestCase { XCTAssertEqual(store.load(), connections) } - func testRoundTripKeepsWhichLoginMadeAConnection() { - let store = makeStore(network: .testnet, walletIdHex: "wallet-a") - var oneQR = sampleConnection( - id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .active, - updatedAt: Date(timeIntervalSince1970: 10)) - oneQR.loginKind = .oneQR - let twoQR = sampleConnection( - id: "7W6u4NgW63FPUuW8EnTbYzD4KybNQD5n7CUDWydJY234", status: .active, - updatedAt: Date(timeIntervalSince1970: 20)) - - store.save([oneQR, twoQR]) - - XCTAssertEqual(store.load().map(\.loginKind), [.oneQR, .twoQR]) - } - func testUnknownStatusDropsOnlyThatRow() throws { let store = makeStore(network: .testnet, walletIdHex: "wallet-a") let payload: [[String: Any]] = [ @@ -54,7 +39,7 @@ final class DashConnectStoreTests: XCTestCase { "contractId": "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", "label": "Yappr", "url": "yap.pr", - "status": "approved", + "status": "confirming", "updatedAt": 1_773_132_300_000 ], [ @@ -70,10 +55,39 @@ final class DashConnectStoreTests: XCTestCase { XCTAssertEqual( store.load(), - [sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .approved, updatedAt: Date(timeIntervalSince1970: 1_773_132_300))] + [sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .confirming, updatedAt: Date(timeIntervalSince1970: 1_773_132_300))] ) } + func testWhereAccessWasSeenRoundTripsAndAnOlderRowReadsWithNone() throws { + let store = makeStore(network: .testnet, walletIdHex: "wallet-a") + let row = DAppConnection( + id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", name: "Yappr", url: "yap.pr", status: .active, + updatedAt: Date(timeIntervalSince1970: 10), seenOn: ["identity-a"]) + store.save([row]) + XCTAssertEqual(store.load().first?.seenOn, ["identity-a"]) + + let older: [[String: Any]] = [ + ["contractId": "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", "label": "Yappr", "url": "yap.pr", + "status": "active", "updatedAt": 1_773_132_300_000], + ] + defaults.set(try JSONSerialization.data(withJSONObject: older), forKey: try XCTUnwrap(store.storageKey)) + XCTAssertEqual(store.load().map(\.seenOn), [[]]) + } + + func testARowOfTheRemovedApprovedStatusIsDroppedAndTheOthersKept() throws { + let store = makeStore(network: .testnet, walletIdHex: "wallet-a") + let payload: [[String: Any]] = [ + ["contractId": "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", "label": "Yappr", "url": "yap.pr", + "status": "approved", "updatedAt": 1_773_132_300_000], + ["contractId": "7W6u4NgW63FPUuW8EnTbYzD4KybNQD5n7CUDWydJY234", "label": "DashGet", "url": "dashget.app", + "status": "active", "updatedAt": 1_773_218_700_000], + ] + defaults.set(try JSONSerialization.data(withJSONObject: payload), forKey: try XCTUnwrap(store.storageKey)) + + XCTAssertEqual(store.load().map(\.id), ["7W6u4NgW63FPUuW8EnTbYzD4KybNQD5n7CUDWydJY234"]) + } + func testMalformedRowIsDropped() throws { let store = makeStore(network: .testnet, walletIdHex: "wallet-a") let payload: [[String: Any]] = [ @@ -81,13 +95,13 @@ final class DashConnectStoreTests: XCTestCase { "contractId": "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", "label": "Yappr", "url": "yap.pr", - "status": "approved", + "status": "confirming", "updatedAt": 1_773_132_300_000 ], [ "label": "Broken", "url": "broken.app", - "status": "approved", + "status": "confirming", "updatedAt": 1_773_132_300_000 ], ] @@ -120,7 +134,7 @@ final class DashConnectStoreTests: XCTestCase { func testSavingEmptyArrayClearsStore() throws { let store = makeStore(network: .testnet, walletIdHex: "wallet-a") - store.save([sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .approved, updatedAt: Date(timeIntervalSince1970: 10))]) + store.save([sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .confirming, updatedAt: Date(timeIntervalSince1970: 10))]) store.save([]) @@ -131,7 +145,7 @@ final class DashConnectStoreTests: XCTestCase { func testNetworksAreIsolated() throws { let testnetStore = makeStore(network: .testnet, walletIdHex: "wallet-a") let mainnetStore = makeStore(network: .mainnet, walletIdHex: "wallet-a") - let testnetConnection = sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .approved, updatedAt: Date(timeIntervalSince1970: 10)) + let testnetConnection = sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .confirming, updatedAt: Date(timeIntervalSince1970: 10)) let mainnetConnection = sampleConnection(id: "7W6u4NgW63FPUuW8EnTbYzD4KybNQD5n7CUDWydJY234", status: .active, updatedAt: Date(timeIntervalSince1970: 20)) testnetStore.save([testnetConnection]) @@ -147,7 +161,7 @@ final class DashConnectStoreTests: XCTestCase { func testWalletIdsAreIsolated() { let walletAStore = makeStore(network: .testnet, walletIdHex: "wallet-a") let walletBStore = makeStore(network: .testnet, walletIdHex: "wallet-b") - let walletAConnection = sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .approved, updatedAt: Date(timeIntervalSince1970: 10)) + let walletAConnection = sampleConnection(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: .confirming, updatedAt: Date(timeIntervalSince1970: 10)) walletAStore.save([walletAConnection]) @@ -167,7 +181,7 @@ final class DashConnectStoreTests: XCTestCase { XCTAssertEqual(second.connectionsSnapshot.count, 1) XCTAssertEqual(second.connectionsSnapshot.first?.id, "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F") - XCTAssertEqual(second.connectionsSnapshot.first?.status, .approved) + XCTAssertEqual(second.connectionsSnapshot.first?.status, .active) } func testRemovePersistsAcrossFreshMockInstances() async throws { @@ -182,7 +196,7 @@ final class DashConnectStoreTests: XCTestCase { XCTAssertEqual(second.connectionsSnapshot, []) } - func testDisconnectPersistsApprovedStatusAcrossFreshMockInstances() async throws { + func testDisconnectRemovesTheRowAcrossFreshMockInstances() async throws { let store = makeStore(network: .testnet, walletIdHex: "wallet-a") let first = MockDashConnectDataSource( initial: [ @@ -195,12 +209,10 @@ final class DashConnectStoreTests: XCTestCase { store: store ) - try await first.disconnect(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", scope: nil) + try await first.disconnect(id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", scope: nil, includingUnrecorded: false) let second = MockDashConnectDataSource(store: store) - XCTAssertEqual(second.connectionsSnapshot.count, 1) - XCTAssertEqual(second.connectionsSnapshot.first?.id, "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F") - XCTAssertEqual(second.connectionsSnapshot.first?.status, .approved) + XCTAssertEqual(second.connectionsSnapshot, []) } func testMainnetAndTestnetKeysAreUnchanged() { @@ -215,7 +227,7 @@ final class DashConnectStoreTests: XCTestCase { let devnetB = makeStore(network: .devnet, walletIdHex: "wallet-a", devnetName: "paloma") let connection = sampleConnection( id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", - status: .approved, + status: .confirming, updatedAt: Date(timeIntervalSince1970: 10)) devnetA.save([connection]) @@ -264,7 +276,7 @@ final class DashConnectStoreTests: XCTestCase { let store = makeStore(network: .devnet, walletIdHex: "wallet-a", devnetName: nil) store.save([sampleConnection( id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", - status: .approved, + status: .confirming, updatedAt: Date(timeIntervalSince1970: 10))]) XCTAssertNil(store.storageKey) diff --git a/DashWalletTests/DashConnect/KeyExchangeCryptoTests.swift b/DashWalletTests/DashConnect/KeyExchangeCryptoTests.swift index 97669c6d4f..5fb6b6105e 100644 --- a/DashWalletTests/DashConnect/KeyExchangeCryptoTests.swift +++ b/DashWalletTests/DashConnect/KeyExchangeCryptoTests.swift @@ -2,70 +2,6 @@ import XCTest @testable import dashpay final class KeyExchangeCryptoTests: XCTestCase { - private let sharedX = Data(hex: "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f")! - private let loginKey = Data(hex: "202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f")! - private let identityId = Data(hex: "404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f")! - private let walletEphemeralPriv = Data(repeating: 0x01, count: 32) - private let appEphemeralPub = Data(hex: "031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f")! - private let fixedNonce = Data(hex: "101112131415161718191a1b")! - private let kotlinAppPrivateKey = Data(repeating: 0x01, count: 32) - private let kotlinWalletPrivateKey = Data(repeating: 0x02, count: 32) - private let kotlinIdentityId = Data(repeating: 0xab, count: 32) - private let kotlinContractId = Data(repeating: 0xcd, count: 32) - private let kotlinFixedNonce = Data((0 ..< 12).map(UInt8.init)) - private let kotlinLoginKey = Data((0 ..< 32).map { UInt8(($0 * 7 + 3) & 0xff) }) - - func testDeriveAesKeyMatchesVector() throws { - let derived = try KeyExchangeCrypto.deriveAesKey(sharedX: sharedX) - XCTAssertEqual(derived.hexEncodedString(), "0d14bc5a19d237e70d82bd357114307629c262c77fcde496d51dfeaa35d124c2") - } - - func testEncryptLoginKeyWithFixedNonceMatchesVector() throws { - let payload = try KeyExchangeCrypto.encryptLoginKey( - loginKey, - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub, - nonce: fixedNonce - ) - - XCTAssertEqual(payload.hexEncodedString(), "101112131415161718191a1b914189444d0fee69f81c2da90b6e1f451e003d9ef6196f231601d0dbd93c523969bcb8d144051b2b9badadb6e3a80fc8") - } - - func testEncryptDecryptLoginKeyRoundTrips() throws { - let payload = try KeyExchangeCrypto.encryptLoginKey( - loginKey, - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub - ) - let decrypted = try KeyExchangeCrypto.decryptLoginKey( - payload, - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub - ) - - XCTAssertEqual(decrypted, loginKey) - } - - func testPayloadHasExpectedLengthAndNoncePrefix() throws { - let payload = try KeyExchangeCrypto.encryptLoginKey( - loginKey, - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub, - nonce: fixedNonce - ) - - XCTAssertEqual(payload.count, 60) - XCTAssertEqual(payload.prefix(fixedNonce.count), fixedNonce) - } - - func testDerivedIdentityKeysMatchVectorsAndDifferByInfo() throws { - let auth = try KeyExchangeCrypto.deriveAuthPrivateKey(loginKey: loginKey, identityId: identityId) - let encryption = try KeyExchangeCrypto.deriveEncryptionPrivateKey(loginKey: loginKey, identityId: identityId) - - XCTAssertEqual(auth.hexEncodedString(), "8b37cb699757243ca057a2d691ab43f88479f7422729eee270327a327d0c2bdc") - XCTAssertEqual(encryption.hexEncodedString(), "3b658157640c41f675c6858794d4f184f55112c938715085470e056f2970cfa3") - XCTAssertNotEqual(auth, encryption) - } func testHash160MatchesKnownVector() throws { let input = Data(repeating: 0x00, count: 33) @@ -79,97 +15,6 @@ final class KeyExchangeCryptoTests: XCTestCase { XCTAssertEqual(hash.hexEncodedString(), "9bc4860bb936abf262d7a51f74b4304833fee3b2") } - func testKotlinAuthPrivateKeyVectorMatchesExpectedHex() throws { - let auth = try KeyExchangeCrypto.deriveAuthPrivateKey( - loginKey: kotlinLoginKey, - identityId: kotlinIdentityId - ) - - XCTAssertEqual(auth.hexEncodedString(), "e06ee7ae45f257741dab7379793c854829b67171af111238c664d9fd90603706") - } - - func testKotlinEncryptionPrivateKeyVectorMatchesExpectedHex() throws { - let encryption = try KeyExchangeCrypto.deriveEncryptionPrivateKey( - loginKey: kotlinLoginKey, - identityId: kotlinIdentityId - ) - - XCTAssertEqual(encryption.hexEncodedString(), "6879c11819d1a60026adae34c296e83d13d06559ad63da41d03c44b203a90f80") - } - - func testKotlinFixedNoncePayloadHasExpectedShapeAndRoundTrips() throws { - let appEphemeralPub = try Secp256k1.compressedPublicKey(privateKey: kotlinAppPrivateKey) - let payload = try KeyExchangeCrypto.encryptLoginKey( - kotlinLoginKey, - walletEphemeralPriv: kotlinWalletPrivateKey, - appEphemeralPub: appEphemeralPub, - nonce: kotlinFixedNonce - ) - let decrypted = try KeyExchangeCrypto.decryptLoginKey( - payload, - walletEphemeralPriv: kotlinWalletPrivateKey, - appEphemeralPub: appEphemeralPub - ) - - XCTAssertEqual(payload.count, 60) - XCTAssertEqual(payload.prefix(kotlinFixedNonce.count), kotlinFixedNonce) - XCTAssertEqual(decrypted, kotlinLoginKey) - XCTAssertEqual(kotlinContractId.count, 32) - } - - func testRejectsInvalidLoginKeyLength() { - XCTAssertThrowsError(try KeyExchangeCrypto.encryptLoginKey( - Data(repeating: 0x01, count: 31), - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub, - nonce: fixedNonce - )) - } - - func testRejectsInvalidNonceLength() { - XCTAssertThrowsError(try KeyExchangeCrypto.encryptLoginKey( - loginKey, - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub, - nonce: Data(repeating: 0x00, count: 11) - )) - } - - func testRejectsInvalidIdentityIdLength() { - XCTAssertThrowsError(try KeyExchangeCrypto.deriveAuthPrivateKey( - loginKey: loginKey, - identityId: Data(repeating: 0x00, count: 31) - )) - XCTAssertThrowsError(try KeyExchangeCrypto.deriveEncryptionPrivateKey( - loginKey: loginKey, - identityId: Data(repeating: 0x00, count: 31) - )) - } - - func testRejectsInvalidPayloadLength() { - XCTAssertThrowsError(try KeyExchangeCrypto.decryptLoginKey( - Data(repeating: 0x00, count: 59), - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub - )) - } - - func testTamperedTagFailsToDecrypt() throws { - var tampered = try KeyExchangeCrypto.encryptLoginKey( - loginKey, - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub, - nonce: fixedNonce - ) - tampered[tampered.index(before: tampered.endIndex)] ^= 0x01 - - XCTAssertThrowsError(try KeyExchangeCrypto.decryptLoginKey( - tampered, - walletEphemeralPriv: walletEphemeralPriv, - appEphemeralPub: appEphemeralPub - )) - } - // MARK: - App Connect v2 response /// Yappr's published vectors (`vendor/platform-auth/src/app-connect/vectors.json`). @@ -201,8 +46,6 @@ final class KeyExchangeCryptoTests: XCTestCase { privateKey: AppConnectVector.walletEphemeralPriv, publicKey: AppConnectVector.appEphemeralPub) XCTAssertEqual(try KeyExchangeCrypto.deriveAppConnectAesKey(sharedX: sharedX).hexEncodedString(), AppConnectVector.hkdfOutput) - // The legacy exchange derives another key from the same secret. - XCTAssertNotEqual(try KeyExchangeCrypto.deriveAesKey(sharedX: sharedX).hexEncodedString(), AppConnectVector.hkdfOutput) XCTAssertEqual( try KeyExchangeCrypto.appConnectAssociatedData( diff --git a/DashWalletTests/DashConnect/LoginKeyDerivationTests.swift b/DashWalletTests/DashConnect/LoginKeyDerivationTests.swift deleted file mode 100644 index a9b17a9623..0000000000 --- a/DashWalletTests/DashConnect/LoginKeyDerivationTests.swift +++ /dev/null @@ -1,82 +0,0 @@ -import XCTest -@testable import dashpay - -final class LoginKeyDerivationTests: XCTestCase { - private let chainKey = Data(hex: "606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f")! - private let identityId = Data(hex: "404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f")! - private let appContractId = Data(hex: "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f")! - - func testDefaultKeyIndexIsZero() { - XCTAssertEqual(LoginKeyDerivation.defaultKeyIndex, 0) - } - - func testDeriveLoginKeyMatchesVector() throws { - let loginKey = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - XCTAssertEqual(loginKey.hexEncodedString(), "0c6ee8098b3618e2cebe7a5fb4a5b3307eb84f410262489fedc386eca0cd882d") - } - - func testDeriveLoginKeyIsDeterministic() throws { - let first = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - let second = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - XCTAssertEqual(first, second) - } - - func testDeriveLoginKeyChangesWhenAnyInputChanges() throws { - let baseline = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - let differentChainKey = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: Data(hex: "616162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f")!, - identityId: identityId, - appContractId: appContractId - ) - let differentIdentity = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: Data(hex: "414142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f")!, - appContractId: appContractId - ) - let differentContract = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: Data(hex: "818182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f")! - ) - - XCTAssertNotEqual(baseline, differentChainKey) - XCTAssertNotEqual(baseline, differentIdentity) - XCTAssertNotEqual(baseline, differentContract) - } - - func testRejectsInvalidLengths() { - XCTAssertThrowsError(try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: Data(repeating: 0x00, count: 31), - identityId: identityId, - appContractId: appContractId - )) - XCTAssertThrowsError(try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: Data(repeating: 0x00, count: 31), - appContractId: appContractId - )) - XCTAssertThrowsError(try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: Data(repeating: 0x00, count: 31) - )) - } -} diff --git a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift index 46018c1f4d..a824bc5f4b 100644 --- a/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift +++ b/DashWalletTests/DashConnect/PlatformDashConnectDataSourceTests.swift @@ -97,12 +97,12 @@ final class PlatformDashConnectDataSourceTests: XCTestCase { XCTAssertEqual(request.appContractId, existing.id) } - func testMakeConnectionRequestCarriesApprovedConnection() async { + func testMakeConnectionRequestCarriesAConfirmingConnection() async { let existing = DAppConnection( id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", name: "Yappr", url: "yap.pr", - status: .approved, + status: .confirming, updatedAt: Date(timeIntervalSince1970: 1_773_132_300) ) let dataSource = PlatformDashConnectDataSource( @@ -121,6 +121,20 @@ final class PlatformDashConnectDataSourceTests: XCTestCase { XCTAssertEqual(found, existing) } + func testAVersion1LoginQRIsRefusedWhenScanned() async { + let dataSource = PlatformDashConnectDataSource( + supportedNetwork: .testnet, + store: TestDashConnectStore(initialConnections: []), + activeWalletIdHex: { "wallet" } + ) + do { + _ = try await dataSource.parseQR(MockDashConnectDataSource.sampleLoginQRCode) + XCTFail("a v1 login QR was taken") + } catch { + XCTAssertEqual(error as? AppConnect.Refusal, AppConnect.v1Refusal) + } + } + func testMakeConnectionRequestReturnsNilForUnknownContract() async throws { let existing = DAppConnection( id: "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", @@ -194,76 +208,17 @@ final class PlatformDashConnectDataSourceTests: XCTestCase { } } - func testRealKeyRegistrationFixtureParsesWithNilContractBounds() throws { + func testParserRefusesAnIdentityUpdate() throws { let wallet = ManagedPlatformWallet(handle: 0, walletId: Data(repeating: 0x00, count: 32)) - let bytes = try XCTUnwrap(Data(hex: Self.realKeyRegistrationFixtureHex)) - let expectedIdentityId = try XCTUnwrap( - Data(hex: "89fd6ddba75136a4fea02dc7d89ef0ca5bcc32ccf12fb8da6a1a03740567ae72") - ) - let expectedAuthHash160 = try XCTUnwrap( - Data(hex: "5e24e38a86e720f61757647996957e322686abb7") - ) - let expectedEncryptionPublicKey = try XCTUnwrap( - Data(hex: "035e8cfb0785b54e8902a3dc17bdaad8a5738c6019a18ebc527f79d1c64a27826a") - ) - - let parsed = try wallet.parseIdentityUpdateTransition(bytes) - - XCTAssertEqual(parsed.identityId, expectedIdentityId) - XCTAssertEqual(parsed.disablePublicKeyIds, []) - XCTAssertEqual(parsed.addPublicKeys.count, 2) - - let authKey = parsed.addPublicKeys[0] - XCTAssertEqual(authKey.keyId, 6) - XCTAssertEqual(authKey.purpose, .authentication) - XCTAssertEqual(authKey.securityLevel, .high) - XCTAssertEqual(authKey.keyType, .ecdsaHash160) - XCTAssertNil(authKey.contractBounds) - XCTAssertEqual(authKey.pubkeyBytes, expectedAuthHash160) - - let encryptionKey = parsed.addPublicKeys[1] - XCTAssertEqual(encryptionKey.keyId, 7) - XCTAssertEqual(encryptionKey.purpose, .encryption) - XCTAssertEqual(encryptionKey.securityLevel, .medium) - XCTAssertEqual(encryptionKey.keyType, .ecdsaSecp256k1) - XCTAssertNil(encryptionKey.contractBounds) - XCTAssertEqual(encryptionKey.pubkeyBytes, expectedEncryptionPublicKey) - } - - func testPlatformWalletParserRoundTripsTaggedAndTaglessIdentityUpdateTransition() throws { - let wallet = ManagedPlatformWallet(handle: 0, walletId: Data(repeating: 0x00, count: 32)) - let taggedBytes = try XCTUnwrap(Data(base64Encoded: Self.taggedIdentityUpdateFixtureBase64)) - let taglessBytes = try XCTUnwrap(Data(base64Encoded: Self.taglessIdentityUpdateFixtureBase64)) - - let tagged = try wallet.parseIdentityUpdateTransition(taggedBytes) - let tagless = try wallet.parseIdentityUpdateTransition(taglessBytes) - - XCTAssertEqual(tagged.identityId, Data(repeating: 0x11, count: 32)) - XCTAssertEqual(tagged.addPublicKeys.map(\.keyId), [17, 18]) - XCTAssertEqual(tagged.disablePublicKeyIds, [4, 8]) - XCTAssertEqual(tagged.addPublicKeys[0].purpose, .authentication) - XCTAssertEqual(tagged.addPublicKeys[1].purpose, .encryption) - XCTAssertEqual( - tagged.addPublicKeys[1].contractBounds, - .singleContractDocumentType( - id: Data(repeating: 0x44, count: 32), - documentTypeName: "profile" - ) - ) - - XCTAssertEqual(tagless.identityId, tagged.identityId) - XCTAssertEqual(tagless.addPublicKeys.map(\.keyId), tagged.addPublicKeys.map(\.keyId)) - XCTAssertEqual(tagless.disablePublicKeyIds, tagged.disablePublicKeyIds) - + let bytes = try XCTUnwrap(Data(base64Encoded: Self.taggedIdentityUpdateFixtureBase64)) let appParser = PlatformWalletDashConnectStateTransitionParser { bytes in Self.parsed(.identityUpdate(try wallet.parseIdentityUpdateTransition(bytes))) } - guard case let .keyRegistration(appTransition) = try appParser.parse(taglessBytes) else { - return XCTFail("Expected a key-registration transition") + XCTAssertThrowsError(try appParser.parse(bytes)) { error in + guard case DashConnectPlatformError.unsupportedStateTransition = error else { + return XCTFail("Expected an unsupported state transition, got \(error)") + } } - XCTAssertEqual(appTransition.identityId, tagged.identityId) - XCTAssertEqual(appTransition.addPublicKeys.map(\.keyId), [17, 18]) - XCTAssertEqual(appTransition.disablePublicKeyIds, [4, 8]) } func testParserMapsATokenPurchaseTransition() throws { @@ -287,43 +242,6 @@ final class PlatformDashConnectDataSourceTests: XCTestCase { XCTAssertEqual(purchase.totalAgreedPrice, 100_000_000) } - func testParserRejectsContractGroupKeysInsteadOfDroppingTheirRestriction() throws { - let parser = PlatformWalletDashConnectStateTransitionParser { _ in - Self.parsed(.identityUpdate(.init( - identityId: Data(repeating: 0x21, count: 32), - addPublicKeys: [.init( - keyId: 1, keyType: .ecdsaSecp256k1, purpose: .authentication, - securityLevel: .high, pubkeyBytes: Data(repeating: 0x22, count: 33), - contractBounds: .contractGroup(id: Data(repeating: 0x23, count: 32)))], - disablePublicKeyIds: []))) - } - XCTAssertThrowsError(try parser.parse(Data([0]))) { - XCTAssertEqual($0 as? DashConnectPlatformError, .keyRegistrationUnexpectedMutation) - } - } - - func testParserKeepsTheLimitsAScannedKeyRegistrationCarries() throws { - let parser = PlatformWalletDashConnectStateTransitionParser { _ in - Self.parsed(.identityUpdate(.init( - identityId: Data(repeating: 0x21, count: 32), - addPublicKeys: [ - .init( - keyId: 1, keyType: .ecdsaHash160, purpose: .authentication, - securityLevel: .high, pubkeyBytes: Data(repeating: 0x22, count: 20), - totalBudget: 7, expiresAt: 9), - .init( - keyId: 2, keyType: .ecdsaSecp256k1, purpose: .encryption, - securityLevel: .medium, pubkeyBytes: Data(repeating: 0x23, count: 33)), - ], - disablePublicKeyIds: []))) - } - guard case let .keyRegistration(transition) = try parser.parse(Data([0])) else { - return XCTFail("Expected a key-registration transition") - } - XCTAssertEqual(transition.addPublicKeys.map(\.totalBudget), [7, nil]) - XCTAssertEqual(transition.addPublicKeys.map(\.expiresAt), [9, nil]) - } - func testParserRefusesABatchThatIsNotALoneCompleteTokenPurchase() { let ownerId = Data(repeating: 0x21, count: 32) let contractId = Data(repeating: 0x22, count: 32) @@ -512,735 +430,6 @@ final class PlatformDashConnectDataSourceTests: XCTestCase { XCTAssertEqual(request.tokenQuantity(locale: Self.enUS).text, "0.000000000000000001") } - func testBuildLoginKeyResponseDraftProducesExactFieldsAndWipesEphemeralPrivateKey() throws { - let loginKey = Data(repeating: 0x11, count: 32) - let appContractId = Data(repeating: 0xcd, count: 32) - let appEphemeralPubKey = try Secp256k1.compressedPublicKey(privateKey: Data(repeating: 0x01, count: 32)) - var walletEphemeralPrivateKey = Data(repeating: 0x02, count: 32) - let fixedPayload = Data(repeating: 0xaa, count: 60) - - let draft = try PlatformDashConnectDataSource.buildLoginKeyResponseDraft( - loginKey: loginKey, - appContractId: appContractId, - appEphemeralPubKey: appEphemeralPubKey, - walletEphemeralPrivateKey: &walletEphemeralPrivateKey, - encryptLoginKey: { loginKeyArg, walletPrivArg, appPubArg in - XCTAssertEqual(loginKeyArg, loginKey) - XCTAssertEqual(walletPrivArg, Data(repeating: 0x02, count: 32)) - XCTAssertEqual(appPubArg, appEphemeralPubKey) - return fixedPayload - } - ) - - XCTAssertEqual( - draft.properties["contractId"]?.base as? String, - appContractId.toBase58String() - ) - XCTAssertEqual( - draft.properties["appEphemeralPubKeyHash"]?.base as? String, - try KeyExchangeCrypto.hash160(appEphemeralPubKey).toHexString() - ) - XCTAssertEqual( - draft.properties["walletEphemeralPubKey"]?.base as? String, - try Secp256k1.compressedPublicKey(privateKey: Data(repeating: 0x02, count: 32)).toHexString() - ) - XCTAssertEqual( - draft.properties["encryptedPayload"]?.base as? String, - fixedPayload.toHexString() - ) - XCTAssertEqual(draft.properties["keyIndex"]?.base as? Int, LoginKeyDerivation.defaultKeyIndex) - XCTAssertEqual(draft.encryptedPayload.count, 60) - XCTAssertEqual(walletEphemeralPrivateKey, Data(repeating: 0x00, count: 32)) - } - - func testValidateKeyRegistrationRejectsTransitionForDifferentIdentity() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - let transition = try makeValidTransition( - identityId: Data(repeating: 0x55, count: 32), - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - - XCTAssertThrowsError( - try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - ) { error in - guard let error = error as? DashConnectPlatformError, - case .keyRegistrationWrongIdentity = error else { - return XCTFail("Expected wrong identity error, got \(error)") - } - } - } - - func testValidateKeyRegistrationRejectsAttackerAddedKey() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - var transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - - let attackerPublicKey = try Secp256k1.compressedPublicKey(privateKey: Data(repeating: 0x66, count: 32)) - transition = DashConnectKeyRegistrationTransition( - identityId: transition.identityId, - addPublicKeys: [ - DashConnectKeyRegistrationKey( - keyId: transition.addPublicKeys[0].keyId, - keyType: transition.addPublicKeys[0].keyType, - purpose: transition.addPublicKeys[0].purpose, - securityLevel: transition.addPublicKeys[0].securityLevel, - publicKeyData: try KeyExchangeCrypto.hash160(attackerPublicKey), - contractBounds: transition.addPublicKeys[0].contractBounds - ), - transition.addPublicKeys[1], - ], - disablePublicKeyIds: [] - ) - - XCTAssertThrowsError( - try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - ) { error in - guard let error = error as? DashConnectPlatformError, - case .keyRegistrationMismatchedDerivedKey(.authentication) = error else { - return XCTFail("Expected mismatched authentication key error, got \(error)") - } - } - } - - func testValidateKeyRegistrationAcceptsNilContractBoundsWhenDerivedKeysMatch() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - let transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - - let validated = try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - XCTAssertEqual(validated.authenticationKey, transition.addPublicKeys[0]) - XCTAssertEqual(validated.encryptionKey, transition.addPublicKeys[1]) - } - - func testValidateKeyRegistrationRejectsDerivedKeysForDifferentContract() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let transitionContractId = Data(repeating: 0x44, count: 32) - let actualContractId = Data(repeating: 0x55, count: 32) - let transition = try makeValidTransition( - identityId: identityId, - appContractId: transitionContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - - XCTAssertThrowsError( - try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: actualContractId - ) - ) { error in - guard let error = error as? DashConnectPlatformError, - case .keyRegistrationMismatchedDerivedKey = error else { - return XCTFail("Expected mismatched derived key error, got \(error)") - } - } - } - - func testValidateKeyRegistrationRejectsAuthenticationKeyUsingRawSecp256k1Encoding() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - var transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - - let loginKey = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - let authPrivateKey = try KeyExchangeCrypto.deriveAuthPrivateKey(loginKey: loginKey, identityId: identityId) - let authPublicKey = try Secp256k1.compressedPublicKey(privateKey: authPrivateKey) - transition = DashConnectKeyRegistrationTransition( - identityId: transition.identityId, - addPublicKeys: [ - DashConnectKeyRegistrationKey( - keyId: transition.addPublicKeys[0].keyId, - keyType: .ecdsaSecp256k1, - purpose: .authentication, - securityLevel: .high, - publicKeyData: authPublicKey, - contractBounds: nil - ), - transition.addPublicKeys[1], - ], - disablePublicKeyIds: [] - ) - - XCTAssertThrowsError( - try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - ) { error in - guard let error = error as? DashConnectPlatformError, - case .keyRegistrationMismatchedDerivedKey(.authentication) = error else { - return XCTFail("Expected authentication mismatch error, got \(error)") - } - } - } - - func testValidateKeyRegistrationRejectsAuthenticationKeyUsingRawPublicKeyData() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - var transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - - let loginKey = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - let authPrivateKey = try KeyExchangeCrypto.deriveAuthPrivateKey(loginKey: loginKey, identityId: identityId) - let authPublicKey = try Secp256k1.compressedPublicKey(privateKey: authPrivateKey) - transition = DashConnectKeyRegistrationTransition( - identityId: transition.identityId, - addPublicKeys: [ - DashConnectKeyRegistrationKey( - keyId: transition.addPublicKeys[0].keyId, - keyType: .ecdsaHash160, - purpose: .authentication, - securityLevel: .high, - publicKeyData: authPublicKey, - contractBounds: nil - ), - transition.addPublicKeys[1], - ], - disablePublicKeyIds: [] - ) - - XCTAssertThrowsError( - try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - ) { error in - guard let error = error as? DashConnectPlatformError, - case .keyRegistrationMismatchedDerivedKey(.authentication) = error else { - return XCTFail("Expected authentication mismatch error, got \(error)") - } - } - } - - func testPendingApprovedConnectionThrowsWhenNothingAwaitsKeyRegistration() { - XCTAssertThrowsError( - try PlatformDashConnectDataSource.pendingApprovedConnectionForKeyRegistration( - in: [ - DAppConnection( - id: "A", - name: "Active App", - url: "active.app", - status: .active, - updatedAt: Date(timeIntervalSince1970: 10) - ), - DAppConnection( - id: "B", - name: "Another Active App", - url: "active-two.app", - status: .active, - updatedAt: Date(timeIntervalSince1970: 20) - ), - ], - boundContractId: nil - ) - ) { error in - XCTAssertEqual(error as? DashConnectPlatformError, .noApprovedConnectionAwaitingKeyRegistration) - } - } - - func testPendingApprovedConnectionErrorTellsUserToScanLoginQrFirst() { - XCTAssertThrowsError( - try PlatformDashConnectDataSource.pendingApprovedConnectionForKeyRegistration(in: [], boundContractId: nil) - ) { error in - XCTAssertEqual( - error.localizedDescription, - "There is no login awaiting key registration — scan the app's login QR first." - ) - } - } - - private static let appAId = "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F" - private static let appBId = "7W6u4NgW63FPUuW8EnTbYzD4KybNQD5n7CUDWydJY234" - - private func approvedPair() -> (appA: DAppConnection, appB: DAppConnection, active: DAppConnection) { - ( - DAppConnection( - id: Self.appAId, - name: "App A", - url: "a.app", - status: .approved, - updatedAt: Date(timeIntervalSince1970: 10) - ), - DAppConnection( - id: Self.appBId, - name: "App B", - url: "b.app", - status: .approved, - // Approved after A, so recency alone would always pick B. - updatedAt: Date(timeIntervalSince1970: 30) - ), - DAppConnection( - id: "active", - name: "Active", - url: "active.app", - status: .active, - updatedAt: Date(timeIntervalSince1970: 40) - ) - ) - } - - /// Scanning app A's transition while app B is the newer approval used to - /// derive B's keys and reject A. The contract bounds name A, so A wins. - func testPendingApprovedConnectionFollowsContractBoundsNotRecency() throws { - let (appA, appB, active) = approvedPair() - let boundToA = try XCTUnwrap(Data.identifier(fromBase58: Self.appAId)) - - let selected = try PlatformDashConnectDataSource.pendingApprovedConnectionForKeyRegistration( - in: [appA, active, appB], - boundContractId: boundToA - ) - - XCTAssertEqual(selected, appA) - } - - func testPendingApprovedConnectionRejectsBoundsMatchingNoApprovedConnection() throws { - let (appA, appB, _) = approvedPair() - let unrelated = Data(repeating: 0x77, count: 32) - - XCTAssertThrowsError( - try PlatformDashConnectDataSource.pendingApprovedConnectionForKeyRegistration( - in: [appA, appB], - boundContractId: unrelated - ) - ) { error in - XCTAssertEqual(error as? DashConnectPlatformError, .noApprovedConnectionAwaitingKeyRegistration) - } - } - - /// An unbounded transition identifies no app, so with two approvals there is - /// nothing to choose on — guessing is what produced the wrong-key failure. - func testPendingApprovedConnectionRejectsAmbiguousUnboundedTransition() throws { - let (appA, appB, active) = approvedPair() - - XCTAssertThrowsError( - try PlatformDashConnectDataSource.pendingApprovedConnectionForKeyRegistration( - in: [appA, active, appB], - boundContractId: nil - ) - ) { error in - XCTAssertEqual(error as? DashConnectPlatformError, .ambiguousKeyRegistrationConnection) - } - } - - func testPendingApprovedConnectionTakesTheOnlyApprovalWhenUnbounded() throws { - let (appA, _, active) = approvedPair() - - let selected = try PlatformDashConnectDataSource.pendingApprovedConnectionForKeyRegistration( - in: [appA, active], - boundContractId: nil - ) - - XCTAssertEqual(selected, appA) - } - - func testMissingKeyRegistrationKeysReturnsEmptyWhenBothKeysAlreadyRegistered() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - let transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - let validated = try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - let currentKeys = [ - makeIdentityPublicKeyInfo( - keyId: 100, - purpose: .authentication, - securityLevel: .high, - keyType: .ecdsaHash160, - data: validated.authenticationKey.publicKeyData - ), - makeIdentityPublicKeyInfo( - keyId: 101, - purpose: .encryption, - securityLevel: .medium, - keyType: .ecdsaSecp256k1, - data: validated.encryptionKey.publicKeyData - ), - ] - - XCTAssertEqual( - PlatformDashConnectDataSource.missingKeyRegistrationKeys( - validated, - currentIdentityPublicKeys: currentKeys - ), - [] - ) - } - - func testHasRegisteredLoginKeysReturnsTrueWhenBothKeysAreRegistered() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - let transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - let validated = try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - let currentKeys = [ - makeIdentityPublicKeyInfo( - keyId: 100, - purpose: .authentication, - securityLevel: .high, - keyType: .ecdsaHash160, - data: validated.authenticationKey.publicKeyData - ), - makeIdentityPublicKeyInfo( - keyId: 101, - purpose: .encryption, - securityLevel: .medium, - keyType: .ecdsaSecp256k1, - data: validated.encryptionKey.publicKeyData - ), - ] - - XCTAssertTrue( - PlatformDashConnectDataSource.hasRegisteredLoginKeys( - authenticationPublicKeyHash160: validated.authenticationKey.publicKeyData, - encryptionPublicKey: validated.encryptionKey.publicKeyData, - currentIdentityPublicKeys: currentKeys - ) - ) - } - - /// Turning off a one-QR connection that replaced a two-QR one disables - /// what is left of the two-QR login's keys as well. - func testADisconnectFindsTheLiveTwoQrLoginKeysByTheirDerivedPayload() { - let authentication = Data(repeating: 0x51, count: 20) - let encryption = Data(repeating: 0x52, count: 33) - func live(_ keys: [ManagedIdentity.IdentityPublicKeyInfo]) -> [UInt32] { - PlatformDashConnectDataSource.liveLoginKeyIds( - authenticationPublicKeyHash160: authentication, - encryptionPublicKey: encryption, - currentIdentityPublicKeys: keys) - } - let authenticationKey = makeIdentityPublicKeyInfo( - keyId: 100, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, data: authentication) - let encryptionKey = makeIdentityPublicKeyInfo( - keyId: 101, purpose: .encryption, securityLevel: .medium, keyType: .ecdsaSecp256k1, data: encryption) - let disabledAuthenticationKey = makeIdentityPublicKeyInfo( - keyId: 100, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, - data: authentication, disabledAt: 1) - // A one-QR session key: same kind as the two-QR authentication key, - // another payload. - let sessionKey = makeIdentityPublicKeyInfo( - keyId: 102, purpose: .authentication, securityLevel: .high, keyType: .ecdsaHash160, - data: Data(repeating: 0x53, count: 20)) - - XCTAssertEqual(live([encryptionKey, sessionKey, authenticationKey]), [100, 101]) - XCTAssertEqual(live([disabledAuthenticationKey, encryptionKey]), [101]) - XCTAssertEqual(live([disabledAuthenticationKey, sessionKey]), []) - XCTAssertEqual(live([]), []) - } - - func testMissingKeyRegistrationKeysReturnsOnlyMissingEncryptionKey() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - let transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - let validated = try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - let currentKeys = [ - makeIdentityPublicKeyInfo( - keyId: 100, - purpose: .authentication, - securityLevel: .high, - keyType: .ecdsaHash160, - data: validated.authenticationKey.publicKeyData - ) - ] - - XCTAssertEqual( - PlatformDashConnectDataSource.missingKeyRegistrationKeys( - validated, - currentIdentityPublicKeys: currentKeys - ), - [validated.encryptionKey] - ) - } - - func testHasRegisteredLoginKeysReturnsFalseWhenAuthenticationKeyIsMissing() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - let transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - let validated = try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - let currentKeys = [ - makeIdentityPublicKeyInfo( - keyId: 101, - purpose: .encryption, - securityLevel: .medium, - keyType: .ecdsaSecp256k1, - data: validated.encryptionKey.publicKeyData - ), - ] - - XCTAssertFalse( - PlatformDashConnectDataSource.hasRegisteredLoginKeys( - authenticationPublicKeyHash160: validated.authenticationKey.publicKeyData, - encryptionPublicKey: validated.encryptionKey.publicKeyData, - currentIdentityPublicKeys: currentKeys - ) - ) - } - - func testMissingKeyRegistrationKeysTreatsDisabledMatchingKeyAsMissing() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - let transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - let validated = try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - let currentKeys = [ - makeIdentityPublicKeyInfo( - keyId: 100, - purpose: .authentication, - securityLevel: .high, - keyType: .ecdsaHash160, - data: validated.authenticationKey.publicKeyData, - disabledAt: 123 - ), - makeIdentityPublicKeyInfo( - keyId: 101, - purpose: .encryption, - securityLevel: .medium, - keyType: .ecdsaSecp256k1, - data: validated.encryptionKey.publicKeyData - ), - ] - - XCTAssertEqual( - PlatformDashConnectDataSource.missingKeyRegistrationKeys( - validated, - currentIdentityPublicKeys: currentKeys - ), - [validated.authenticationKey] - ) - } - - func testHasRegisteredLoginKeysReturnsFalseWhenEncryptionKeyIsMissing() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - let transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - let validated = try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - let currentKeys = [ - makeIdentityPublicKeyInfo( - keyId: 100, - purpose: .authentication, - securityLevel: .high, - keyType: .ecdsaHash160, - data: validated.authenticationKey.publicKeyData - ), - ] - - XCTAssertFalse( - PlatformDashConnectDataSource.hasRegisteredLoginKeys( - authenticationPublicKeyHash160: validated.authenticationKey.publicKeyData, - encryptionPublicKey: validated.encryptionKey.publicKeyData, - currentIdentityPublicKeys: currentKeys - ) - ) - } - - func testHasRegisteredLoginKeysReturnsFalseWhenMatchingKeyIsDisabled() throws { - let chainKey = Data(repeating: 0x22, count: 32) - let identityId = Data(repeating: 0x33, count: 32) - let appContractId = Data(repeating: 0x44, count: 32) - let transition = try makeValidTransition( - identityId: identityId, - appContractId: appContractId, - chainKey: chainKey, - walletIdentityId: identityId - ) - let validated = try PlatformDashConnectDataSource.validateKeyRegistration( - transition, - chainKeyPrivateBytes: chainKey, - identityId: identityId, - appContractId: appContractId - ) - - let currentKeys = [ - makeIdentityPublicKeyInfo( - keyId: 100, - purpose: .authentication, - securityLevel: .high, - keyType: .ecdsaHash160, - data: validated.authenticationKey.publicKeyData, - disabledAt: 123 - ), - makeIdentityPublicKeyInfo( - keyId: 101, - purpose: .encryption, - securityLevel: .medium, - keyType: .ecdsaSecp256k1, - data: validated.encryptionKey.publicKeyData - ), - ] - - XCTAssertFalse( - PlatformDashConnectDataSource.hasRegisteredLoginKeys( - authenticationPublicKeyHash160: validated.authenticationKey.publicKeyData, - encryptionPublicKey: validated.encryptionKey.publicKeyData, - currentIdentityPublicKeys: currentKeys - ) - ) - } - - private func makeValidTransition( - identityId: Data, - appContractId: Data, - chainKey: Data, - walletIdentityId: Data - ) throws -> DashConnectKeyRegistrationTransition { - let loginKey = try LoginKeyDerivation.deriveLoginKey( - chainKeyPrivateBytes: chainKey, - identityId: walletIdentityId, - appContractId: appContractId - ) - let authPrivateKey = try KeyExchangeCrypto.deriveAuthPrivateKey(loginKey: loginKey, identityId: walletIdentityId) - let encryptionPrivateKey = try KeyExchangeCrypto.deriveEncryptionPrivateKey(loginKey: loginKey, identityId: walletIdentityId) - let authPublicKey = try Secp256k1.compressedPublicKey(privateKey: authPrivateKey) - - return DashConnectKeyRegistrationTransition( - identityId: identityId, - addPublicKeys: [ - DashConnectKeyRegistrationKey( - keyId: 6, - keyType: .ecdsaHash160, - purpose: .authentication, - securityLevel: .high, - publicKeyData: try KeyExchangeCrypto.hash160(authPublicKey), - contractBounds: nil - ), - DashConnectKeyRegistrationKey( - keyId: 7, - keyType: .ecdsaSecp256k1, - purpose: .encryption, - securityLevel: .medium, - publicKeyData: try Secp256k1.compressedPublicKey(privateKey: encryptionPrivateKey), - contractBounds: nil - ), - ], - disablePublicKeyIds: [] - ) - } - private func makeLoginRequest(contractId: Data, label: String) throws -> DashKeyRequest { DashKeyRequest( appEphemeralPubKey: try Secp256k1.compressedPublicKey(privateKey: Data(repeating: 0x01, count: 32)), @@ -1266,37 +455,16 @@ final class PlatformDashConnectDataSourceTests: XCTestCase { ) } - private func makeIdentityPublicKeyInfo( - keyId: UInt32, - purpose: KeyPurpose, - securityLevel: SecurityLevel, - keyType: KeyType, - data: Data, - disabledAt: UInt64? = nil - ) -> ManagedIdentity.IdentityPublicKeyInfo { - ManagedIdentity.IdentityPublicKeyInfo( - keyId: Int32(bitPattern: keyId), - purpose: purpose, - securityLevel: securityLevel, - keyType: keyType, - readOnly: false, - disabledAt: disabledAt.map { Int64(bitPattern: $0) }, - data: data, - // Protocol 14 key limits (platform#4798). These fixtures describe - // the keys the QR login flow derives, which carry neither. - totalBudget: nil, - expiresAt: nil - ) - } - private static let taggedIdentityUpdateFixtureBase64 = "BgAREREREREREREREREREREREREREREREREREREREREREQcJAgARAAACAAAhAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqABIAAQIBAUREREREREREREREREREREREREREREREREREREREREREB3Byb2ZpbGUBIQMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA0G7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7uwIECAIDQZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ" - private static let taglessIdentityUpdateFixtureBase64 = - "ABERERERERERERERERERERERERERERERERERERERERERBwkCABEAAAIAACECAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJBqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqoAEgABAgEBREREREREREREREREREREREREREREREREREREREREREQHcHJvZmlsZQEhAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDQbu7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7u7AgQIAgNBmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZk=" - private static let realKeyRegistrationFixtureHex = - "0089fd6ddba75136a4fea02dc7d89ef0ca5bcc32ccf12fb8da6a1a03740567ae7201010200060200020000145e24e38a86e720f61757647996957e322686abb7000007000103000021035e8cfb0785b54e8902a3dc17bdaad8a5738c6019a18ebc527f79d1c64a27826a4120dc911df1d1e6cccf8c95ec0d423c928433397933de6dd9ad006bc40dc0334d6d270d50c6d5e2dcdc5560e40487ddfe28bd1066d0729fad4b26f92ae33f12a04b00000000" +} + +private extension AppConnect.GrantPlan { + static let sample = AppConnect.GrantPlan( + appId: Data(repeating: 0xA1, count: 32), appEphemeralPubKeyHash: Data(repeating: 0xEE, count: 20), + auth: [], encryption: [], connectionId: nil, identityHint: nil, createdAt: 0, callbackHost: nil) } private final class TestDashConnectStore: DashConnectStore { @@ -1420,30 +588,24 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { XCTAssertNil(viewModel.message) } - /// A disconnect that also turned off DashPay profile keys no - /// connection accounted for says how many; one that could not tell them - /// apart says so; one that turned off none says nothing. - func testADisconnectSaysWhatItDidWithTheProfileKeys() async { + /// A disconnect that left keys no approval names offers to turn them + /// off as well; one that left none says nothing. + func testADisconnectThatLeftUnrecordedKeysOffersToTurnThemOff() async { let spy = PurchaseApprovalSpy() let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false) - spy.disconnectResult = DashConnectDisconnectResult(profileKeysTurnedOff: 2) + spy.disconnectResult = DashConnectDisconnectResult(unrecordedKeysLeft: 2) viewModel.disconnect(Self.connection) await waitUntil { !viewModel.isDisconnecting && spy.disconnectedIds.count == 1 } - XCTAssertEqual(viewModel.message?.kind, .success) XCTAssertEqual(viewModel.message?.text.contains("2"), true) + XCTAssertEqual(viewModel.message?.unrecordedKeysOf, Self.connection) + XCTAssertEqual(spy.disconnectedIncludingUnrecorded, [false]) - spy.disconnectResult = DashConnectDisconnectResult(profileKeysUnchecked: true) viewModel.message = nil - viewModel.disconnect(Self.connection) - await waitUntil { !viewModel.isDisconnecting && spy.disconnectedIds.count == 2 } - XCTAssertEqual(viewModel.message?.kind, .success) - XCTAssertEqual(viewModel.message?.text.contains("could not be checked"), true) - spy.disconnectResult = DashConnectDisconnectResult() - viewModel.message = nil - viewModel.disconnect(Self.connection) - await waitUntil { !viewModel.isDisconnecting && spy.disconnectedIds.count == 3 } + viewModel.disconnect(Self.connection, includingUnrecorded: true) + await waitUntil { !viewModel.isDisconnecting && spy.disconnectedIds.count == 2 } + XCTAssertEqual(spy.disconnectedIncludingUnrecorded, [false, true]) XCTAssertNil(viewModel.message) } @@ -1451,7 +613,7 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { /// nothing. func testAnUnresolvedLoginIsAskedForAgainInsteadOfApproved() async { let unresolved = ConnectionRequest(loginRequest: MockDashConnectDataSource.sampleLoginRequest) - let resolved = Self.consent(identityId: "identity-a", terms: .current) + let resolved = Self.consent(identityId: "identity-a") let spy = LoginApprovalSpy(shown: [unresolved, resolved]) let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false) @@ -1469,7 +631,7 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { } func testApprovingALoginPassesTheRequestAsTheSheetShowedIt() async { - let shown = Self.consent(identityId: "identity-a", terms: .current) + let shown = Self.consent(identityId: "identity-a") let spy = LoginApprovalSpy(shown: [shown]) let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false) @@ -1488,7 +650,7 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { var request = MockDashConnectDataSource.sampleLoginRequest request.appConnect = try DashConnectUri.parseAppConnectRequest( "dash-key:2fAANHHASdojyjV9Sqa2wf2nwZE8kLLqmeHpZWa8sBfaGsddVqyMG2ZVte7xJkTKsXvmFYbXzXbNnMo7bJQBxNcf79N8YWi7pLKyb39Rqv6b1KUmxw9UeJGYz2CV9hFGNUQtcyMYVq2Fg6vAxtxpYays61H8gLMcWqaG8TfgGA3H7setGAYiBsM5YmdZgeuCdGAHSwfNfav5cfFjXNDkPWv37UNSgFxj6o58jfXc3kCLKqLJtc5ZPjm1thEGYxK8HVYBi8fRQeEVy76n27DXGrVTyHz94CfJRuMnH76xGYbMgeuvurxjJMLrQgWUu53cjocYyzzNWdJrgs2D5?n=d&v=2&cb=https%3A%2F%2Fyap.pr%2Fconnect%3Fr%3Dd77dc0da9df83a47755a15c42c5d9db9d7a7fd62") - let spy = LoginApprovalSpy(shown: [Self.consent(identityId: "identity-a", terms: .current)], loginRequest: request) + let spy = LoginApprovalSpy(shown: [Self.consent(identityId: "identity-a")], loginRequest: request) let opened = OpenedURLs() let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false, openURL: { opened.urls.append($0) }) @@ -1525,7 +687,7 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { var request = MockDashConnectDataSource.sampleLoginRequest request.appConnect = try DashConnectUri.parseAppConnectRequest( "dash-key:2fAANHHASdojyjV9Sqa2wf2nwZE8kLLqmeHpZWa8sBfaGsddVqyMG2ZVte7xJkTKsXvmFYbXzXbNnMo7bJQBxNcf79N8YWi7pLKyb39Rqv6b1KUmxw9UeJGYz2CV9hFGNUQtcyMYVq2Fg6vAxtxpYays61H8gLMcWqaG8TfgGA3H7setGAYiBsM5YmdZgeuCdGAHSwfNfav5cfFjXNDkPWv37UNSgFxj6o58jfXc3kCLKqLJtc5ZPjm1thEGYxK8HVYBi8fRQeEVy76n27DXGrVTyHz94CfJRuMnH76xGYbMgeuvurxjJMLrQgWUu53cjocYyzzNWdJrgs2D5?n=d&v=2&cb=https%3A%2F%2Fyap.pr%2Fconnect%3Fr%3Dd77dc0da9df83a47755a15c42c5d9db9d7a7fd62") - let spy = LoginApprovalSpy(shown: [Self.consent(identityId: "identity-a", terms: .current)], loginRequest: request) + let spy = LoginApprovalSpy(shown: [Self.consent(identityId: "identity-a")], loginRequest: request) spy.approveFailures = [DashConnectPlatformError.noIdentity, DashConnectPlatformError.authorizationCancelled] let opened = OpenedURLs() let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false, openURL: { opened.urls.append($0) }) @@ -1548,7 +710,7 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { var request = MockDashConnectDataSource.sampleLoginRequest request.appConnect = try DashConnectUri.parseAppConnectRequest( "dash-key:2fAANHHASdojyjV9Sqa2wf2nwZE8kLLqmeHpZWa8sBfaGsddVqyMG2ZVte7xJkTKsXvmFYbXzXbNnMo7bJQBxNcf79N8YWi7pLKyb39Rqv6b1KUmxw9UeJGYz2CV9hFGNUQtcyMYVq2Fg6vAxtxpYays61H8gLMcWqaG8TfgGA3H7setGAYiBsM5YmdZgeuCdGAHSwfNfav5cfFjXNDkPWv37UNSgFxj6o58jfXc3kCLKqLJtc5ZPjm1thEGYxK8HVYBi8fRQeEVy76n27DXGrVTyHz94CfJRuMnH76xGYbMgeuvurxjJMLrQgWUu53cjocYyzzNWdJrgs2D5?n=d&v=2&cb=https%3A%2F%2Fyap.pr%2Fconnect%3Fr%3Dd77dc0da9df83a47755a15c42c5d9db9d7a7fd62") - let spy = LoginApprovalSpy(shown: [Self.consent(identityId: "identity-a", terms: .current)], loginRequest: request) + let spy = LoginApprovalSpy(shown: [Self.consent(identityId: "identity-a")], loginRequest: request) spy.approveFailures = [AppConnect.Refusal(.stale, "The request is too old.")] let opened = OpenedURLs() let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false, openURL: { opened.urls.append($0) }) @@ -1568,8 +730,8 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { /// login, while the sheet was up: nothing is approved on the old sheet, /// and the user decides again on what is true now. func testAnApprovalThatIsOutOfDateShowsTheRequestAgainAsItStands() async { - let shown = Self.consent(identityId: "identity-a", terms: nil) - let current = Self.consent(identityId: "identity-b", terms: .current) + let shown = Self.consent(identityId: "identity-a") + let current = Self.consent(identityId: "identity-b") let spy = LoginApprovalSpy(shown: [shown, current]) spy.approveFailures = [DashConnectPlatformError.approvalOutOfDate] let viewModel = ConnectionsViewModel(dataSource: spy, featureUnavailable: false) @@ -1594,7 +756,7 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { /// so itself and no error is added; when it can again, a note says why /// nothing was approved. func testAnApprovalThatCouldNotCheckTheLoginRebuildsTheSheet() async { - let shown = Self.consent(identityId: "identity-a", terms: .current) + let shown = Self.consent(identityId: "identity-a") var unresolved = shown unresolved.login = .unresolved unresolved.unresolvedLoginReason = "no nodes" @@ -1619,7 +781,7 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { XCTAssertEqual(viewModel.approveError, DashConnectPlatformError.loginUnresolved.localizedDescription) } - private static func consent(identityId: String, terms: AppConnect.SessionKeyTerms?) -> ConnectionRequest { + private static func consent(identityId: String) -> ConnectionRequest { ConnectionRequest( loginRequest: MockDashConnectDataSource.sampleLoginRequest, appLabel: "App", @@ -1627,7 +789,7 @@ final class ConnectionsViewModelPurchaseTests: XCTestCase { walletUsername: nil, walletIdentityId: identityId, existingConnection: nil, - login: terms.map(AppConnect.Login.oneQR) ?? .twoQR) + login: .appConnect(.sample)) } private static let connection = DAppConnection( @@ -1731,6 +893,7 @@ private final class PurchaseApprovalSpy: DashConnectDataSource { private var storedDisconnectFailure: Error? private var storedDisconnectedIds: [String] = [] private var storedDisconnectedScopes: [String?] = [] + private var storedDisconnectedIncludingUnrecorded: [Bool] = [] var disconnectFailure: Error? { get { lock.withLock { storedDisconnectFailure } } @@ -1745,18 +908,23 @@ private final class PurchaseApprovalSpy: DashConnectDataSource { lock.withLock { storedDisconnectedScopes } } + var disconnectedIncludingUnrecorded: [Bool] { + lock.withLock { storedDisconnectedIncludingUnrecorded } + } + private var storedDisconnectResult = DashConnectDisconnectResult() - /// What a successful disconnect reports about the profile keys. + /// What a successful disconnect reports. var disconnectResult: DashConnectDisconnectResult { get { lock.withLock { storedDisconnectResult } } set { lock.withLock { storedDisconnectResult = newValue } } } - func disconnect(id: String, scope: String?) async throws -> DashConnectDisconnectResult { + func disconnect(id: String, scope: String?, includingUnrecorded: Bool) async throws -> DashConnectDisconnectResult { let (failure, result) = lock.withLock { () -> (Error?, DashConnectDisconnectResult) in storedDisconnectedIds.append(id) storedDisconnectedScopes.append(scope) + storedDisconnectedIncludingUnrecorded.append(includingUnrecorded) return (storedDisconnectFailure, storedDisconnectResult) } if let failure { throw failure } @@ -1825,7 +993,7 @@ private final class LoginApprovalSpy: DashConnectDataSource { throw PurchaseSpyError.unsupported } - func disconnect(id: String, scope: String?) async throws -> DashConnectDisconnectResult { + func disconnect(id: String, scope: String?, includingUnrecorded: Bool) async throws -> DashConnectDisconnectResult { throw PurchaseSpyError.unsupported } @@ -1889,274 +1057,6 @@ final class AppConnectLoginTests: XCTestCase { XCTAssertTrue(AppConnect.isAvailable(protocolVersion: 15)) } - func testRequestIdIsHash256OfTheAppEphemeralKey() { - // hash256 of the empty string, a published vector. - XCTAssertEqual( - AppConnect.requestId(appEphemeralPubKey: Data()).toHexString(), - "5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456") - XCTAssertEqual(AppConnect.requestId(appEphemeralPubKey: Data(repeating: 0x02, count: 33)).count, 32) - } - - func testSessionKeyIsAbsentUntilItsHashIsOnTheIdentity() { - let other = Self.key(keyId: 4, data: Data(repeating: 0x22, count: 20)) - XCTAssertEqual(Self.sessionKeyState(keys: [other]), .absent) - // The same bytes under another key type are a different key. - let sameBytesOtherType = Self.key(keyId: 5, keyType: .ecdsaSecp256k1, data: Self.sessionKeyHash) - XCTAssertEqual(Self.sessionKeyState(keys: [sameBytesOtherType]), .absent) - } - - func testRegisteredSessionKeyOfTheAppIsUsableWithItsKeyId() { - XCTAssertEqual(Self.sessionKeyState(keys: [Self.sessionKey()]), .usable(keyId: 9)) - // Registered a moment ago by a clock that has since been set back. - let afterClockCorrection = Self.sessionKey(expiresAt: Self.nowMilliseconds + 3_600_000 + 60_000) - XCTAssertEqual(Self.sessionKeyState(keys: [afterClockCorrection]), .usable(keyId: 9)) - // Limits narrower than the approved terms are within them. - let narrower = Self.sessionKey( - totalBudget: Self.terms.budgetCredits - 1, expiresAt: Self.nowMilliseconds + 1) - XCTAssertEqual(Self.sessionKeyState(keys: [narrower]), .usable(keyId: 9)) - } - - func testDisabledExpiredOrMisregisteredSessionKeyIsUnusable() { - let latestExpiry = Int64(Self.terms.expiresAt(from: Self.now.addingTimeInterval(AppConnect.clockTolerance))) - let unusable: [(String, ManagedIdentity.IdentityPublicKeyInfo)] = [ - ("disabled", Self.sessionKey(disabledAt: 1)), - ("expired", Self.sessionKey(expiresAt: Self.nowMilliseconds)), - ("wrong level", Self.sessionKey(securityLevel: .critical)), - ("wrong purpose", Self.sessionKey(purpose: .transfer)), - ("no budget", Self.sessionKey(totalBudget: nil)), - ("no expiry", Self.sessionKey(expiresAt: nil)), - ("budget above the approved one", Self.sessionKey(totalBudget: Self.terms.budgetCredits + 1)), - ("expiry after the approved one", Self.sessionKey(expiresAt: latestExpiry + 1)), - ] - for (name, key) in unusable { - XCTAssertEqual(Self.sessionKeyState(keys: [key]), .unusable, name) - } - } - - /// The key is derived from the identity and the request's ephemeral key - /// alone, so a request that repeats another app's ephemeral key finds - /// that app's key on the identity. - func testARegisteredSessionKeyBoundToAnotherAppIsUnusable() { - let otherApp = Data(repeating: 0xB2, count: 32) - let boundElsewhere = [AppConnect.KeyBinding(keyId: 9, data: Self.sessionKeyHash, singleContractId: otherApp)] - XCTAssertEqual(Self.sessionKeyState(keys: [Self.sessionKey()], bindings: boundElsewhere), .unusable) - // A grant record does not outweigh a bound the store can read. - XCTAssertEqual( - Self.sessionKeyState(keys: [Self.sessionKey()], bindings: boundElsewhere, grantedKeyIds: [9]), - .unusable) - let unbound = [AppConnect.KeyBinding(keyId: 9, data: Self.sessionKeyHash, singleContractId: nil)] - XCTAssertEqual(Self.sessionKeyState(keys: [Self.sessionKey()], bindings: unbound), .unusable) - } - - func testARegisteredSessionKeyTheStoreCannotPlaceNeedsAGrantRecord() { - let unplaced: [[AppConnect.KeyBinding]] = [ - [], - // The stored row under this id is for a different key. - [AppConnect.KeyBinding(keyId: 9, data: Data([0xFF]), singleContractId: Self.app)], - [AppConnect.KeyBinding( - keyId: 9, data: Self.sessionKeyHash, singleContractId: nil, hasUnreadableBound: true)], - ] - for bindings in unplaced { - XCTAssertEqual(Self.sessionKeyState(keys: [Self.sessionKey()], bindings: bindings), .unusable) - XCTAssertEqual( - Self.sessionKeyState(keys: [Self.sessionKey()], bindings: bindings, grantedKeyIds: [8]), - .unusable) - XCTAssertEqual( - Self.sessionKeyState(keys: [Self.sessionKey()], bindings: bindings, grantedKeyIds: [9]), - .usable(keyId: 9)) - } - } - - func testTheOneQrLoginHasTermsAndTheTwoQrLoginHasNone() { - XCTAssertEqual(AppConnect.login(protocolVersion: 13), .twoQR) - XCTAssertEqual(AppConnect.login(protocolVersion: 14), .oneQR(.current)) - XCTAssertNil(AppConnect.Login.twoQR.sessionKeyTerms) - XCTAssertNil(AppConnect.Login.unresolved.sessionKeyTerms) - XCTAssertEqual(AppConnect.Login.oneQR(.current).sessionKeyTerms, .current) - // A request built without asking the network is not a two-QR one. - XCTAssertEqual(ConnectionRequest(loginRequest: MockDashConnectDataSource.sampleLoginRequest).login, .unresolved) - XCTAssertEqual(AppConnect.SessionKeyTerms.current.budgetCredits, AppConnect.sessionKeyBudgetCredits) - XCTAssertEqual(AppConnect.SessionKeyTerms.current.lifetime, AppConnect.sessionKeyLifetime) - } - - func testTheApprovalSheetNamesTheBudgetInDashAndTheLifetimeInDays() { - let terms = AppConnect.SessionKeyTerms(budgetCredits: 5_000_000_000, lifetime: 90 * 24 * 60 * 60) - XCTAssertEqual(terms.budgetText.filter { $0.isNumber || $0.isLetter }, "005DASH") - XCTAssertEqual(terms.lifetimeDays, 90) - } - - /// A response an earlier login deleted is published again when its - /// request comes back. If that publish never confirms, the record must - /// not say the response is gone: a disconnect would drop it and leave - /// the response on Platform with nothing pointing at it. - func testARepublishThatNeverConfirmsKeepsItsRecordThroughADisconnect() { - var republished = Self.grant(sessionKeyId: 9) - republished.responseDeleted = true - republished.markPublishStarted() - XCTAssertNil(republished.documentId) - XCTAssertTrue(republished.hasUnconfirmedResponse) - - var knownGone = Self.grant(sessionKeyId: 10) - knownGone.responseDeleted = true - var otherApp = Self.grant(sessionKeyId: 11) - otherApp.responseDeleted = true - var grants = [republished, knownGone, otherApp] - AppConnect.markKeysDisabled(in: &grants) { $0.sessionKeyId != 11 } - - XCTAssertEqual(grants.map(\.sessionKeyId), [9, 11]) - XCTAssertEqual(grants.map(\.keyDisabled), [true, nil]) - XCTAssertTrue(grants[0].hasUnconfirmedResponse, "the disconnect still has a response to look for") - } - - func testNextKeyIdFollowsTheHighestKeyOnTheIdentity() { - XCTAssertEqual(AppConnect.nextKeyId(currentIdentityPublicKeys: []), 1) - XCTAssertEqual( - AppConnect.nextKeyId(currentIdentityPublicKeys: [ - Self.key(keyId: 0, data: Data([1])), - Self.key(keyId: 7, data: Data([2]), disabledAt: 1), - Self.key(keyId: 3, data: Data([3])), - ]), - 8) - } - - /// An app can register a key under the last id there is. The next key - /// then takes the lowest free id, and disabling that key changes nothing: - /// its id stays taken. - func testAKeyOnTheLastIdLeavesTheLowestFreeIdForTheNextKey() { - // A key id is a UInt32 the SDK carries as an Int32 bit pattern. - let last = Self.key(keyId: -1, data: Data([1])) - XCTAssertEqual(AppConnect.nextKeyId(currentIdentityPublicKeys: [last]), 0) - let disabledLast = Self.key(keyId: -1, data: Data([1]), disabledAt: 1) - XCTAssertEqual( - AppConnect.nextKeyId(currentIdentityPublicKeys: [ - Self.key(keyId: 0, data: Data([0])), Self.key(keyId: 1, data: Data([2])), - Self.key(keyId: 2, data: Data([3]), disabledAt: 1), disabledLast, - ]), - 3, "a disabled key keeps its id") - XCTAssertEqual( - AppConnect.nextKeyId(currentIdentityPublicKeys: [Self.key(keyId: -2, data: Data([2]))]), - .max) - } - - func testDisconnectDisablesOnlyTheLiveSessionKeysItGranted() { - let grants = [9, 11, 12, 13].map { Self.grant(sessionKeyId: $0) } - let keys = [ - Self.key(keyId: 0, securityLevel: .master, keyType: .ecdsaSecp256k1, data: Data([0])), - Self.key(keyId: 9, data: Data([9])), - // Not granted by these responses. - Self.key(keyId: 10, data: Data([10])), - // Already disabled. - Self.key(keyId: 11, data: Data([11]), disabledAt: 1), - // The id now belongs to a key this login would never register. - Self.key(keyId: 12, securityLevel: .critical, data: Data([12])), - // 13 is not on the identity at all. - Self.key(keyId: 14, data: Data([14])), - ] - let app = Data(repeating: 0xA1, count: 32) - XCTAssertEqual( - AppConnect.sessionKeyIdsToDisable( - for: grants, appContractId: app, bindings: [], currentIdentityPublicKeys: keys), - [9]) - XCTAssertEqual( - AppConnect.sessionKeyIdsToDisable( - for: [], appContractId: app, bindings: [], currentIdentityPublicKeys: keys), - []) - } - - func testDisconnectAlsoDisablesLiveKeysBoundToTheAppThatHaveNoGrantRecord() { - let app = Data(repeating: 0xA1, count: 32) - let otherApp = Data(repeating: 0xB2, count: 32) - let keys = [ - Self.key(keyId: 6, data: Data([6]), totalBudget: 5, expiresAt: 9_999), - Self.key(keyId: 7, data: Data([7]), totalBudget: 5, expiresAt: 9_999), - Self.key(keyId: 8, data: Data([8]), disabledAt: 1), - Self.key(keyId: 9, data: Data([9]), totalBudget: 5, expiresAt: 9_999), - Self.key(keyId: 10, data: Data([10]), totalBudget: 5, expiresAt: 9_999), - Self.key(keyId: 11, data: Data([11]), totalBudget: 5, expiresAt: 9_999), - // Bound to the app and of the same kind, but without limits and - // without a grant record: not a key this login registered. - Self.key(keyId: 13, data: Data([13])), - // Bound to the app, but not a key this login registers. - Self.key( - keyId: 12, purpose: .encryption, securityLevel: .medium, keyType: .ecdsaSecp256k1, - data: Data([12]), totalBudget: 5, expiresAt: 9_999), - // Bound to the app with one limit only. - Self.key(keyId: 14, data: Data([14]), expiresAt: 9_999), - ] - let bindings = [ - AppConnect.KeyBinding(keyId: 6, data: Data([6]), singleContractId: app), - AppConnect.KeyBinding(keyId: 7, data: Data([7]), singleContractId: app), - AppConnect.KeyBinding(keyId: 8, data: Data([8]), singleContractId: app), - AppConnect.KeyBinding(keyId: 9, data: Data([9]), singleContractId: app), - AppConnect.KeyBinding(keyId: 10, data: Data([10]), singleContractId: otherApp), - // The stored row under this id is for a different key. - AppConnect.KeyBinding(keyId: 11, data: Data([0xFF]), singleContractId: app), - AppConnect.KeyBinding(keyId: 12, data: Data([12]), singleContractId: app), - AppConnect.KeyBinding(keyId: 13, data: Data([13]), singleContractId: app), - AppConnect.KeyBinding(keyId: 14, data: Data([14]), singleContractId: app), - ] - XCTAssertEqual( - AppConnect.sessionKeyIdsToDisable( - for: [Self.grant(sessionKeyId: 9)], - appContractId: app, - bindings: bindings, - currentIdentityPublicKeys: keys), - [6, 7, 9]) - XCTAssertEqual( - AppConnect.sessionKeyIdsToDisable( - for: [], appContractId: otherApp, bindings: bindings, currentIdentityPublicKeys: keys), - [10]) - // Key 7 is the two-QR login's authentication key, given limits by - // its `dash-st:` registration: it stays unless a grant names it. - XCTAssertEqual( - AppConnect.sessionKeyIdsToDisable( - for: [Self.grant(sessionKeyId: 9)], - appContractId: app, - bindings: bindings, - currentIdentityPublicKeys: keys, - twoQRAuthenticationKeyHash160: Data([7])), - [6, 9]) - } - - /// Keys of the app on an identity that is not the active one are - /// recognised from the wallet's store: no grant record names them. - func testTheStoreShowsAnAppKeyHeldOnAnotherIdentityWhileItIsLive() { - let app = Data(repeating: 0xA1, count: 32) - let authentication = Data(repeating: 0x51, count: 20) - let encryption = Data(repeating: 0x52, count: 33) - func holdsTwoQR(_ bindings: [AppConnect.KeyBinding]) -> Bool { - AppConnect.holdsLiveTwoQRLoginKey( - authenticationPublicKeyHash160: authentication, encryptionPublicKey: encryption, bindings: bindings) - } - func authenticationKey(data: Data = authentication, isDisabled: Bool = false) -> AppConnect.KeyBinding { - AppConnect.KeyBinding( - keyId: 3, data: data, singleContractId: app, isDisabled: isDisabled, - isTwoQRAuthenticationKeyShaped: true) - } - let encryptionKey = AppConnect.KeyBinding( - keyId: 4, data: encryption, singleContractId: nil, isTwoQREncryptionKeyShaped: true) - - XCTAssertTrue(holdsTwoQR([authenticationKey()])) - XCTAssertTrue(holdsTwoQR([authenticationKey(isDisabled: true), encryptionKey])) - XCTAssertFalse(holdsTwoQR([authenticationKey(isDisabled: true)])) - // Another app's key: same kind, another payload. - XCTAssertFalse(holdsTwoQR([authenticationKey(data: Data(repeating: 0x53, count: 20))])) - // The same bytes under another kind are not that key. - XCTAssertFalse(holdsTwoQR([AppConnect.KeyBinding(keyId: 5, data: authentication, singleContractId: app)])) - XCTAssertFalse(holdsTwoQR([])) - - let sessionKey = AppConnect.KeyBinding( - keyId: 6, data: Data([6]), singleContractId: app, isSessionKeyShaped: true) - var disabledSessionKey = sessionKey - disabledSessionKey.isDisabled = true - XCTAssertTrue(AppConnect.holdsLiveSessionKey(appContractId: app, bindings: [sessionKey])) - XCTAssertFalse(AppConnect.holdsLiveSessionKey(appContractId: app, bindings: [disabledSessionKey])) - XCTAssertFalse( - AppConnect.holdsLiveSessionKey(appContractId: Data(repeating: 0xB2, count: 32), bindings: [sessionKey])) - // The two-QR authentication key is bound to the app but carries no limits. - XCTAssertFalse(AppConnect.holdsLiveSessionKey(appContractId: app, bindings: [authenticationKey()])) - } - func testOnlyAWholeSingleContractBoundNamesTheApp() { let app = Data(repeating: 0xA1, count: 32) XCTAssertEqual(AppConnect.singleContractId(boundsKind: 1, boundIds: [app]), app) @@ -2175,127 +1075,6 @@ final class AppConnectLoginTests: XCTestCase { XCTAssertFalse(AppConnect.isReadableBound(boundsKind: 4, boundIds: [app])) } - func testAKeyBoundElsewhereOrNotAtAllIsNeitherDisabledNorUnknown() { - let app = Data(repeating: 0xA1, count: 32) - let keys = [4, 5, 6].map { - Self.key(keyId: Int32($0), data: Data([UInt8($0)]), totalBudget: 5, expiresAt: 9_999) - } - let bindings = [ - // A document-type bound and an unbounded key both store no single contract. - AppConnect.KeyBinding(keyId: 4, data: Data([4]), singleContractId: nil), - AppConnect.KeyBinding(keyId: 5, data: Data([5]), singleContractId: nil), - AppConnect.KeyBinding(keyId: 6, data: Data([6]), singleContractId: Data(repeating: 0xB2, count: 32)), - ] - XCTAssertEqual( - AppConnect.sessionKeyIdsToDisable( - for: [], appContractId: app, bindings: bindings, currentIdentityPublicKeys: keys), - []) - XCTAssertEqual( - AppConnect.sessionKeyIdsWithUnknownBinding(for: [], bindings: bindings, currentIdentityPublicKeys: keys), - []) - } - - func testAStoredLiveKeyOfTheAppMissingFromTheIdentityViewIsReported() { - let app = Data(repeating: 0xA1, count: 32) - let otherApp = Data(repeating: 0xB2, count: 32) - let keys = [Self.key(keyId: 6, data: Data([6]))] - let bindings = [ - AppConnect.KeyBinding(keyId: 6, data: Data([6]), singleContractId: app), - AppConnect.KeyBinding(keyId: 7, data: Data([7]), singleContractId: app), - AppConnect.KeyBinding(keyId: 8, data: Data([8]), singleContractId: app, isDisabled: true), - AppConnect.KeyBinding(keyId: 9, data: Data([9]), singleContractId: otherApp), - ] - XCTAssertEqual(AppConnect.boundKeyIdsMissing(from: keys, appContractId: app, bindings: bindings), [7]) - } - - func testALiveSessionKeyTheStoreCannotPlaceStopsADisconnect() { - let app = Data(repeating: 0xA1, count: 32) - let keys = [ - Self.key(keyId: 0, securityLevel: .master, keyType: .ecdsaSecp256k1, data: Data([0])), - Self.key(keyId: 6, data: Data([6])), - Self.key(keyId: 7, data: Data([7])), - Self.key(keyId: 8, data: Data([8]), disabledAt: 1), - Self.key(keyId: 9, data: Data([9])), - Self.key(keyId: 11, data: Data([11])), - ] - let bindings = [ - AppConnect.KeyBinding(keyId: 6, data: Data([6]), singleContractId: nil), - AppConnect.KeyBinding(keyId: 11, data: Data([0xFF]), singleContractId: app), - AppConnect.KeyBinding(keyId: 14, data: Data([14]), singleContractId: nil, hasUnreadableBound: true), - ] - // 0 and 8 cannot be session keys that sign; 6 is in the store; 9 has - // a grant record. 7 is unknown, so is 11 (its row is another key) and - // 14 (its stored bound cannot be read). - XCTAssertEqual( - AppConnect.sessionKeyIdsWithUnknownBinding( - for: [Self.grant(sessionKeyId: 9)], - bindings: bindings, - currentIdentityPublicKeys: keys + [Self.key(keyId: 14, data: Data([14]))]), - [7, 11, 14]) - } - - private static func grant(sessionKeyId: UInt32) -> AppConnectGrant { - AppConnectGrant( - identityId: "identity", appContractId: "app", documentId: "document-\(sessionKeyId)", - values: .init(appEphemeralPubKeyHash: "aa", walletEphemeralPubKey: "bb", encryptedPayload: "cc"), - sessionKeyId: sessionKeyId, totalBudget: nil, expiresAt: nil, - publishedAt: Date(timeIntervalSince1970: 1_000)) - } - - func testSessionKeyIsBoundToTheRequestedContractWithBothLimits() { - let hash = Data(repeating: 0x11, count: 20) - let contractId = Data(repeating: 0x33, count: 32) - let key = AppConnect.sessionIdentityPubkey( - keyId: 8, publicKeyHash160: hash, appContractId: contractId, totalBudget: 5, expiresAt: 6) - XCTAssertEqual(key.keyId, 8) - XCTAssertEqual(key.keyType, .ecdsaHash160) - XCTAssertEqual(key.purpose, .authentication) - XCTAssertEqual(key.securityLevel, .high) - XCTAssertEqual(key.pubkeyBytes, hash) - XCTAssertEqual(key.contractBounds, .singleContract(id: contractId)) - XCTAssertEqual(key.totalBudget, 5) - XCTAssertEqual(key.expiresAt, 6) - } - - func testExpiryIsTheLifetimeAfterNowInMilliseconds() { - XCTAssertEqual( - AppConnect.SessionKeyTerms(budgetCredits: 1, lifetime: 60).expiresAt(from: Date(timeIntervalSince1970: 1_000)), - 1_060_000) - } - - func testResponseCarriesTheSessionKeyOnlyTheAppCanDecrypt() throws { - let sessionPrivateKey = Data(repeating: 0x5a, count: 32) - let appEphemeralPrivateKey = Data(repeating: 0x07, count: 32) - let appEphemeralPubKey = try Secp256k1.compressedPublicKey(privateKey: appEphemeralPrivateKey) - let walletEphemeralPrivateKeyBytes = Data(repeating: 0x09, count: 32) - var walletEphemeralPrivateKey = walletEphemeralPrivateKeyBytes - - let values = AppConnect.ResponseValues(try AppConnect.seal( - sessionPrivateKey, - appEphemeralPubKey: appEphemeralPubKey, - walletEphemeralPrivateKey: &walletEphemeralPrivateKey)) - - XCTAssertEqual(walletEphemeralPrivateKey, Data(repeating: 0, count: 32), "the ephemeral key is wiped") - XCTAssertEqual( - values.appEphemeralPubKeyHash, - try KeyExchangeCrypto.hash160(appEphemeralPubKey).toHexString()) - let walletEphemeralPubKey = try Secp256k1.compressedPublicKey(privateKey: walletEphemeralPrivateKeyBytes) - XCTAssertEqual(values.walletEphemeralPubKey, walletEphemeralPubKey.toHexString()) - // 28-byte envelope plus one 32-byte key: the contract's minimum. - XCTAssertEqual(values.encryptedPayload.count, 60 * 2) - - let payload = try XCTUnwrap(Self.data(hex: values.encryptedPayload)) - // The app's side of the exchange: its private key with the wallet's - // public key. ECDH is symmetric, so the helper's parameters take the - // opposite pair to the one that encrypted. - XCTAssertEqual( - try KeyExchangeCrypto.decryptLoginKey( - payload, - walletEphemeralPriv: appEphemeralPrivateKey, - appEphemeralPub: walletEphemeralPubKey), - sessionPrivateKey) - } - func testPropertiesJsonHoldsExactlyTheThreeContractFields() throws { let values = AppConnect.ResponseValues( appEphemeralPubKeyHash: "aa", walletEphemeralPubKey: "bb", encryptedPayload: "cc") @@ -2308,44 +1087,6 @@ final class AppConnectLoginTests: XCTestCase { ]) } - func testAGrantWrittenBeforeTheDeleteFlagsExistedStillLoads() throws { - // The shape the first device run stored: no `responseDeleted`, no - // `keyDisabled`. Losing it would leave that key impossible to find. - let stored = """ - [{"identityId":"identity","appContractId":"app","documentId":"document", - "values":{"appEphemeralPubKeyHash":"aa","walletEphemeralPubKey":"bb","encryptedPayload":"cc"}, - "sessionKeyId":6,"totalBudget":5000000000,"expiresAt":1799315762000,"publishedAt":1791539765792}] - """ - defaults.set(Data(stored.utf8), forKey: "scope.app-connect-responses.v1") - let store = UserDefaultsAppConnectResponseStore(defaults: defaults, network: .testnet) { "scope" } - - let grant = try XCTUnwrap(store.load().first) - XCTAssertEqual(grant.sessionKeyId, 6) - XCTAssertEqual(grant.documentId, "document") - XCTAssertNil(grant.responseDeleted) - XCTAssertNil(grant.keyDisabled) - XCTAssertTrue(grant.hasDeletableResponse) - } - - func testASavedGrantIsLoadedWithTheSameKey() { - let store = UserDefaultsAppConnectResponseStore(defaults: defaults, network: .testnet) { "scope" } - let grant = AppConnectGrant( - identityId: "identity", appContractId: "app", documentId: nil, - values: .init(appEphemeralPubKeyHash: "aa", walletEphemeralPubKey: "bb", encryptedPayload: "cc"), - sessionKeyId: 6, totalBudget: nil, expiresAt: nil, - publishedAt: Date(timeIntervalSince1970: 1_791_539_765.792_813)) - store.save([grant]) - - XCTAssertEqual(store.load().first?.key, grant.key) - } - - func testAStoreWithoutAScopeCannotPersist() { - XCTAssertTrue( - UserDefaultsAppConnectResponseStore(defaults: defaults, network: .testnet) { "scope" }.canPersist) - XCTAssertFalse( - UserDefaultsAppConnectResponseStore(defaults: defaults, network: .devnet) { nil }.canPersist) - } - func testResponseValuesAreReadBackFromNumbersBase64AndHex() { let hash = Data(repeating: 0xAB, count: 20) let walletKey = Data([0x02] + [UInt8](repeating: 0x11, count: 32)) @@ -2373,158 +1114,16 @@ final class AppConnectLoginTests: XCTestCase { XCTAssertNil(AppConnect.responseValues(fromDocument: ["$id": "id"], appEphemeralPubKeyHash: hash)) } - func testAnUnconfirmedResponseIsNeitherDeletableNorKnownGone() { - var grant = Self.grant(sessionKeyId: 6) - grant.documentId = nil - XCTAssertTrue(grant.hasUnconfirmedResponse) - XCTAssertFalse(grant.hasDeletableResponse) - - grant.responseDeleted = true - XCTAssertFalse(grant.hasUnconfirmedResponse) - } - - func testARowThisBuildCannotReadIsKeptWhenTheStoreIsSaved() throws { - let stored = """ - [{"somethingNewer":true,"sessionKeyId":4}, - {"identityId":"identity","appContractId":"app","documentId":"document", - "values":{"appEphemeralPubKeyHash":"aa","walletEphemeralPubKey":"bb","encryptedPayload":"cc"}, - "sessionKeyId":6,"publishedAt":1791539765792}] - """ - defaults.set(Data(stored.utf8), forKey: "scope.app-connect-responses.v1") - let store = UserDefaultsAppConnectResponseStore(defaults: defaults, network: .testnet) { "scope" } - - XCTAssertEqual(store.load().map(\.sessionKeyId), [6]) - XCTAssertTrue(store.hasUnreadableRows(identityId: "identity"), "a record load leaves out may name a key") - store.save(store.load() + [Self.grant(sessionKeyId: 7)]) - XCTAssertEqual(store.load().map(\.sessionKeyId), [6, 7]) - - let rows = try XCTUnwrap( - JSONSerialization.jsonObject( - with: try XCTUnwrap(defaults.data(forKey: "scope.app-connect-responses.v1"))) as? [[String: Any]]) - XCTAssertEqual(rows.filter { $0["somethingNewer"] as? Bool == true }.count, 1) - - // Clearing the readable grants must not clear the unreadable row. - store.save([]) - XCTAssertNotNil(defaults.data(forKey: "scope.app-connect-responses.v1")) - } - - func testAnUnreadableRowOfAnotherIdentityLeavesThisOneReadable() { - let stored = #"[{"identityId":"other","somethingNewer":true}]"# - defaults.set(Data(stored.utf8), forKey: "scope.app-connect-responses.v1") - let store = UserDefaultsAppConnectResponseStore(defaults: defaults, network: .testnet) { "scope" } - - XCTAssertFalse(store.hasUnreadableRows(identityId: "identity")) - XCTAssertTrue(store.hasUnreadableRows(identityId: "other")) - } - - func testAStoredValueThatIsNotARowListIsNeverReplaced() { - let suiteName = "AppConnectResponseStoreTests.\(UUID().uuidString)" - let defaults = UserDefaults(suiteName: suiteName)! - defer { defaults.removePersistentDomain(forName: suiteName) } - let key = "scope.app-connect-responses.v1" - let store = UserDefaultsAppConnectResponseStore(defaults: defaults, network: .testnet) { "scope" } - - XCTAssertTrue(store.canPersist) - XCTAssertFalse(store.hasUnreadableRows(identityId: "identity")) - for stored in [Data(#"{"rows":[]}"#.utf8), Data([0xFF, 0x00])] { - defaults.set(stored, forKey: key) - // Nothing new would be kept, so a login must not start. - XCTAssertFalse(store.canPersist) - XCTAssertTrue(store.hasUnreadableRows(identityId: "identity")) - XCTAssertEqual(store.load().count, 0) - store.save([Self.grant(sessionKeyId: 7)]) - XCTAssertEqual(defaults.data(forKey: key), stored) - store.save([]) - XCTAssertEqual(defaults.data(forKey: key), stored) - } - // A value that is not data at all is left alone the same way. - let others: [NSObject] = ["rows" as NSString, ["rows": NSArray()] as NSDictionary, 7 as NSNumber] - for stored in others { - defaults.set(stored, forKey: key) - XCTAssertFalse(store.canPersist) - XCTAssertEqual(store.load().count, 0) - store.save([Self.grant(sessionKeyId: 7)]) - XCTAssertEqual(defaults.object(forKey: key) as? NSObject, stored) - store.save([]) - XCTAssertEqual(defaults.object(forKey: key) as? NSObject, stored) - } - defaults.removeObject(forKey: key) - XCTAssertTrue(store.canPersist) - } - - func testAGrantedKeyMissingFromTheIdentityViewIsReportedNotAssumedGone() { - let grants = [9, 13].map { Self.grant(sessionKeyId: $0) } - let keys = [Self.key(keyId: 9, data: Data([9]), disabledAt: 1)] - XCTAssertEqual(AppConnect.sessionKeyIdsMissing(from: keys, for: grants), [13]) - XCTAssertEqual(AppConnect.sessionKeyIdsMissing(from: keys, for: [grants[0]]), []) - } - - func testAGrantHasNothingToDeleteBeforeItIsPublishedOrAfterItsResponseIsGone() { - var grant = Self.grant(sessionKeyId: 6) - XCTAssertTrue(grant.hasDeletableResponse) - grant.responseDeleted = true - XCTAssertFalse(grant.hasDeletableResponse) - grant.responseDeleted = nil - grant.documentId = nil - XCTAssertFalse(grant.hasDeletableResponse) - } - - func testPublishedResponsesSurviveAReloadAndAreScoped() { - let response = AppConnectGrant( - identityId: "identity", appContractId: "app", documentId: "document", - values: .init(appEphemeralPubKeyHash: "aa", walletEphemeralPubKey: "bb", encryptedPayload: "cc"), - sessionKeyId: 8, totalBudget: 5, expiresAt: 6, - publishedAt: Date(timeIntervalSince1970: 1_000)) - var scope: String? = "scope-a" - let store = UserDefaultsAppConnectResponseStore(defaults: defaults, network: .testnet) { scope } - - store.save([response]) - XCTAssertEqual(store.load(), [response]) - - scope = "scope-b" - XCTAssertEqual(store.load(), [], "another wallet does not see the records") - scope = nil - store.save([response]) - XCTAssertEqual(store.load(), [], "nothing is stored without a wallet scope") - - scope = "scope-a" - store.save([]) - XCTAssertEqual(store.load(), []) - } - - func testPinnedGrantRecordsStayWithTheirWalletWhenTheActiveOneChanges() { - var walletIdHex: String? = "wallet-b" - let connections = UserDefaultsDashConnectStore( - defaults: defaults, - network: .testnet, - walletIdHexProvider: { walletIdHex }, - devnetNameProvider: { nil } - ) - let store = UserDefaultsAppConnectResponseStore(defaults: defaults, scope: .connections(connections)) - let grant = Self.grant(sessionKeyId: 6) - - // Pinned for the wallet the operation runs for, which the active - // one has already stopped being. - let pinned = store.pinned(toWalletIdHex: "wallet-a") - XCTAssertTrue(pinned.canPersist) - pinned.save([grant]) - - XCTAssertEqual(pinned.load(), [grant]) - XCTAssertEqual(store.load(), [], "the active wallet got none of the records") - walletIdHex = "wallet-a" - XCTAssertEqual(store.load(), [grant]) - } - func testDisconnectOfARowFromAnotherWalletIsRefusedAndTheListMovesToTheActiveWallet() async { let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) + let row = Self.row(status: .active) let (dataSource, connections) = makeScopedDataSource(active: active, rows: [row]) let shown = Self.shownRows(dataSource) - let other = Self.twoQRRow(id: "7UaqHGBJBbRLJ4fUWS45cnud8PPUugJWoGTt1SKwHJ2P", status: .approved) + let other = Self.row(id: "7UaqHGBJBbRLJ4fUWS45cnud8PPUugJWoGTt1SKwHJ2P", status: .confirming) active.idHex = "wallet-b" connections.save([other]) - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } XCTAssertEqual(Self.shownRows(dataSource).map(\.id), [other.id], "the list shows the wallet that is active") XCTAssertEqual(connections.load(), [other]) @@ -2534,20 +1133,20 @@ final class AppConnectLoginTests: XCTestCase { func testDisconnectIsRefusedWhenTheNewlyActiveWalletHasARowForTheSameApp() async { let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) + let row = Self.row(status: .active) let (dataSource, connections) = makeScopedDataSource(active: active, rows: [row]) let shown = Self.shownRows(dataSource) active.idHex = "wallet-b" connections.save([row]) - await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } XCTAssertEqual(connections.load().map(\.status), [.active]) } func testDisconnectFromAnOldListIsRefusedAfterTheListAlreadyMovedToTheNewWallet() async throws { let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) + let row = Self.row(status: .active) let center = NotificationCenter() let (dataSource, connections) = makeScopedDataSource( active: active, rows: [row], notificationCenter: center) @@ -2564,19 +1163,20 @@ 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) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } 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) - try await dataSource.disconnect(id: current[0].id, scope: current[0].scope) - XCTAssertEqual(connections.load().map(\.status), [.approved]) + await Self.expectNotWalletChanged { + try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, includingUnrecorded: false) + } } func testRemoveDoesNothingForARowPublishedForAnotherWallet() async { let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) + let row = Self.row(status: .active) let (dataSource, connections) = makeScopedDataSource(active: active, rows: [row]) let shown = Self.shownRows(dataSource) active.idHex = "wallet-b" @@ -2590,23 +1190,11 @@ final class AppConnectLoginTests: XCTestCase { XCTAssertEqual(connections.load(), [], "the list is this wallet's now") } - func testDisconnectOfATwoQRRowTurnsItOffInTheActiveWallet() async throws { - let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) - let (dataSource, connections) = makeScopedDataSource(active: active, rows: [row]) - let shown = Self.shownRows(dataSource) - - try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope) - - XCTAssertEqual(connections.load().map(\.status), [.approved]) - XCTAssertEqual(Self.shownRows(dataSource).map(\.status), [.approved]) - } - func testARowShownForADevnetAtOtherNodesIsNotActedOnUnderTheSameName() async throws { let active = ActiveWallet("wallet-a") let endpoint = Endpoint("https://quorums.one.example") let center = NotificationCenter() - let row = Self.twoQRRow(status: .active) + let row = Self.row(status: .active) let (dataSource, connections) = makeScopedDataSource( active: active, rows: [row], notificationCenter: center, endpoint: endpoint) let shown = Self.shownRows(dataSource) @@ -2614,20 +1202,21 @@ 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) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } XCTAssertEqual(connections.load().map(\.status), [.active]) let current = Self.shownRows(dataSource) XCTAssertNotEqual(current[0].scope, shown[0].scope) - try await dataSource.disconnect(id: current[0].id, scope: current[0].scope) - XCTAssertEqual(connections.load().map(\.status), [.approved]) + await Self.expectNotWalletChanged { + try await dataSource.disconnect(id: current[0].id, scope: current[0].scope, includingUnrecorded: false) + } } func testARowWithNoScopeIsNotActedOn() async { let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) + 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) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: row.id, scope: nil, includingUnrecorded: false) } await dataSource.remove(id: row.id, scope: nil) XCTAssertEqual(connections.load(), [row]) @@ -2635,11 +1224,11 @@ final class AppConnectLoginTests: XCTestCase { func testTheListMovesToTheActiveWalletWhenTheWalletChangeIsAnnounced() async { let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) + let row = Self.row(status: .active) let center = NotificationCenter() let (dataSource, connections) = makeScopedDataSource( active: active, rows: [row], notificationCenter: center) - let other = Self.twoQRRow(id: "7UaqHGBJBbRLJ4fUWS45cnud8PPUugJWoGTt1SKwHJ2P", status: .approved) + let other = Self.row(id: "7UaqHGBJBbRLJ4fUWS45cnud8PPUugJWoGTt1SKwHJ2P", status: .confirming) active.idHex = "wallet-b" connections.save([other]) let moved = expectation(description: "the active wallet's rows are published") @@ -2694,7 +1283,7 @@ final class AppConnectLoginTests: XCTestCase { func testADisconnectWaitsForAnOperationAnotherDataSourceIsRunning() async throws { let gate = DashConnectOperationGate() let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) + let row = Self.row(status: .active) let (dataSource, connections) = makeScopedDataSource(active: active, rows: [row], operationGate: gate) let shown = Self.shownRows(dataSource) let otherStarted = expectation(description: "the other operation is running") @@ -2705,28 +1294,35 @@ final class AppConnectLoginTests: XCTestCase { otherStarted.fulfill() for await _ in release.stream { break } // It wrote a row of its own meanwhile. - connections.save([row, Self.twoQRRow(id: "7UaqHGBJBbRLJ4fUWS45cnud8PPUugJWoGTt1SKwHJ2P", status: .active)]) + connections.save([row, Self.row(id: "7UaqHGBJBbRLJ4fUWS45cnud8PPUugJWoGTt1SKwHJ2P", status: .active)]) } } await fulfillment(of: [otherStarted], timeout: 2) - let disconnect = Task { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope) } + // With no wallet to sign, the disconnect fails once its turn comes; + // 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) + await log.add("disconnect ended") + } try await Task.sleep(nanoseconds: 100_000_000) - XCTAssertEqual(connections.load().map(\.status), [.active], "the disconnect has not run yet") + let ended = await log.entries + XCTAssertEqual(ended, [], "the disconnect waits for the other operation") release.continuation.yield() await other.value - try await disconnect.value + await disconnect.value - let rows = connections.load() - XCTAssertEqual(rows.count, 2, "the row the other operation wrote is kept") - XCTAssertEqual(rows.first { $0.id == row.id }?.status, .approved) + let entries = await log.entries + XCTAssertEqual(entries, ["disconnect ended"]) + XCTAssertEqual(connections.load().count, 2, "the row the other operation wrote is kept") } func testAnOperationDoesNotStartForAWalletThatIsNoLongerActiveWhenItsTurnComes() async { let gate = DashConnectOperationGate() let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) + let row = Self.row(status: .active) let (dataSource, connections) = makeScopedDataSource(active: active, rows: [row], operationGate: gate) let shown = Self.shownRows(dataSource) let otherStarted = expectation(description: "the other operation is running") @@ -2740,7 +1336,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) } + await Self.expectWalletChanged { try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope, includingUnrecorded: false) } } try? await Task.sleep(nanoseconds: 100_000_000) active.idHex = "wallet-b" @@ -2777,7 +1373,7 @@ final class AppConnectLoginTests: XCTestCase { walletUsername: nil, walletIdentityId: "identity-a", existingConnection: nil, - login: .twoQR, + login: .appConnect(.sample), scope: "wallet-a devnet-one") XCTAssertTrue(request.wasResolved(forIdentityId: "identity-a", scope: "wallet-a devnet-one")) @@ -2791,333 +1387,12 @@ final class AppConnectLoginTests: XCTestCase { XCTAssertFalse(unscoped.wasResolved(forIdentityId: "identity-a", scope: "wallet-a devnet-one")) } - func testAnUnconfirmedRegistrationIsConfirmedOnlyByItsOwnKeyWithWhatItWasGiven() throws { - let appContractId = "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F" - let appContract = try XCTUnwrap(Data.identifier(fromBase58: appContractId)) - let template = Self.grant(sessionKeyId: 9) - var pending = AppConnectGrant( - identityId: template.identityId, appContractId: appContractId, documentId: nil, - values: template.values, sessionKeyId: 9, totalBudget: 5_000, expiresAt: 6_000, - publishedAt: template.publishedAt) - let hash = Data(repeating: 0x5A, count: 20) - pending.unconfirmedKeyHash160 = hash.toHexString() - let bound = [AppConnect.KeyBinding(keyId: 9, data: hash, singleContractId: appContract)] - func key( - data: Data = hash, level: SecurityLevel = .high, budget: UInt64? = 5_000, - expiry: Int64? = 6_000, disabledAt: Int64? = nil - ) -> [ManagedIdentity.IdentityPublicKeyInfo] { - [Self.key(keyId: 9, securityLevel: level, data: data, disabledAt: disabledAt, - totalBudget: budget, expiresAt: expiry)] - } - - XCTAssertTrue(AppConnect.holdsRecordedKey(pending, currentIdentityPublicKeys: key(), bindings: bound)) - for (keys, why) in [ - (key(data: Data(repeating: 0x01, count: 20)), "another key under the same id"), - (key(disabledAt: 1), "a disabled key"), - (key(level: .critical), "another security level"), - (key(budget: nil), "no budget"), - (key(budget: 9_000), "another budget"), - (key(expiry: nil), "no expiry"), - ([], "no key at all"), - ] { - XCTAssertFalse(AppConnect.holdsRecordedKey(pending, currentIdentityPublicKeys: keys, bindings: bound), why) - } - XCTAssertFalse( - AppConnect.holdsRecordedKey(pending, currentIdentityPublicKeys: key(), bindings: []), - "a bound the store does not show is not taken on trust") - let otherApp = [AppConnect.KeyBinding(keyId: 9, data: hash, singleContractId: Data(repeating: 0x77, count: 32))] - XCTAssertFalse( - AppConnect.holdsRecordedKey(pending, currentIdentityPublicKeys: key(), bindings: otherApp), - "bound to another app") - - var grants = [pending] - XCTAssertEqual( - AppConnect.confirmRegistrations( - in: &grants, identityId: pending.identityId, currentIdentityPublicKeys: [], bindings: bound), - [], "a key not in the view is not taken as never registered") - XCTAssertTrue(grants[0].isUnconfirmed) - XCTAssertEqual( - AppConnect.confirmRegistrations( - in: &grants, identityId: "another identity", currentIdentityPublicKeys: key(), bindings: bound), []) - let confirmed = AppConnect.confirmRegistrations( - in: &grants, identityId: pending.identityId, currentIdentityPublicKeys: key(), bindings: bound) - XCTAssertEqual(confirmed.map(\.key), [pending.key]) - XCTAssertFalse(grants[0].isUnconfirmed) - } - - /// A recovered one-QR registration turns the app's existing row into an - /// active one-QR row: a two-QR row still waiting for its second scan - /// would otherwise keep that banner over a live session key. - func testConfirmingARegistrationActivatesTheAppsExistingRow() { - let appA = "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F" - let appB = "BbWcUA8Msi7HSgC2hCJsCtDADs2FzQVabRuHvk1tnj4d" - let earlier = Date(timeIntervalSince1970: 1_000) - let confirmedAt = Date(timeIntervalSince1970: 2_000) - var waiting = DAppConnection( - id: appA, name: "App A", url: "https://a.example", - status: .approved, updatedAt: earlier, loginKind: .twoQR) - waiting.scope = "wallet-a devnet-one" - let other = DAppConnection( - id: appB, name: "App B", url: "https://b.example", - status: .approved, updatedAt: earlier, loginKind: .twoQR) - - let rows = PlatformDashConnectDataSource.rowsAfterConfirming( - appIds: [appA], in: [waiting, other], at: confirmedAt) - - XCTAssertEqual(rows.count, 2) - let a = rows[0] - XCTAssertEqual(a.id, appA) - XCTAssertEqual(a.status, .active) - XCTAssertEqual(a.loginKind, .oneQR) - XCTAssertEqual(a.updatedAt, confirmedAt) - XCTAssertEqual(a.name, "App A") - XCTAssertEqual(a.url, "https://a.example") - XCTAssertEqual(a.scope, "wallet-a devnet-one") - let b = rows[1] - XCTAssertEqual(b.status, .approved, "an app whose key was not confirmed keeps its row") - XCTAssertEqual(b.loginKind, .twoQR) - XCTAssertEqual(b.updatedAt, earlier) - } - - /// An app with a confirmed key but no row gets an active one-QR row. - func testConfirmingARegistrationAddsARowForAnAppWithout() { - let appA = "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F" - let confirmedAt = Date(timeIntervalSince1970: 2_000) - - let rows = PlatformDashConnectDataSource.rowsAfterConfirming(appIds: [appA], in: [], at: confirmedAt) - - XCTAssertEqual(rows.map(\.id), [appA]) - XCTAssertEqual(rows.first?.status, .active) - XCTAssertEqual(rows.first?.loginKind, .oneQR) - XCTAssertEqual(rows.first?.updatedAt, confirmedAt) - } - - /// A grant confirmed with no row saved after it, as an app terminated - /// between the two writes leaves it, gets its app's row back: when the - /// app has none, and when the row it has is a two-QR one. - func testAConfirmedGrantWithoutItsOneQRRowGetsItsRowBack() throws { - let appA = "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F" - let appB = "BbWcUA8Msi7HSgC2hCJsCtDADs2FzQVabRuHvk1tnj4d" - func grant(app: String, keyId: UInt32, identity: String = "identity") -> AppConnectGrant { - let template = Self.grant(sessionKeyId: keyId) - return AppConnectGrant( - identityId: identity, appContractId: app, documentId: nil, values: template.values, - sessionKeyId: keyId, totalBudget: nil, expiresAt: nil, publishedAt: template.publishedAt) - } - let keys = [ - Self.key(keyId: 7, data: Data(repeating: 0x07, count: 20)), - Self.key(keyId: 8, data: Data(repeating: 0x08, count: 20)), - ] - // Key 7 bound to app A as the store shows it, so an unconfirmed - // record of it would hold its key. - let bindings = [AppConnect.KeyBinding( - keyId: 7, data: Data(repeating: 0x07, count: 20), - singleContractId: try XCTUnwrap(Data.identifier(fromBase58: appA)))] - func appIds(_ grants: [AppConnectGrant], rows: [DAppConnection], keys: [ManagedIdentity.IdentityPublicKeyInfo] = keys) - -> Set { - PlatformDashConnectDataSource.appIdsWithoutTheirOneQRRow( - grants: grants, identityId: "identity", currentIdentityPublicKeys: keys, bindings: bindings, rows: rows) - } - let earlier = Date(timeIntervalSince1970: 1_000) - let twoQRRow = DAppConnection( - id: appA, name: "App A", url: "", status: .approved, updatedAt: earlier, loginKind: .twoQR) - let oneQRRow = DAppConnection( - id: appA, name: "App A", url: "", status: .active, updatedAt: earlier, loginKind: .oneQR) - - XCTAssertEqual(appIds([grant(app: appA, keyId: 7)], rows: []), [appA], "no row") - XCTAssertEqual(appIds([grant(app: appA, keyId: 7)], rows: [twoQRRow]), [appA], "a two-QR row") - XCTAssertEqual(appIds([grant(app: appA, keyId: 7)], rows: [oneQRRow]), [], "the row is there") - XCTAssertEqual( - appIds([grant(app: appA, keyId: 7), grant(app: appB, keyId: 8)], rows: [oneQRRow]), [appB], - "a later approval for another app finds the row this one lost") - - var disabled = grant(app: appA, keyId: 7) - disabled.keyDisabled = true - XCTAssertEqual(appIds([disabled], rows: []), [], "a disconnected grant") - XCTAssertEqual( - appIds([grant(app: appA, keyId: 7)], rows: [], - keys: [Self.key(keyId: 7, data: Data(repeating: 0x07, count: 20), disabledAt: 1)]), - [], "a key disabled on the identity") - XCTAssertEqual(appIds([grant(app: appA, keyId: 9)], rows: []), [], "a key the identity does not hold") - XCTAssertEqual(appIds([grant(app: appA, keyId: 7, identity: "other")], rows: []), [], "another identity") - var unconfirmed = grant(app: appA, keyId: 7) - unconfirmed.unconfirmedKeyHash160 = Data(repeating: 0x07, count: 20).toHexString() - XCTAssertTrue(AppConnect.holdsRecordedKey(unconfirmed, currentIdentityPublicKeys: keys, bindings: bindings)) - XCTAssertEqual(appIds([unconfirmed], rows: []), [], "an unconfirmed grant is left to its confirmation") - - // What the row becomes. - let rows = PlatformDashConnectDataSource.rowsAfterConfirming( - appIds: appIds([grant(app: appA, keyId: 7)], rows: [twoQRRow]), in: [twoQRRow], - at: Date(timeIntervalSince1970: 2_000)) - XCTAssertEqual(rows.map(\.status), [.active]) - XCTAssertEqual(rows.map(\.loginKind), [.oneQR]) - } - - /// What a fresh view says of an unconfirmed registration: its key live - /// under its id, an update that can never land once the identity is at - /// its revision without the key, or one that may still land. - func testAnUnconfirmedRegistrationIsSettledByItsKeyAndTheIdentityRevision() { - let hash = Data(repeating: 0x5A, count: 20) - let template = Self.grant(sessionKeyId: 9) - var pending = AppConnectGrant( - identityId: "identity", appContractId: "app", documentId: nil, values: template.values, - sessionKeyId: 9, totalBudget: 5_000, expiresAt: 6_000, publishedAt: template.publishedAt) - pending.unconfirmedKeyHash160 = hash.toHexString() - pending.submittedRevision = 4 - func outcome( - _ grant: AppConnectGrant, keys: [ManagedIdentity.IdentityPublicKeyInfo], revision: UInt64 - ) -> PlatformDashConnectDataSource.RegistrationOutcome { - PlatformDashConnectDataSource.registrationOutcome( - of: grant, currentIdentityPublicKeys: keys, identityRevision: revision) - } - - XCTAssertEqual(outcome(pending, keys: [Self.key(keyId: 9, data: hash)], revision: 4), .keyLive) - // Still at the revision the update was built on: it may land. - XCTAssertEqual(outcome(pending, keys: [], revision: 3), .mayStillLand) - // Another update took the revision, or this one landed and its key - // was turned off since. - XCTAssertEqual(outcome(pending, keys: [], revision: 4), .cannotLand) - XCTAssertEqual(outcome(pending, keys: [], revision: 7), .cannotLand) - XCTAssertEqual(outcome(pending, keys: [Self.key(keyId: 9, data: hash, disabledAt: 1)], revision: 4), .cannotLand) - // A refused submission under id 9 and a later one of the same request - // that landed under id 12: the record of the first is not that key. - XCTAssertEqual( - outcome(pending, keys: [Self.key(keyId: 9, data: Data([9])), Self.key(keyId: 12, data: hash)], revision: 5), - .cannotLand) - var unnoted = pending - unnoted.submittedRevision = nil - XCTAssertEqual(outcome(unnoted, keys: [], revision: 9), .unknownRevision) - XCTAssertEqual(outcome(unnoted, keys: [Self.key(keyId: 9, data: hash)], revision: 9), .keyLive) - } - - /// After a disable update of the disconnect has landed, a registration - /// that could still land when its keys were picked has either put its - /// key on the identity, which is then picked for disabling too, or - /// never will. - func testARegistrationThatLandedWhileTheDisconnectRanIsPickedForDisabling() throws { - let hash = Data(repeating: 0x5A, count: 20) - let template = Self.grant(sessionKeyId: 9) - var pending = AppConnectGrant( - identityId: "identity", appContractId: "app", documentId: nil, values: template.values, - sessionKeyId: 9, totalBudget: 5_000, expiresAt: 6_000, publishedAt: template.publishedAt) - pending.unconfirmedKeyHash160 = hash.toHexString() - pending.submittedRevision = 4 - func landed(keys: [ManagedIdentity.IdentityPublicKeyInfo], revision: UInt64) throws -> [UInt32] { - try PlatformDashConnectDataSource.keyIdsOfRegistrationsThatLanded( - [pending], currentIdentityPublicKeys: keys, identityRevision: revision) - } - - // Landed at 4 before the disable update, which then took 5. - XCTAssertEqual(try landed(keys: [Self.key(keyId: 9, data: hash)], revision: 5), [9]) - // The disable update took 4: the registration can never land. - XCTAssertEqual(try landed(keys: [], revision: 4), []) - // It landed and its key is off already. - XCTAssertEqual(try landed(keys: [Self.key(keyId: 9, data: hash, disabledAt: 1)], revision: 6), []) - // A node still below the disable update cannot settle it. - XCTAssertThrowsError(try landed(keys: [], revision: 3)) { error in - guard case DashConnectPlatformError.identityKeysOutOfDate = error else { - return XCTFail("unexpected error: \(error)") - } - } - } - - /// A row stays for another identity of the wallet that holds a key of - /// the app, or may still be given one by a registration with a noted - /// revision. Only that identity's own read settles the registration. - func testAnotherIdentityKeepsTheRowForItsLiveKeyOrPendingRegistration() { - let template = Self.grant(sessionKeyId: 9) - func record(identity: String, app: String = "app", unconfirmed: Bool, revision: UInt64? = 4) -> AppConnectGrant { - var grant = AppConnectGrant( - identityId: identity, appContractId: app, documentId: nil, values: template.values, - sessionKeyId: 9, totalBudget: 5_000, expiresAt: 6_000, publishedAt: template.publishedAt) - if unconfirmed { - grant.unconfirmedKeyHash160 = Data(repeating: 0x5A, count: 20).toHexString() - grant.submittedRevision = revision - } - return grant - } - func reason(_ grants: [AppConnectGrant], heldOnAnotherIdentity: Bool = false) -> String? { - PlatformDashConnectDataSource.reasonHeldElsewhere( - grants: grants, appContractId: "app", identityId: "b", - heldOnAnotherIdentity: heldOnAnotherIdentity - ).map { "\($0)" } - } - var disabled = record(identity: "a", unconfirmed: false) - disabled.keyDisabled = true - - XCTAssertNil(reason([])) - XCTAssertNil(reason([record(identity: "b", unconfirmed: true)]), "this identity's own registration") - XCTAssertNil(reason([record(identity: "a", app: "other", unconfirmed: true)])) - XCTAssertNil(reason([disabled])) - XCTAssertNil( - reason([record(identity: "a", unconfirmed: true, revision: nil)]), - "a record with no revision can never be settled, so it takes no part") - XCTAssertEqual(reason([record(identity: "a", unconfirmed: true)]), "registrationPendingOnAnotherIdentity") - XCTAssertEqual(reason([record(identity: "a", unconfirmed: false)]), "grantOnAnotherIdentity") - XCTAssertEqual(reason([], heldOnAnotherIdentity: true), "grantOnAnotherIdentity") - XCTAssertEqual( - reason([record(identity: "a", unconfirmed: true), record(identity: "c", unconfirmed: false)]), - "grantOnAnotherIdentity", "a live key comes first") - } - - /// A live key of a confirmed grant, a confirmed grant not recorded as - /// off while no two-QR login key is live, or a registration that may - /// still land makes the disconnect one-QR even over a two-QR row. - func testWhatMakesADisconnectOneQR() { - func oneQR( - row: Bool = false, live: Bool = false, unrevoked: Bool = false, twoQRKeyLive: Bool = false, - pending: Bool = false - ) -> Bool { - PlatformDashConnectDataSource.disconnectsAsOneQR( - rowIsOneQR: row, holdsLiveGrantedKey: live, holdsUnrevokedGrant: unrevoked, - holdsLiveTwoQRLoginKey: twoQRKeyLive, hasRegistrationThatMayStillLand: pending) - } - - XCTAssertFalse(oneQR(), "a two-QR row and nothing live") - XCTAssertTrue(oneQR(row: true)) - XCTAssertTrue( - oneQR(live: true, unrevoked: true, twoQRKeyLive: true), - "a confirmed grant over a two-QR row, its row write lost") - XCTAssertTrue(oneQR(unrevoked: true), "a one-QR disconnect that stopped after disabling every key") - XCTAssertFalse( - oneQR(unrevoked: true, twoQRKeyLive: true), - "a two-QR login came after the grant's key went off: the row is its") - XCTAssertTrue(oneQR(pending: true), "the one-QR disable update settles the registration") - } - - /// A two-QR row with a registration of the app whose outcome is not - /// known is not turned off locally: the disconnect goes to Platform, and - /// when that cannot be done the row stays as it was. - func testATwoQRRowWithARegistrationThatMayStillLandIsNotTurnedOffLocally() async throws { - let active = ActiveWallet("wallet-a") - let row = Self.twoQRRow(status: .active) - let (dataSource, connections) = makeScopedDataSource(active: active, rows: [row]) - let grants = UserDefaultsAppConnectResponseStore(defaults: defaults, scope: .connections(connections)) - let template = Self.grant(sessionKeyId: 9) - var pending = AppConnectGrant( - identityId: "identity", appContractId: row.id, documentId: nil, values: template.values, - sessionKeyId: 9, totalBudget: 5_000, expiresAt: 6_000, publishedAt: template.publishedAt) - pending.unconfirmedKeyHash160 = Data(repeating: 0x5A, count: 20).toHexString() - pending.submittedRevision = 4 - grants.pinned(toWalletIdHex: "wallet-a").save([pending]) - let shown = Self.shownRows(dataSource) - - do { - try await dataSource.disconnect(id: shown[0].id, scope: shown[0].scope) - XCTFail("turned off locally while the registration may still land") - } catch {} - - XCTAssertEqual(connections.load().map(\.status), [.active]) - XCTAssertEqual(connections.load().map(\.loginKind), [.twoQR]) - XCTAssertEqual(grants.pinned(toWalletIdHex: "wallet-a").load().map(\.key), [pending.key]) - } - func testDisconnectWithNoActiveWalletIsRefused() async { let active = ActiveWallet(nil) let (dataSource, _) = makeScopedDataSource(active: active) do { - try await dataSource.disconnect(id: Self.twoQRRow(status: .active).id, scope: nil) + try await dataSource.disconnect(id: Self.row(status: .active).id, scope: nil, includingUnrecorded: false) XCTFail("disconnected with no wallet") } catch { guard case DashConnectPlatformError.noWallet = error else { @@ -3134,6 +1409,18 @@ final class AppConnectLoginTests: XCTestCase { return rows } + /// The operation is not refused for being another wallet's; it may + /// still fail further on, with no wallet to sign in tests. + private static func expectNotWalletChanged( + _ operation: () async throws -> Void, file: StaticString = #filePath, line: UInt = #line + ) async { + do { + try await operation() + } catch DashConnectPlatformError.walletChanged { + XCTFail("refused as another wallet's", file: file, line: line) + } catch {} + } + private static func expectWalletChanged( _ action: () async throws -> Void, file: StaticString = #filePath, @@ -3178,7 +1465,7 @@ final class AppConnectLoginTests: XCTestCase { let dataSource = PlatformDashConnectDataSource( supportedNetwork: .testnet, store: connections, - responseStore: UserDefaultsAppConnectResponseStore(defaults: defaults, scope: .connections(connections)), + intentStore: UserDefaultsAppConnectIntentStore(defaults: defaults, scope: .connections(connections)), activeWalletIdHex: { active.idHex }, networkEndpoint: { endpoint.url }, notificationCenter: notificationCenter, @@ -3209,7 +1496,7 @@ final class AppConnectLoginTests: XCTestCase { defaults.object(forKey: "DashConnect.keptSharedProfileKeys wallet-c t identity-c"), "it runs once") } - private static func twoQRRow( + private static func row( id: String = "EWR695MsqPUuW8EnTbYzD4KybNQD5n7CUDWydJYNg63F", status: ConnectionStatus ) -> DAppConnection { @@ -3218,58 +1505,10 @@ final class AppConnectLoginTests: XCTestCase { updatedAt: Date(timeIntervalSince1970: 1_773_132_300)) } - func testAPinnedHandedInScopeDoesNotFollowItsProvider() { - var scope: String? = "scope-a" - let store = UserDefaultsAppConnectResponseStore(defaults: defaults, network: .testnet) { scope } - let grant = Self.grant(sessionKeyId: 6) - - let pinned = store.pinned(toWalletIdHex: "wallet-a") - scope = "scope-b" - pinned.save([grant]) - - XCTAssertEqual(store.load(), []) - scope = "scope-a" - XCTAssertEqual(store.load(), [grant]) - } - private static let now = Date(timeIntervalSince1970: 1_800_000_000) private static let nowMilliseconds: Int64 = 1_800_000_000_000 private static let app = Data(repeating: 0xA1, count: 32) private static let sessionKeyHash = Data(repeating: 0x11, count: 20) - private static let terms = AppConnect.SessionKeyTerms(budgetCredits: 500, lifetime: 3_600) - - /// Key 9 as the one-QR login registers it, within `terms`. - private static func sessionKey( - purpose: KeyPurpose = .authentication, - securityLevel: SecurityLevel = .high, - disabledAt: Int64? = nil, - totalBudget: UInt64? = terms.budgetCredits, - expiresAt: Int64? = nowMilliseconds + 3_600_000 - ) -> ManagedIdentity.IdentityPublicKeyInfo { - key( - keyId: 9, purpose: purpose, securityLevel: securityLevel, data: sessionKeyHash, - disabledAt: disabledAt, totalBudget: totalBudget, expiresAt: expiresAt) - } - - /// The state of the session key for `app`; by default the store shows - /// key 9 bound to it. - private static func sessionKeyState( - keys: [ManagedIdentity.IdentityPublicKeyInfo], - bindings: [AppConnect.KeyBinding] = [ - AppConnect.KeyBinding(keyId: 9, data: sessionKeyHash, singleContractId: app), - ], - grantedKeyIds: Set = [] - ) -> AppConnect.SessionKeyState { - AppConnect.sessionKeyState( - publicKeyHash160: sessionKeyHash, - currentIdentityPublicKeys: keys, - appContractId: app, - bindings: bindings, - grantedKeyIds: grantedKeyIds, - terms: terms, - now: now) - } - private static func key( keyId: Int32, purpose: KeyPurpose = .authentication, diff --git a/docs/adr/0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md b/docs/adr/0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md new file mode 100644 index 0000000000..567385ca82 --- /dev/null +++ b/docs/adr/0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md @@ -0,0 +1,56 @@ +# 0027 — Derive App Connect connections from the identity and recorded intents + +- **Status:** Proposed +- **Date:** 2026-11-09 +- **Deciders:** romchornyi (ADR author) + +## Context + +The earlier App Connect code (#1272) stored its own conclusions about Platform: grant records, +settlement states and predicted identity revisions, reconciled afterwards. Most review findings +on it came from that reconciliation: the unknown outcome of an identity update, which app a key +belongs to, and time. Platform cannot tell the wallet which app a key belongs to, so something has +to be stored, but only that. + +## Decision drivers + +- Every finding class traced back to a stored conclusion drifting from Platform. +- The user can always keep working and retry, with clear signals. +- Keys carry no app id, and an app key cannot be derived again from what is stored. + +## Considered options + +1. **Projection over intents.** Before each identity update the wallet writes a + `ConnectionIntent`: the app, the keys it submits and the response it will publish. Every row, + status and unrecorded key is computed from one read of the identity plus the intents + (`AppConnect.project`). +2. **A stored current state per connection**, moved by transitions, as #1272 did. +3. **Keep #1272** and fix its findings one by one. + +## Decision outcome + +**Chosen:** option 1. It removes the cause, stored conclusions, instead of the findings, and the +projection is pure, so table tests cover it. + +## Consequences + +**Positive** +- Rows cannot drift from Platform: a read rebuilds them. +- Retry, disconnect and a newer approval all read the same projection. + +**Negative** +- An intent lost to a reinstall, another device or a restore cannot be rebuilt: its keys show as + unrecorded and need their own handling on disconnect. +- A read projects only the active identity; access seen on another identity is kept in the row + cache (`seenOn`) and can be stale until that identity is read again. + +**Neutral** +- The stored rows stay, as a display cache rebuilt on every read. +- The intent is a stored schema: fields added later must decode as empty from older intents. +- The projection is pure and could move to a shared implementation for both wallets later. + +## Links + +- Feature summary: [docs/features/app-connect/README.md](../features/app-connect/README.md) +- Related ADR: [0009](0009-answer-app-connect-request-v2-with-wallet-derived-keys-under-wallet-limits.md) +- PR: #1301 diff --git a/docs/adr/0028-answer-app-connect-v2-only-and-remove-the-two-scan-login.md b/docs/adr/0028-answer-app-connect-v2-only-and-remove-the-two-scan-login.md new file mode 100644 index 0000000000..1044e44f8e --- /dev/null +++ b/docs/adr/0028-answer-app-connect-v2-only-and-remove-the-two-scan-login.md @@ -0,0 +1,53 @@ +# 0028 — Answer App Connect v2 only and remove the two-scan login + +- **Status:** Proposed +- **Date:** 2026-11-09 +- **Deciders:** romchornyi (ADR author) + +## Context + +The two-scan `dash-key` login (App Connect v1) and its `dash-st` key registration were in the +code but never reached a store release, only internal TestFlight builds. Keeping them meant +protecting their keys from every App Connect cleanup, which produced its own class of review +findings: how the two-scan keys are derived, lockout, and coexistence with v2. The Android wallet +answers v2 only. + +## Decision drivers + +- New connections are v2 only, as on Android. +- Nothing to migrate: no store user has a two-scan connection. + +## Considered options + +1. **Remove v1.** A v1 QR is refused when scanned, `dash-st` is taken only as a token purchase, + and the protection of two-scan keys, the approved status and the scan-to-complete banner go. +2. **Refuse v1 from protocol 14 only**, keep the v1 flow below it and protect its keys from + cleanup. + +## Decision outcome + +**Chosen:** option 1. It never shipped, and keeping it cost more than any user it served. + +## Consequences + +**Positive** +- The two-scan protection is gone, and a disconnect no longer derives two-scan keys. + +**Negative** +- Keys from old two-scan logins on testnet stay on the identity, and the wallet no longer lists + them. The two-scan login ran only below protocol 14, where a key cannot carry limits, so its + key has no expiry and is not an App Connect key (`AppConnect.isAppConnectAuthKey`). A stored + two-scan row goes on the first refresh, and Connections cannot turn its key off. This is no + worse than before, when a two-scan disconnect was local only, and it reaches only internal + testnet installs. +- The Debug mock scan still feeds a v1 QR, which is refused. + +**Neutral** +- The login choice by protocol version (ADR-0006) still decides whether App Connect is offered. + +## Links + +- Feature summary: [docs/features/app-connect/README.md](../features/app-connect/README.md) +- Related ADRs: [0006](0006-choose-the-app-connect-login-by-the-protocol-version-read-at-runtime.md), + [0009](0009-answer-app-connect-request-v2-with-wallet-derived-keys-under-wallet-limits.md) +- PR: #1301 diff --git a/docs/adr/0029-allow-a-new-app-connect-approval-while-another-is-confirming.md b/docs/adr/0029-allow-a-new-app-connect-approval-while-another-is-confirming.md new file mode 100644 index 0000000000..37eb07f056 --- /dev/null +++ b/docs/adr/0029-allow-a-new-app-connect-approval-while-another-is-confirming.md @@ -0,0 +1,45 @@ +# 0029 — Allow a new App Connect approval while another one is still confirming + +- **Status:** Proposed +- **Date:** 2026-11-09 +- **Deciders:** romchornyi (ADR author) + +## Context + +An approval whose identity update may still land shows as Confirming. The Android wallet refuses +a new approval of the same app until it settles. A stuck update can stay Confirming for a long +time. + +## Decision drivers + +- The user can always keep working. +- Two updates must never race for one key id. + +## Considered options + +1. **Allow, with key ids reserved.** The key ids an open intent may still land on are reserved + for it, so a new approval takes other ids. The new approval supersedes the pending one, which + is closed once it can never land. +2. **Block, as Android does,** until the pending update lands or is disconnected. + +## Decision outcome + +**Chosen:** option 1. + +## Consequences + +**Positive** +- A stuck Confirming row never blocks the user from signing in again. + +**Negative** +- It differs from Android on purpose. +- Making sure a superseded update can never land later may cost one more identity update. + +**Neutral** +- The pending intent stays recorded until it is closed. + +## Links + +- Feature summary: [docs/features/app-connect/README.md](../features/app-connect/README.md) +- Related ADR: [0027](0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md) +- PR: #1301 diff --git a/docs/adr/0030-show-an-app-connect-connection-whose-response-was-not-published-as-not-delivered.md b/docs/adr/0030-show-an-app-connect-connection-whose-response-was-not-published-as-not-delivered.md new file mode 100644 index 0000000000..0134ef3e9c --- /dev/null +++ b/docs/adr/0030-show-an-app-connect-connection-whose-response-was-not-published-as-not-delivered.md @@ -0,0 +1,48 @@ +# 0030 — Show an App Connect connection whose response was not published as Not delivered + +- **Status:** Proposed +- **Date:** 2026-11-09 +- **Deciders:** romchornyi (ADR author) + +## Context + +An approval registers the app's keys first and publishes the response that hands them to the app +second. When the publish fails, the keys are live on the identity but the app never got them. +Showing that as Active claims a working connection. An approval makes one attempt and does not +retry the publish; the app needs a new code. + +## Decision drivers + +- A row says what Platform and the intents show, not what the wallet hopes. +- The only useful actions are Disconnect and a new code. + +## Considered options + +1. **A Not delivered row.** An app whose live access comes only from intents with no recorded + response shows "Not delivered", with Disconnect. A response that landed without its + acknowledgement is looked up on Platform when Connections refreshes, within a day of the + request. +2. **Active**, as an ordinary connection. +3. **A three-state delivery** (delivered, not delivered, unknown) on every intent. + +## Decision outcome + +**Chosen:** option 1. + +## Consequences + +**Positive** +- The row tells the user the app holds keys it cannot use, and offers to turn them off. + +**Negative** +- A response that was published but neither acknowledged nor found by the lookup within a day + stays shown as Not delivered. + +**Neutral** +- Disconnect turns the keys off whichever way the delivery went. + +## Links + +- Feature summary: [docs/features/app-connect/README.md](../features/app-connect/README.md) +- Related ADR: [0027](0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md) +- PR: #1301 diff --git a/docs/adr/README.md b/docs/adr/README.md index febc2ead66..04c124df52 100644 --- a/docs/adr/README.md +++ b/docs/adr/README.md @@ -19,6 +19,10 @@ where they disagree, ADR-0001 wins. | [0024](0024-pin-shortcut-raw-values-and-refill-the-retired-slot.md) | Pin shortcut raw values and refill the retired slot | ui | Proposed | | | [0025](0025-remove-crowdnode-defaults-by-exact-key-list-on-activation.md) | Remove CrowdNode defaults by exact key list on activation | storage | Proposed | | | [0026](0026-retire-the-crowdnode-topic-by-marking-events-seen.md) | Retire the CrowdNode topic by marking its events seen | storage | Proposed | | +| [0027](0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md) | Derive App Connect connections from the identity and recorded intents | platform | Proposed | | +| [0028](0028-answer-app-connect-v2-only-and-remove-the-two-scan-login.md) | Answer App Connect v2 only and remove the two-scan login | platform | Proposed | | +| [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 | | Areas: `spv`, `platform`, `keys`, `storage`, `coinjoin`, `payments`, `ui`, `build`, `process`. Each ADR takes one; a new diff --git a/docs/features/app-connect/README.md b/docs/features/app-connect/README.md index 6498dbadaa..74c961ce9b 100644 --- a/docs/features/app-connect/README.md +++ b/docs/features/app-connect/README.md @@ -1,6 +1,6 @@ # DashConnect: sign in to an app with one QR -**Owner:** romchornyi · Introduced in [#1202](https://github.com/dashpay/dashwallet-ios/pull/1202); request v2 decoded in [#1204](https://github.com/dashpay/dashwallet-ios/pull/1204) and answered in [#1210](https://github.com/dashpay/dashwallet-ios/pull/1210) +**Owner:** romchornyi · Introduced in [#1202](https://github.com/dashpay/dashwallet-ios/pull/1202); request v2 decoded in [#1204](https://github.com/dashpay/dashwallet-ios/pull/1204) and answered in [#1210](https://github.com/dashpay/dashwallet-ios/pull/1210); connections derived from the identity in [#1301](https://github.com/dashpay/dashwallet-ios/pull/1301) ## Why @@ -15,12 +15,28 @@ one-scan login possible, and with it DashConnect on mainnet once mainnet runs pr - **One-QR login from protocol 14.** The wallet reads the network's protocol version before the approval sheet. From 14 it derives a session key for the request, registers it on the identity bound to the app's contract with a budget and an expiry, and publishes the encrypted key to the - App Connect system contract. Below 14 the two-scan login runs as before. + App Connect system contract. Below 14 App Connect is not offered. [ADR-0006](../../adr/0006-choose-the-app-connect-login-by-the-protocol-version-read-at-runtime.md). +- **App Connect v2 only** ([#1301](https://github.com/dashpay/dashwallet-ios/pull/1301)). The + two-scan (v1) login is removed: a v1 `dash-key` QR is refused with a message asking the app for + a new code. [ADR-0028](../../adr/0028-answer-app-connect-v2-only-and-remove-the-two-scan-login.md). +- **Connections come from the identity** ([#1301](https://github.com/dashpay/dashwallet-ios/pull/1301)). + Before each identity update the wallet records an intent: the keys it is about to add or turn + off, the app and the sealed response. The Connections rows are worked out from one read of the + identity and these intents, not stored on their own. A connection is Active, **Confirming** (its + update may still land) or **Not delivered** (its keys are live but its response was never + published). [ADR-0027](../../adr/0027-derive-app-connect-connections-from-the-identity-and-recorded-intents.md), + [ADR-0029](../../adr/0029-allow-a-new-app-connect-approval-while-another-is-confirming.md), + [ADR-0030](../../adr/0030-show-an-app-connect-connection-whose-response-was-not-published-as-not-delivered.md). - **The approval sheet shows what is approved**: what the session key can do, its budget and its lifetime. An unknown protocol version offers a retry, never an approval. -- **Disconnect is real**: it turns off the app's session keys on the identity and deletes its - responses, then removes the row. A failure keeps the row and says so. +- **Disconnect is real**: it turns off the app's keys on the identity and deletes its responses, + then removes the row. An update of the app that may still land is closed off first: the wallet + adds a key of its own at each id that update would take, then turns it off. Keys this wallet did + not record giving (another device, a restore, an orphaned DashPay profile key) are turned off + only after the user confirms. + [ADR-0031](../../adr/0031-turn-off-unattributed-dashpay-profile-keys-with-any-disconnect.md). + A failure keeps the row and says so. - **Mainnet stays off** in this change: the Connections page uses its mock data source there. - **App Connect request v2** ([#1210](https://github.com/dashpay/dashwallet-ios/pull/1210)). A `v=2` code can name up to four auth bindings (a contract, a contract group or one document type) and @@ -47,8 +63,6 @@ The later DashConnect PRs build on this one. Each of them adds its own ADRs to t - Encryption key rotation and the `dashpay://connect` carrier ([#1257](https://github.com/dashpay/dashwallet-ios/pull/1257), [#1258](https://github.com/dashpay/dashwallet-ios/pull/1258)). -- Connections derived from the identity and the recorded requests, and the removal of the two-scan - login ([#1301](https://github.com/dashpay/dashwallet-ios/pull/1301)). - The redesigned Connections page, approve sheet, expiry and disconnected apps ([#1277](https://github.com/dashpay/dashwallet-ios/pull/1277), [#1278](https://github.com/dashpay/dashwallet-ios/pull/1278),