Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 53669e0

Browse files
committed
Remove unused updateLoginFields methods from LoginViewController
1 parent a78ed0d commit 53669e0

File tree

2 files changed

+1
-24
lines changed

2 files changed

+1
-24
lines changed

WordPressAuthenticator/Signin/LoginViewController.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -422,24 +422,6 @@ extension LoginViewController {
422422
loginFacade.loginToWordPressDotCom(withSocialIDToken: token, service: SocialServiceName.apple.rawValue)
423423
}
424424

425-
/// Updates the LoginFields structure, with the specified Google User + Token + Email.
426-
///
427-
func updateLoginFields(googleUser: GIDGoogleUser, googleToken: String, googleEmail: String) {
428-
updateLoginFields(
429-
email: googleEmail,
430-
username: googleEmail,
431-
fullName: googleUser.profile?.name ?? "",
432-
googleToken: googleToken
433-
)
434-
}
435-
436-
func updateLoginFields(email: String, username: String, fullName: String, googleToken: String) {
437-
loginFields.emailAddress = email
438-
loginFields.username = email
439-
loginFields.meta.socialServiceIDToken = googleToken
440-
loginFields.meta.googleUser = SocialService.User(email: email, fullName: fullName)
441-
}
442-
443425
// Used by SIWA when logging with with a passwordless, 2FA account.
444426
//
445427
func socialNeedsMultifactorCode(forUserID userID: Int, andNonceInfo nonceInfo: SocialLogin2FANonceInfo) {

WordPressAuthenticatorTests/SingIn/LoginViewControllerTests.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,7 @@ class LoginViewControllerTests: XCTestCase {
2121
// navigationController property to not be nil.
2222
_ = UINavigationController(rootViewController: sut)
2323

24-
sut.updateLoginFields(
25-
26-
username: "username",
27-
fullName: "Full Name",
28-
googleToken: "abcd"
29-
)
24+
sut.loginFields.meta.googleUser = SocialService.User(email: "[email protected]", fullName: "Full Name")
3025

3126
sut.showSignupEpilogue(for: AuthenticatorCredentials())
3227

0 commit comments

Comments
 (0)