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

Link Cvc & Expiry recollection VM #9882

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toluo-stripe
Copy link
Contributor

Summary

Motivation

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

@@ -23,7 +30,11 @@ internal data class WalletUiState(
val isExpired = card?.isExpired ?: false
val requiresCvcRecollection = card?.cvcCheck?.requiresRecollection ?: false

val disableButton = isExpired || requiresCvcRecollection
val isMissingExpiryDateInput = (expiryDateInput.isComplete && cvcInput.isComplete).not()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The isMissingExpiryDateInput check appears to have an unintended dependency on cvcInput.isComplete. For validating expiry date input, the condition should be simplified to expiryDateInput.isComplete.not() since the CVC completion state is handled separately by isMissingCvcInput.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expired cards requires both updated expiryDate and cvc

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: V1, V2)
NEW: paymentsheet-example-release-pr.apk (signature: V1, V2)

          │            compressed            │          uncompressed          
          ├───────────┬───────────┬──────────┼──────────┬──────────┬──────────
 APK      │ old       │ new       │ diff     │ old      │ new      │ diff     
──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼──────────
      dex │   3.9 MiB │   3.9 MiB │ +1.7 KiB │  8.6 MiB │  8.6 MiB │ +6.6 KiB 
     arsc │   2.3 MiB │   2.3 MiB │      0 B │  2.3 MiB │  2.3 MiB │      0 B 
 manifest │     5 KiB │     5 KiB │      0 B │ 24.9 KiB │ 24.9 KiB │      0 B 
      res │ 908.4 KiB │ 908.4 KiB │      0 B │  1.4 MiB │  1.4 MiB │      0 B 
   native │   2.6 MiB │   2.6 MiB │      0 B │    6 MiB │    6 MiB │      0 B 
    asset │   1.6 MiB │   1.6 MiB │    +17 B │  1.6 MiB │  1.6 MiB │    +17 B 
    other │   1.4 MiB │   1.4 MiB │     +9 B │  1.6 MiB │  1.6 MiB │      0 B 
──────────┼───────────┼───────────┼──────────┼──────────┼──────────┼──────────
    total │  12.6 MiB │  12.6 MiB │ +1.8 KiB │ 21.5 MiB │ 21.5 MiB │ +6.6 KiB 

 DEX     │ old   │ new   │ diff              
─────────┼───────┼───────┼───────────────────
   files │     1 │     1 │   0               
 strings │ 40548 │ 40569 │ +21 (+75 -54)     
   types │ 13988 │ 14000 │ +12 (+65 -53)     
 classes │ 11663 │ 11674 │ +11 (+16 -5)      
 methods │ 59534 │ 59578 │ +44 (+3067 -3023) 
  fields │ 39768 │ 39806 │ +38 (+1864 -1826) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  243 │  243 │  0   
 entries │ 6208 │ 6208 │  0
APK
     compressed      │     uncompressed     │                                           
──────────┬──────────┼───────────┬──────────┤                                           
 size     │ diff     │ size      │ diff     │ path                                      
──────────┼──────────┼───────────┼──────────┼───────────────────────────────────────────
  3.9 MiB │ +1.7 KiB │   8.6 MiB │ +6.6 KiB │ ∆ classes.dex                             
  7.8 KiB │    +14 B │   7.7 KiB │    +14 B │ ∆ assets/dexopt/baseline.prof             
 53.4 KiB │     +4 B │ 118.5 KiB │      0 B │ ∆ META-INF/CERT.SF                        
    999 B │     +3 B │     867 B │     +3 B │ ∆ assets/dexopt/baseline.profm            
  1.2 KiB │     +2 B │   1.2 KiB │      0 B │ ∆ META-INF/CERT.RSA                       
 50.2 KiB │     +2 B │ 118.4 KiB │      0 B │ ∆ META-INF/MANIFEST.MF                    
    272 B │     +1 B │     120 B │      0 B │ ∆ META-INF/version-control-info.textproto 
──────────┼──────────┼───────────┼──────────┼───────────────────────────────────────────
    4 MiB │ +1.8 KiB │   8.8 MiB │ +6.6 KiB │ (total)
DEX
STRINGS:

   old   │ new   │ diff          
  ───────┼───────┼───────────────
   40548 │ 40569 │ +21 (+75 -54) 
  
  + , alertMessage=
  + , cvcInput=
  + , expiryDateInput=
  + Collection contains more than one matching element.
  + LC6/A;
  + LC6/u;
  + LC6/v;
  + LC6/w;
  + LC6/x;
  + LC6/y;
  + LC6/z;
  + LL6/s3;
  + LLLLZLLLI
  + LO6/U;
  + LO6/V;
  + LQ8/s;
  + LS5/r;
  + LY7/k;
  + Lo6/p;
  + Lt6/o;
  + Lu6/r;
  + VLLZLZLLLL
  + [LG8/r1;
  + [LG8/u1;
  + [LG8/z1;
  + [LL6/A1;
  + [LL6/C;
  + [LL6/F0;
  + [LL6/I2;
  + [LL6/K;
  + [LL6/N;
  + [LL6/S0;
  + [LL6/S;
  + [LL6/X0;
  + [LL6/X2;
  + [LL6/Z1;
  + [LL6/a0;
  + [LL6/c2;
  + [LL6/c3;
  + [LL6/d1;
  + [LL6/f0;
  + [LL6/f2;
  + [LL6/h1;
  + [LL6/i3;
  + [LL6/l0;
  + [LL6/o0;
  + [LL6/s3;
  + [LL6/u0;
  + [LL6/u1;
  + [LL6/w2;
  + [LL6/y0;
  + [LQ8/j;
  + [LS5/f;
  + [LW5/l;
  + [LX5/T0;
  + [LZ6/c;
  + [La9/D;
  + [La9/M;
  + [La9/c0;
  + [La9/e0;
  + [La9/j;
  + [La9/o0;
  + [La9/w;
  + [Lc7/n;
  + [Lg1/s;
  + [Lg5/c;
  + [Li8/u;
  + [Ll3/f;
  + [Ln6/h;
  + [Ls5/f;
  + [Lu6/k;
  + consumers/payment_details/
  + cvcInput
  + expiryDateInput
  + ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"efdc500","r8-mode":"full","version":"8.7.14"}
  
  - LP4/a;
  - LR/a0;
  - LS9/l;
  - La9/r0;
  - Lw5/e;
  - [LG8/p1;
  - [LG8/t1;
  - [LG8/x1;
  - [LL6/B0;
  - [LL6/B1;
  - [LL6/G0;
  - [LL6/G;
  - [LL6/J2;
  - [LL6/M;
  - [LL6/P;
  - [LL6/T0;
  - [LL6/W;
  - [LL6/Y0;
  - [LL6/Y2;
  - [LL6/a2;
  - [LL6/b0;
  - [LL6/d2;
  - [LL6/d3;
  - [LL6/e1;
  - [LL6/g0;
  - [LL6/g2;
  - [LL6/i1;
  - [LL6/m0;
  - [LL6/m3;
  - [LL6/p0;
  - [LL6/v0;
  - [LL6/v1;
  - [LL6/v2;
  - [LQ8/i;
  - [LS5/e;
  - [LW5/k;
  - [LX5/R0;
  - [LZ6/b;
  - [La9/E;
  - [La9/N;
  - [La9/d0;
  - [La9/f0;
  - [La9/l;
  - [La9/p0;
  - [La9/x;
  - [Lc7/l;
  - [Lg1/r;
  - [Lg5/b;
  - [Li8/t;
  - [Ll3/e;
  - [Ln6/f;
  - [Ls5/d;
  - [Lu6/j;
  - ~~R8{"backend":"dex","compilation-mode":"release","has-checksums":false,"min-api":21,"pg-map-id":"eb135a1","r8-mode":"full","version":"8.7.14"}
  

TYPES:

   old   │ new   │ diff          
  ───────┼───────┼───────────────
   13988 │ 14000 │ +12 (+65 -53) 
  
  + LC6/A;
  + LC6/u;
  + LC6/v;
  + LC6/w;
  + LC6/x;
  + LC6/y;
  + LC6/z;
  + LL6/s3;
  + LO6/U;
  + LO6/V;
  + LQ8/s;
  + LS5/r;
  + LY7/k;
  + Lo6/p;
  + Lt6/o;
  + Lu6/r;
  + [LG8/r1;
  + [LG8/u1;
  + [LG8/z1;
  + [LL6/A1;
  + [LL6/C;
  + [LL6/F0;
  + [LL6/I2;
  + [LL6/K;
  + [LL6/N;
  + [LL6/S0;
  + [LL6/S;
  + [LL6/X0;
  + [LL6/X2;
  + [LL6/Z1;
  + [LL6/a0;
  + [LL6/c2;
  + [LL6/c3;
  + [LL6/d1;
  + [LL6/f0;
  + [LL6/f2;
  + [LL6/h1;
  + [LL6/i3;
  + [LL6/l0;
  + [LL6/o0;
  + [LL6/s3;
  + [LL6/u0;
  + [LL6/u1;
  + [LL6/w2;
  + [LL6/y0;
  + [LQ8/j;
  + [LS5/f;
  + [LW5/l;
  + [LX5/T0;
  + [LZ6/c;
  + [La9/D;
  + [La9/M;
  + [La9/c0;
  + [La9/e0;
  + [La9/j;
  + [La9/o0;
  + [La9/w;
  + [Lc7/n;
  + [Lg1/s;
  + [Lg5/c;
  + [Li8/u;
  + [Ll3/f;
  + [Ln6/h;
  + [Ls5/f;
  + [Lu6/k;
  
  - LP4/a;
  - LR/a0;
  - LS9/l;
  - La9/r0;
  - Lw5/e;
  - [LG8/p1;
  - [LG8/t1;
  - [LG8/x1;
  - [LL6/B0;
  - [LL6/B1;
  - [LL6/G0;
  - [LL6/G;
  - [LL6/J2;
  - [LL6/M;
  - [LL6/P;
  - [LL6/T0;
  - [LL6/W;
  - [LL6/Y0;
  - [LL6/Y2;
  - [LL6/a2;
  - [LL6/b0;
  - [LL6/d2;
  - [LL6/d3;
  - [LL6/e1;
  - [LL6/g0;
  - [LL6/g2;
  - [LL6/i1;
  - [LL6/m0;
  - [LL6/m3;
  - [LL6/p0;
  - [LL6/v0;
  - [LL6/v1;
  - [LL6/v2;
  - [LQ8/i;
  - [LS5/e;
  - [LW5/k;
  - [LX5/R0;
  - [LZ6/b;
  - [La9/E;
  - [La9/N;
  - [La9/d0;
  - [La9/f0;
  - [La9/l;
  - [La9/p0;
  - [La9/x;
  - [Lc7/l;
  - [Lg1/r;
  - [Lg5/b;
  - [Li8/t;
  - [Ll3/e;
  - [Ln6/f;
  - [Ls5/d;
  - [Lu6/j;
  

METHODS:

   old   │ new   │ diff              
  ───────┼───────┼───────────────────
   59534 │ 59578 │ +44 (+3067 -3023) 
  
  + A2.u <init>(i, a, String, s)
  + A5.c <init>(a, c, D, int)
  + A6.B <init>(s, n, c, d)
  + A6.l <init>(String, boolean, boolean, m, d)
  + A6.l a(l, boolean, m, d, int) → l
  + B.m0 <init>(d)
  + B6.r <init>(b, n, c, d, a, c)
  + B6.r i(j) → d
  + B6.s <init>(boolean, boolean, d, boolean, boolean, String, String)
  + B6.s a(s, boolean, d, boolean, boolean, int) → s
  + B9.i p0(Iterator) → g
  + B9.i q0(d) → Object
  + B9.i r0(Object, c) → g
  + B9.i s0(g, c) → d
  + B9.i t0(Object[]) → g
  + B9.i u0(g) → List
  + B9.j A(e, a, a, p, int)
  + B9.j B(j, p, int)
  + B9.j C(s, c, c, a, a, p, int)
  + B9.j D(q, c, boolean, boolean, a, a, p, int)
  + B9.j E(boolean, q, boolean, e, boolean, c, a, a, p, int)
  + B9
...✂

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.

1 participant