From 7e4a6ab0a96bc747269f93c5d4ed0c076a3bd830 Mon Sep 17 00:00:00 2001 From: Josue Date: Wed, 14 Dec 2022 13:31:55 -0600 Subject: [PATCH] making card details set private --- .../main/java/com/basistheory/android/view/CardNumberElement.kt | 1 + .../com/basistheory/android/view/CardVerificationCodeElement.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/main/java/com/basistheory/android/view/CardNumberElement.kt b/lib/src/main/java/com/basistheory/android/view/CardNumberElement.kt index 3ec811f3..729904e7 100644 --- a/lib/src/main/java/com/basistheory/android/view/CardNumberElement.kt +++ b/lib/src/main/java/com/basistheory/android/view/CardNumberElement.kt @@ -15,6 +15,7 @@ class CardNumberElement @JvmOverloads constructor( defStyleAttr: Int = 0) : TextElement(context, attrs, defStyleAttr) { var cardDetails: CardBrandEnricher.CardDetails? = null + private set private val cardBrandEnricher: CardBrandEnricher = CardBrandEnricher() diff --git a/lib/src/main/java/com/basistheory/android/view/CardVerificationCodeElement.kt b/lib/src/main/java/com/basistheory/android/view/CardVerificationCodeElement.kt index ae3eeb34..9f74502b 100644 --- a/lib/src/main/java/com/basistheory/android/view/CardVerificationCodeElement.kt +++ b/lib/src/main/java/com/basistheory/android/view/CardVerificationCodeElement.kt @@ -13,7 +13,7 @@ class CardVerificationCodeElement @JvmOverloads constructor( set(value) { field = value - if (value != null) { + if (value != null && cardNumberElement != value) { super.mask = field?.cardDetails?.cvcMask?.toList() ?: defaultMask field?.addChangeEventListener { updateMask() } }