-
Notifications
You must be signed in to change notification settings - Fork 665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block disallowed brands in PAN field #9471
Conversation
Diffuse output:
APK
DEX
|
payments-ui-core/src/main/java/com/stripe/android/ui/core/elements/CardDetailsController.kt
Outdated
Show resolved
Hide resolved
payments-ui-core/src/test/java/com/stripe/android/ui/core/elements/CardNumberConfigTest.kt
Outdated
Show resolved
Hide resolved
payments-ui-core/src/main/java/com/stripe/android/ui/core/elements/CardNumberConfig.kt
Outdated
Show resolved
Hide resolved
@@ -521,7 +521,7 @@ internal class CardNumberControllerTest { | |||
} | |||
|
|||
@Parcelize | |||
private class FakeCardBrandFilter( | |||
class FakeCardBrandFilter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably bump this out to it's own file, since it's public now.
...c/test/java/com/stripe/android/paymentsheet/ui/DefaultEditPaymentMethodViewInteractorTest.kt
Outdated
Show resolved
Hide resolved
...c/test/java/com/stripe/android/paymentsheet/ui/DefaultEditPaymentMethodViewInteractorTest.kt
Show resolved
Hide resolved
2 builds increased size, 1 build decreased size
Stripe Identity Example 20.52.1-theme1 (20)
|
Item | Install Size Change | Download Size Change |
---|---|---|
🗑 androidx.compose.ui.text.android.PaintExtensionsKt | ⬇️ -23.2 kB | ⬇️ -11.2 kB |
androidx.compose.ui.input.key.KeyEvent_androidKt | ⬆️ 20.7 kB | ⬆️ 10.0 kB |
🗑 kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt | ⬇️ -19.0 kB | ⬇️ -9.1 kB |
kotlin.math.MathKt | ⬇️ -18.0 kB | ⬇️ -8.7 kB |
androidx.camera.core.impl.utils.MainThreadAsyncHandler | ⬇️ -16.9 kB | ⬇️ -8.2 kB |
Financial Connections Example 20.52.1 (205201)
com.stripe.android.financialconnections.example
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 3.4 kB (0.04%)
Total download size change: ⬆️ 4.2 kB (0.1%)
Largest size changes
Item | Install Size Change | Download Size Change |
---|---|---|
🗑 _COROUTINE | ⬇️ -60.4 kB | ⬇️ -28.5 kB |
📝 com.stripe.android.financialconnections.features.linkaccountpicke... | ⬆️ 53.2 kB | ⬆️ 25.2 kB |
🗑 com.stripe.android.model.parsers.Stripe3ds2AuthResultJsonParser$A... | ⬇️ -52.9 kB | ⬇️ -25.0 kB |
🗑 com.stripe.android.model.parsers.SourceCardDataJsonParser | ⬇️ -43.8 kB | ⬇️ -20.7 kB |
kotlin.collections.SetsKt | ⬇️ -38.6 kB | ⬇️ -18.2 kB |
PaymentSheet Example 20.52.1 (11)
com.stripe.android.paymentsheet.example
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 244.0 kB (1.51%)
Total download size change: ⬆️ 118.7 kB (1.39%)
Largest size changes
Item | Install Size Change | Download Size Change |
---|---|---|
📝 com.stripe.android.paymentsheet.ui.PaymentSheetScreenKt | ⬆️ 41.6 kB | ⬆️ 19.0 kB |
🗑 com.stripe.android.stripecardscan.framework.ResourceFetcher | ⬇️ -40.9 kB | ⬇️ -18.7 kB |
androidx.camera.core.impl.utils.executor.MainThreadExecutor | ⬇️ -39.6 kB | ⬇️ -18.1 kB |
com.stripe.android.stripecardscan.payment.ml.CardDetectModelManag... | ⬆️ 38.0 kB | ⬆️ 17.4 kB |
com.google.android.gms.dynamite.zzb | ⬇️ -36.3 kB | ⬇️ -16.6 kB |
🛸 Powered by Emerge Tools
Comment trigger: Size diff threshold of 100.00kB exceeded
@@ -477,7 +477,11 @@ internal class CardNumberControllerTest { | |||
cardBrandFilter: CardBrandFilter = DefaultCardBrandFilter | |||
): DefaultCardNumberController { | |||
return DefaultCardNumberController( | |||
cardTextFieldConfig = CardNumberConfig(), | |||
cardTextFieldConfig = CardNumberConfig( | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the linter fails if I don't add that actually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok nvm I guess it doesn't. Fixed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last nit, if you don't mind fixing.
* Filter card brands in PAN field * Add some tests * Update strings.xml * Add some buffer for CBC edge case * Filter out card brands in update dropdown * Delete newline and rename to isCardBrandChoiceEligible * Throw exception in test * Create FakeCardBrandFilter test * Add import * Test existing tests w/ CBC flag * Add a test when using DefaultCardBrandFilter * Update CardNumberControllerTest.kt
Summary
Motivation
Testing
Screenshots
Changelog
N/A