@@ -41,7 +41,6 @@ import org.wordpress.android.fluxc.persistence.entity.WCSettingsModel
4141import org.wordpress.android.fluxc.store.SiteStore.FetchSitesPayload
4242import org.wordpress.android.fluxc.store.SiteStore.OnSiteChanged
4343import org.wordpress.android.fluxc.tools.CoroutineEngine
44- import org.wordpress.android.fluxc.utils.PreferenceUtils
4544import org.wordpress.android.fluxc.utils.WCCurrencyUtils
4645import org.wordpress.android.util.AppLog
4746import org.wordpress.android.util.AppLog.T
@@ -109,23 +108,6 @@ open class WooCommerceStore @Inject internal constructor(
109108
110109 @Suppress(" ReturnCount" )
111110 suspend fun fetchWooCommerceSite (site : SiteModel ): WooResult <SiteModel > {
112- // Check if the site supports application passwords or not
113- // TODO remove this check after finishing the application passwords experiment
114- suspend fun fetchAppPasswordsSupportIfNeeded (site : SiteModel ) {
115- val sharedPrefs = PreferenceUtils .getFluxCPreferences(appContext)
116- val sharedPrefKey = " application_passwords_check_done"
117- val checkDone = sharedPrefs.getBoolean(sharedPrefKey, false )
118- if (site.applicationPasswordsAuthorizeUrl != null || checkDone) return
119-
120- fetchSupportedApiVersion(site, false ).let {
121- if (! it.isError) {
122- sharedPrefs.edit()
123- .putBoolean(sharedPrefKey, true )
124- .apply ()
125- }
126- }
127- }
128-
129111 val fetchResult = siteStore.fetchSite(site)
130112
131113 val updatedSite = withContext(Dispatchers .IO ) {
@@ -142,8 +124,6 @@ open class WooCommerceStore @Inject internal constructor(
142124 emitChange(OnSiteChanged (1 , listOf (updatedSite)))
143125 }
144126
145- fetchAppPasswordsSupportIfNeeded(updatedSite)
146-
147127 return WooResult (updatedSite)
148128 }
149129
0 commit comments