From 937a9cba9801147ea900368ebcdf16e2e35b08e5 Mon Sep 17 00:00:00 2001 From: Natthawut Haematulin Date: Thu, 21 Sep 2023 16:03:48 +0700 Subject: [PATCH] fix: revise enabling submit button --- sdk/src/main/java/co/omise/android/ui/CreditCardActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/src/main/java/co/omise/android/ui/CreditCardActivity.kt b/sdk/src/main/java/co/omise/android/ui/CreditCardActivity.kt index 74554aa19..e13897987 100644 --- a/sdk/src/main/java/co/omise/android/ui/CreditCardActivity.kt +++ b/sdk/src/main/java/co/omise/android/ui/CreditCardActivity.kt @@ -276,7 +276,7 @@ class CreditCardActivity : OmiseActivity() { private fun updateSubmitButton() { val isFormValid = editTexts.filterKeys { - if (!isBillingAddressRequired()) !billingAddressEditTexts.contains(it) + if (!isBillingAddressRequired()) !billingAddressEditTexts.containsKey(it) else true }.map { (editText, _) -> editText.isValid }.reduce { acc, b -> acc && b } submitButton.isEnabled = isFormValid