Skip to content

Commit 0ba1e3a

Browse files
remove CAN_REMOVE_DUPLICATES_CUSTOMER_SHEET_VALUE
1 parent d3fc470 commit 0ba1e3a

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

paymentsheet/src/main/java/com/stripe/android/customersheet/StripeCustomerAdapter.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import com.stripe.android.common.coroutines.CoalescingOrchestrator
55
import com.stripe.android.common.exception.stripeErrorMessage
66
import com.stripe.android.core.injection.IOContext
77
import com.stripe.android.customersheet.CustomerAdapter.PaymentOption.Companion.toPaymentOption
8-
import com.stripe.android.lpmfoundations.paymentmethod.CAN_REMOVE_DUPLICATES_CUSTOMER_SHEET_VALUE
98
import com.stripe.android.model.PaymentMethod
109
import com.stripe.android.model.PaymentMethodUpdateParams
1110
import com.stripe.android.paymentsheet.PaymentSheet
@@ -115,7 +114,7 @@ internal class StripeCustomerAdapter @Inject internal constructor(
115114
customerSessionClientSecret = null,
116115
),
117116
paymentMethodId = paymentMethodId,
118-
canRemoveDuplicates = CAN_REMOVE_DUPLICATES_CUSTOMER_SHEET_VALUE,
117+
canRemoveDuplicates = false,
119118
).getOrElse {
120119
return CustomerAdapter.Result.failure(
121120
cause = it,

paymentsheet/src/main/java/com/stripe/android/customersheet/data/CustomerSessionPaymentMethodDataSource.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.stripe.android.customersheet.data
33
import com.stripe.android.core.injection.IOContext
44
import com.stripe.android.customersheet.util.filterToSupportedPaymentMethods
55
import com.stripe.android.customersheet.util.getDefaultPaymentMethodsEnabledForCustomerSheet
6-
import com.stripe.android.lpmfoundations.paymentmethod.CAN_REMOVE_DUPLICATES_CUSTOMER_SHEET_VALUE
76
import com.stripe.android.model.PaymentMethod
87
import com.stripe.android.model.PaymentMethodUpdateParams
98
import com.stripe.android.payments.core.analytics.ErrorReporter
@@ -71,7 +70,7 @@ internal class CustomerSessionPaymentMethodDataSource @Inject constructor(
7170
ephemeralKeySecret = ephemeralKey.ephemeralKey,
7271
customerSessionClientSecret = ephemeralKey.customerSessionClientSecret,
7372
),
74-
canRemoveDuplicates = CAN_REMOVE_DUPLICATES_CUSTOMER_SHEET_VALUE,
73+
canRemoveDuplicates = true,
7574
paymentMethodId = paymentMethodId,
7675
).getOrThrow()
7776
}.toCustomerSheetDataResult()

paymentsheet/src/main/java/com/stripe/android/lpmfoundations/paymentmethod/CustomerMetadata.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import com.stripe.android.customersheet.data.CustomerSheetSession
77
import com.stripe.android.model.ElementsSession
88
import kotlinx.parcelize.Parcelize
99

10-
internal const val CAN_REMOVE_DUPLICATES_CUSTOMER_SHEET_VALUE = true
11-
1210
@Parcelize
1311
internal data class CustomerMetadata(
1412
val hasCustomerConfiguration: Boolean,
@@ -78,7 +76,7 @@ internal data class CustomerMetadata(
7876
return Permissions(
7977
canRemovePaymentMethods = customerSheetSession.permissions.canRemovePaymentMethods,
8078
canRemoveLastPaymentMethod = configuration.allowsRemovalOfLastSavedPaymentMethod,
81-
canRemoveDuplicates = CAN_REMOVE_DUPLICATES_CUSTOMER_SHEET_VALUE,
79+
canRemoveDuplicates = true,
8280
)
8381
}
8482

0 commit comments

Comments
 (0)