Skip to content
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

fix postal code callback not firing when enabled #4875

Merged
merged 3 commits into from
Apr 15, 2022

Conversation

skyler-stripe
Copy link
Contributor

@skyler-stripe skyler-stripe commented Apr 15, 2022

Summary

The postal code field in CardInputWidget was only firing when PostalCode is required but it should be fired when it is enabled too. In all situations an enabled postal code field should be firing the callback.

Motivation

Testing

  • Added tests
  • Modified tests
  • Manually verified

Changelog

  • added

@github-actions
Copy link
Contributor

github-actions bot commented Apr 15, 2022

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: none)
NEW: paymentsheet-example-release-pr.apk (signature: none)

          │           compressed           │          uncompressed          
          ├───────────┬───────────┬────────┼───────────┬───────────┬────────
 APK      │ old       │ new       │ diff   │ old       │ new       │ diff   
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
      dex │  13.2 MiB │  13.2 MiB │  -28 B │  44.2 MiB │  44.2 MiB │  +72 B 
     arsc │   1.6 MiB │   1.6 MiB │    0 B │   1.6 MiB │   1.6 MiB │    0 B 
 manifest │   2.9 KiB │   2.9 KiB │    0 B │  12.3 KiB │  12.3 KiB │    0 B 
      res │ 675.7 KiB │ 675.7 KiB │    0 B │   1.1 MiB │   1.1 MiB │    0 B 
    asset │  79.4 KiB │  78.9 KiB │ -525 B │ 108.9 KiB │ 108.4 KiB │ -525 B 
    other │  80.3 KiB │  80.3 KiB │   -6 B │ 154.9 KiB │ 154.9 KiB │    0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
    total │  15.6 MiB │  15.6 MiB │ -559 B │  47.1 MiB │  47.1 MiB │ -453 B 

         │          raw           │             unique             
         ├────────┬────────┬──────┼────────┬────────┬──────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff         
─────────┼────────┼────────┼──────┼────────┼────────┼──────────────
   files │      3 │      3 │    0 │        │        │              
 strings │ 213208 │ 213209 │   +1 │ 188030 │ 188031 │ +1 (+19 -18) 
   types │  36823 │  36823 │    0 │  34234 │  34234 │  0 (+1 -1)   
 classes │  31659 │  31659 │    0 │  31659 │  31659 │  0 (+1 -1)   
 methods │ 189834 │ 189835 │   +1 │ 183912 │ 183913 │ +1 (+10 -9)  
  fields │ 130661 │ 130661 │    0 │ 129821 │ 129821 │  0 (+1 -1)   

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  292 │  292 │  0   
 entries │ 5593 │ 5593 │  0
APK
    compressed    │   uncompressed    │                                                       
─────────┬────────┼──────────┬────────┤                                                       
 size    │ diff   │ size     │ diff   │ path                                                  
─────────┼────────┼──────────┼────────┼───────────────────────────────────────────────────────
   7 KiB │ -525 B │  6.9 KiB │ -525 B │ ∆ assets/dexopt/baseline.prof                         
 3.5 MiB │  -28 B │ 10.2 MiB │  +72 B │ ∆ classes3.dex                                        
   192 B │   -6 B │     14 B │    0 B │ ∆ META-INF/androidx.activity_activity-compose.version 
─────────┼────────┼──────────┼────────┼───────────────────────────────────────────────────────
 3.6 MiB │ -559 B │ 10.2 MiB │ -453 B │ (total)
DEX
STRINGS:

   old    │ new    │ diff         
  ────────┼────────┼──────────────
   188030 │ 188031 │ +1 (+19 -18) 
  + _r8_lambda_MLboqMGtviEWm_0A0E2_jv50Nds
  + _r8_lambda_e1MWHC6oLETz60D8kz2pA2q0ZmM
  + Lcom/stripe/android/view/CardInputWidget_initView_lambda-31__inlined_doAfterTextChanged_1;
  + SMAP
  CardInputWidget.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget
  + 2 Delegates.kt
  kotlin/properties/Delegates
  + 3 fake.kt
  kotlin/jvm/internal/FakeKt
  + 4 _Collections.kt
  kotlin/collections/CollectionsKt___CollectionsKt
  + 5 View.kt
  androidx/core/view/ViewKt
  + 6 Context.kt
  androidx/core/content/ContextKt
  + 7 TextView.kt
  androidx/core/widget/TextViewKt
  *L
  1#1,1261:1
  33#2,3:1262
  33#2,3:1265
  33#2,3:1268
  1#3:1271
  764#4:1272
  855#4,2:1273
  1849#4,2:1275
  1849#4,2:1277
  1849#4,2:1279
  1741#4,3:1281
  1849#4,2:1284
  1849#4,2:1286
  1720#4,3:1288
  1849#4,2:1304
  1849#4:1306
  1850#4:1333
  1849#4,2:1343
  321#5,4:1291
  52#6,9:1295
  52#6,9:1334
  58#7,23:1307
  93#7,3:1330
  *S KotlinDebug
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget
  *L
  283#1:1262,3
  315#1:1265,3
  327#1:1268,3
  231#1:1272
  231#1:1273,2
  232#1:1275,2
  388#1:1277,2
  392#1:1279,2
  462#1:1281,3
  466#1:1284,2
  475#1:1286,2
  514#1:1288,3
  714#1:1304,2
  784#1:1306
  784#1:1333
  972#1:1343,2
  656#1:1291,4
  691#1:1295,9
  839#1:1334,9
  785#1:1307,23
  785#1:1330,3
  *E
  
  + SMAP
  CardInputWidget.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_CardNumberSlideEndAnimation
  + 2 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,1261:1
  321#2,4:1262
  *S KotlinDebug
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_CardNumberSlideEndAnimation
  *L
  1137#1:1262,4
  *E
  
  + SMAP
  CardInputWidget.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_CardNumberSlideStartAnimation
  + 2 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,1261:1
  321#2,4:1262
  *S KotlinDebug
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_CardNumberSlideStartAnimation
  *L
  1063#1:1262,4
  *E
  
  + SMAP
  CardInputWidget.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_CvcSlideEndAnimation
  + 2 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,1261:1
  321#2,4:1262
  *S KotlinDebug
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_CvcSlideEndAnimation
  *L
  1165#1:1262,4
  *E
  
  + SMAP
  CardInputWidget.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_CvcSlideStartAnimation
  + 2 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,1261:1
  321#2,4:1262
  *S KotlinDebug
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_CvcSlideStartAnimation
  *L
  1091#1:1262,4
  *E
  
  + SMAP
  CardInputWidget.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_ExpiryDateSlideEndAnimation
  + 2 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,1261:1
  321#2,4:1262
  *S KotlinDebug
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_ExpiryDateSlideEndAnimation
  *L
  1150#1:1262,4
  *E
  
  + SMAP
  CardInputWidget.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_ExpiryDateSlideStartAnimation
  + 2 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,1261:1
  321#2,4:1262
  *S KotlinDebug
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_ExpiryDateSlideStartAnimation
  *L
  1076#1:1262,4
  *E
  
  + SMAP
  CardInputWidget.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_PostalCodeSlideEndAnimation
  + 2 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,1261:1
  321#2,4:1262
  *S KotlinDebug
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_PostalCodeSlideEndAnimation
  *L
  1182#1:1262,4
  *E
  
  + SMAP
  CardInputWidget.kt
  Kotlin
  *S Kotlin
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_PostalCodeSlideStartAnimation
  + 2 View.kt
  androidx/core/view/ViewKt
  *L
  1#1,1261:1
  321#2,4:1262
  *S KotlinDebug
  *F
  + 1 CardInputWidget.kt
  com/stripe/android/view/CardInputWidget_PostalCodeSlideStartAnimation
  *L
  1108#1:1262,4
  *E
  
  + SMAP
  Delegates.kt
  Kotlin
  *S Kotlin
  *F
  
...✂

@skyler-stripe skyler-stripe merged commit b1614d5 into master Apr 15, 2022
@skyler-stripe skyler-stripe deleted the fixPostalCallback branch April 15, 2022 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants