Signal-iOS/SignalServiceKit/src/TestUtils/FakeAccountServiceClient.swift
Jordan Rose 8a29fdd71c Store the local PNI alongside the local ACI and phone number
Save the PNI after registration and when verifying or updating our
current phone number. (Also, show it in the Internal settings like the
phone number and ACI.)
2022-03-14 12:59:44 -07:00

42 lines
1.3 KiB
Swift

//
// Copyright (c) 2022 Open Whisper Systems. All rights reserved.
//
import Foundation
@objc
public class FakeAccountServiceClient: AccountServiceClient {
@objc
public override init() {}
// MARK: - Public
public override func requestPreauthChallenge(e164: String, pushToken: String, isVoipToken: Bool) -> Promise<Void> {
return Promise { $0.resolve() }
}
public override func requestVerificationCode(e164: String, preauthChallenge: String?, captchaToken: String?, transport: TSVerificationTransport) -> Promise<Void> {
return Promise { $0.resolve() }
}
public override func getPreKeysCount() -> Promise<Int> {
return Promise { $0.resolve(0) }
}
public override func setPreKeys(identityKey: IdentityKey, signedPreKeyRecord: SignedPreKeyRecord, preKeyRecords: [PreKeyRecord]) -> Promise<Void> {
return Promise { $0.resolve() }
}
public override func setSignedPreKey(_ signedPreKey: SignedPreKeyRecord) -> Promise<Void> {
return Promise { $0.resolve() }
}
public override func updatePrimaryDeviceAccountAttributes() -> Promise<Void> {
return Promise { $0.resolve() }
}
public override func getAccountWhoAmI() -> Promise<WhoAmIResponse> {
return Promise { $0.resolve(WhoAmIResponse(aci: UUID(), pni: UUID(), e164: nil)) }
}
}