Skip to content

Commit 6dcf89e

Browse files
chore: remove management of error from Views
1 parent e07ef83 commit 6dcf89e

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Views/MFAEnrolmentView.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ public struct MFAEnrolmentView {
7777
private func startEnrollment() {
7878
Task {
7979
isLoading = true
80-
authService.currentError = nil
8180

8281
do {
8382
let session = try await authService.startMfaEnrollment(
@@ -98,7 +97,6 @@ public struct MFAEnrolmentView {
9897

9998
Task {
10099
isLoading = true
101-
authService.currentError = nil
102100

103101
do {
104102
let verificationId = try await authService.sendSmsVerificationForEnrollment(
@@ -129,7 +127,6 @@ public struct MFAEnrolmentView {
129127

130128
Task {
131129
isLoading = true
132-
authService.currentError = nil
133130

134131
do {
135132
let code = session.type == .sms ? verificationCode : totpCode
@@ -158,7 +155,6 @@ public struct MFAEnrolmentView {
158155
verificationCode = ""
159156
totpCode = ""
160157
displayName = ""
161-
authService.currentError = nil
162158
focus = nil
163159
}
164160

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Views/MFAManagementView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public struct MFAManagementView {
4444
private func unenrollFactor(_ factorUid: String) {
4545
Task {
4646
isLoading = true
47-
authService.currentError = nil
4847

4948
do {
5049
let freshFactors = try await authService.unenrollMFA(factorUid)

FirebaseSwiftUI/FirebaseAuthSwiftUI/Sources/Views/MFAResolutionView.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public struct MFAResolutionView {
6666

6767
Task {
6868
isLoading = true
69-
authService.currentError = nil
7069

7170
do {
7271
let verificationId = try await authService.resolveSmsChallenge(hintIndex: selectedHintIndex)
@@ -81,7 +80,6 @@ public struct MFAResolutionView {
8180
private func completeResolution() {
8281
Task {
8382
isLoading = true
84-
authService.currentError = nil
8583

8684
do {
8785
let code = selectedHint?.isPhoneHint == true ? verificationCode : totpCode

0 commit comments

Comments
 (0)