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

Use two decimal places for LAK #7190

Merged
merged 5 commits into from
Aug 23, 2023
Merged

Use two decimal places for LAK #7190

merged 5 commits into from
Aug 23, 2023

Conversation

tillh-stripe
Copy link
Collaborator

@tillh-stripe tillh-stripe commented Aug 23, 2023

Summary

This pull request fixes an issue where the Laotian Kip was formatted incorrectly.

To fix this, I added LAK to the special cases in CurrencyFormatter and also made PayWithGoogleUtils use that class to determine the amount of decimal places. This makes sure that PaymentSheet and Google Pay display the same values.

Motivation

RUN_MOBILESDK-2548

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

Copy link
Collaborator

@jaynewstrom-stripe jaynewstrom-stripe left a comment

Choose a reason for hiding this comment

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

Thanks! Let's add a test an ship it!

@tillh-stripe
Copy link
Collaborator Author

Yep, was planning on adding it (and just did)!

@porter-stripe
Copy link
Contributor

I think this is worth mentioning in the changelog!

@tillh-stripe
Copy link
Collaborator Author

@porter-stripe Yes, added it to the changelog already. I’m just looking into aligning Google Pay with this change, because we continue to display the incorrect amount there.

@tillh-stripe tillh-stripe marked this pull request as ready for review August 23, 2023 15:14
@tillh-stripe tillh-stripe requested review from a team as code owners August 23, 2023 15:14
@tillh-stripe tillh-stripe enabled auto-merge (squash) August 23, 2023 15:14
@github-actions
Copy link
Contributor

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.5 MiB │   3.5 MiB │ +323 B │   7.7 MiB │   7.7 MiB │ +72 B 
     arsc │   2.1 MiB │   2.1 MiB │    0 B │   2.1 MiB │   2.1 MiB │   0 B 
 manifest │   4.9 KiB │   4.9 KiB │    0 B │  24.1 KiB │  24.1 KiB │   0 B 
      res │ 866.6 KiB │ 866.6 KiB │    0 B │   1.3 MiB │   1.3 MiB │   0 B 
   native │   2.6 MiB │   2.6 MiB │    0 B │     6 MiB │     6 MiB │   0 B 
    asset │     3 MiB │     3 MiB │  -14 B │     3 MiB │     3 MiB │ -14 B 
    other │ 199.5 KiB │ 199.5 KiB │  +17 B │ 446.3 KiB │ 446.3 KiB │   0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼───────
    total │  12.3 MiB │  12.3 MiB │ +326 B │  20.7 MiB │  20.7 MiB │ +58 B 

 DEX     │ old   │ new   │ diff       
─────────┼───────┼───────┼────────────
   files │     1 │     1 │  0         
 strings │ 38183 │ 38184 │ +1 (+2 -1) 
   types │ 12619 │ 12619 │  0 (+0 -0) 
 classes │ 10646 │ 10646 │  0 (+0 -0) 
 methods │ 55950 │ 55951 │ +1 (+1 -0) 
  fields │ 35084 │ 35084 │  0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  290 │  290 │  0   
 entries │ 6920 │ 6920 │  0
APK
    compressed     │   uncompressed    │                               
──────────┬────────┼───────────┬───────┤                               
 size     │ diff   │ size      │ diff  │ path                          
──────────┼────────┼───────────┼───────┼───────────────────────────────
  3.5 MiB │ +323 B │   7.7 MiB │ +72 B │ ∆ classes.dex                 
  6.3 KiB │  -14 B │   6.2 KiB │ -14 B │ ∆ assets/dexopt/baseline.prof 
 62.6 KiB │  +10 B │ 140.6 KiB │   0 B │ ∆ META-INF/CERT.SF            
 48.4 KiB │   +5 B │ 140.5 KiB │   0 B │ ∆ META-INF/MANIFEST.MF        
  1.2 KiB │   +2 B │   1.2 KiB │   0 B │ ∆ META-INF/CERT.RSA           
──────────┼────────┼───────────┼───────┼───────────────────────────────
  3.6 MiB │ +326 B │     8 MiB │ +58 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   38183 │ 38184 │ +1 (+2 -1) 
  + LAK
  + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:f852950,r8-mode:full,version:8.0.46}
  
  - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:17926e0,r8-mode:full,version:8.0.46}
  

METHODS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   55950 │ 55951 │ +1 (+1 -0) 
  + kg.a b(Currency) → int

@tillh-stripe tillh-stripe merged commit 7c888ba into master Aug 23, 2023
@tillh-stripe tillh-stripe deleted the tillh/fix-lak-currency branch August 23, 2023 15:23
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.

3 participants