stripe / stripe-android

Stripe Android SDK
https://stripe.com/docs/mobile/android
MIT License
1.23k stars 628 forks source link

Display correct saved payment method selection after going back from add payment method screen #8701

Open amk-stripe opened 4 days ago

amk-stripe commented 4 days ago

Summary

Display correct saved payment method selection after going back from add payment method screen

Motivation

This is the intended behavior

Testing

No tests bc this logic is all in BaseSheetViewModel :(

Screen recordings

Before:

https://github.com/stripe/stripe-android/assets/160939932/6518285f-acdb-423c-941c-8947ed6c2f03

After:

https://github.com/stripe/stripe-android/assets/160939932/d8265dd1-794b-4ffc-b376-f37f19ec2255

github-actions[bot] commented 4 days ago

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)

          │            compressed            │           uncompressed           
          ├─────────────┬─────────────┬──────┼─────────────┬─────────────┬──────
 APK      │ old         │ new         │ diff │ old         │ new         │ diff 
──────────┼─────────────┼─────────────┼──────┼─────────────┼─────────────┼──────
      dex │       2 MiB │       2 MiB │  0 B │     4.2 MiB │     4.2 MiB │  0 B 
     arsc │ 1,023.8 KiB │ 1,023.8 KiB │  0 B │ 1,023.7 KiB │ 1,023.7 KiB │  0 B 
 manifest │     2.3 KiB │     2.3 KiB │  0 B │       8 KiB │       8 KiB │  0 B 
      res │   301.5 KiB │   301.5 KiB │  0 B │     455 KiB │     455 KiB │  0 B 
   native │     6.2 MiB │     6.2 MiB │  0 B │    15.8 MiB │    15.8 MiB │  0 B 
    asset │     6.7 KiB │     6.7 KiB │  0 B │     6.5 KiB │     6.5 KiB │  0 B 
    other │    85.5 KiB │    85.5 KiB │ -1 B │   158.7 KiB │   158.7 KiB │  0 B 
──────────┼─────────────┼─────────────┼──────┼─────────────┼─────────────┼──────
    total │     9.6 MiB │     9.6 MiB │ -1 B │    21.6 MiB │    21.6 MiB │  0 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 21305 │ 21305 │ 0 (+0 -0) 
   types │  6770 │  6770 │ 0 (+0 -0) 
 classes │  5559 │  5559 │ 0 (+0 -0) 
 methods │ 31121 │ 31121 │ 0 (+0 -0) 
  fields │ 18141 │ 18141 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  164 │  164 │  0   
 entries │ 3392 │ 3392 │  0
APK ``` compressed │ uncompressed │ ──────────┬──────┼───────────┬──────┤ size │ diff │ size │ diff │ path ──────────┼──────┼───────────┼──────┼──────────────────────── 25.1 KiB │ +5 B │ 62.5 KiB │ 0 B │ ∆ META-INF/MANIFEST.MF 28.3 KiB │ -4 B │ 62.6 KiB │ 0 B │ ∆ META-INF/CERT.SF 1.2 KiB │ -2 B │ 1.2 KiB │ 0 B │ ∆ META-INF/CERT.RSA ──────────┼──────┼───────────┼──────┼──────────────────────── 54.6 KiB │ -1 B │ 126.3 KiB │ 0 B │ (total) ```
amk-stripe commented 4 days ago

cc @wooj-stripe I believe you brought this up in the CVC recollection bug bash. Here's the fix!

amk-stripe commented 3 days ago

Hm I realized that this isn't the right solution, because we could also have Link or Google Pay selected on this screen