diff --git a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePINEditText.kt b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePINEditText.kt index 947e363f..3807f110 100644 --- a/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePINEditText.kt +++ b/forage-android/src/main/java/com/joinforage/forage/android/ecom/ui/ForagePINEditText.kt @@ -13,7 +13,7 @@ import com.joinforage.forage.android.core.ui.VaultWrapper import com.joinforage.forage.android.core.ui.element.ForageConfig import com.joinforage.forage.android.core.ui.element.ForagePinElement import com.joinforage.forage.android.ecom.ui.vault.bt.BTVaultWrapper -import com.joinforage.forage.android.ecom.ui.vault.vgs.VGSVaultWrapper +import com.joinforage.forage.android.ecom.ui.vault.forage.ForageVaultWrapper import com.launchdarkly.sdk.android.LDConfig /** @@ -56,7 +56,7 @@ class ForagePINEditText @JvmOverloads constructor( defStyleAttr: Int = R.attr.foragePanEditTextStyle ) : ForagePinElement(context, attrs, defStyleAttr) { private val btVaultWrapper: BTVaultWrapper - private val vgsVaultWrapper: VGSVaultWrapper + private val forageVaultWrapper: ForageVaultWrapper override fun showKeyboard() = vault.showKeyboard() @@ -73,10 +73,10 @@ class ForagePINEditText @JvmOverloads constructor( // and are thus able to initial LaunchDarkly and find out // whether to use BT or VGS. So, below we are hedging. btVaultWrapper = BTVaultWrapper(context, attrs, defStyleAttr) - vgsVaultWrapper = VGSVaultWrapper(context, attrs, defStyleAttr) + forageVaultWrapper = ForageVaultWrapper(context, attrs, defStyleAttr) // ensure all wrappers init with the // same typeface (or the attributes) - btVaultWrapper.typeface = vgsVaultWrapper.typeface + forageVaultWrapper.typeface = btVaultWrapper.typeface } finally { recycle() } @@ -91,21 +91,19 @@ class ForagePINEditText @JvmOverloads constructor( // decide on a vault provider and the corresponding vault wrapper val vaultType = LDManager.getVaultProvider(logger) - return if (vaultType == VaultType.BT_VAULT_TYPE) { - btVaultWrapper + return if (vaultType == VaultType.FORAGE_VAULT_TYPE) { + forageVaultWrapper } else { - // TODO: Update this to the ForageVaultWrapper once it's back in this codebase - // https://linear.app/joinforage/issue/FX-1368/re-introduce-the-foragevaultwrapper-into-the-coreui-module-in-the - vgsVaultWrapper + btVaultWrapper } } override var typeface: Typeface? - get() = if (vault == btVaultWrapper) btVaultWrapper.typeface else vgsVaultWrapper.typeface + get() = if (vault == btVaultWrapper) btVaultWrapper.typeface else forageVaultWrapper.typeface set(value) { // keep all vault providers in sync regardless of // whether they were added to the UI btVaultWrapper.typeface = value - vgsVaultWrapper.typeface = value + forageVaultWrapper.typeface = value } }