diff --git a/firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardSettingsViewModel.swift b/firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardSettingsViewModel.swift index 744578045f75..1e6430a4807e 100644 --- a/firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardSettingsViewModel.swift +++ b/firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardSettingsViewModel.swift @@ -25,8 +25,8 @@ class CreditCardSettingsViewModel { var appAuthenticator: AppAuthenticationProtocol? lazy var cardInputViewModel = CreditCardInputViewModel(profile: profile) + lazy var toggleModel = ToggleModel(isEnabled: isAutofillEnabled, delegate: self) var tableViewModel = CreditCardTableViewModel() - var toggleModel: ToggleModel! public init(profile: Profile, windowUUID: WindowUUID, @@ -37,7 +37,7 @@ class CreditCardSettingsViewModel { guard let profile = profile as? BrowserProfile else { return } self.autofill = profile.autofill self.appAuthenticator = appAuthenticator - self.toggleModel = ToggleModel(isEnabled: isAutofillEnabled, delegate: self) + tableViewModel.toggleModel = toggleModel }