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 crash on GooglePayLauncher when confirmation fails #4117

Merged
merged 3 commits into from
Aug 19, 2021

Conversation

brnunes-stripe
Copy link
Contributor

@brnunes-stripe brnunes-stripe commented Aug 18, 2021

Summary

GooglePayLauncherViewModel would crash if StripeIntent confirmation resulted in an exception.

Motivation

Fix crash on GooglePayLauncher when StripeIntent confirmation fails (#4104)

Testing

  • Added tests
  • Modified tests
  • Manually verified

@brnunes-stripe brnunes-stripe changed the title Fix crash on GooglePayLauncher when StripeIntent is cancelled Fix crash on GooglePayLauncher when StripeIntent confirmation fails Aug 18, 2021
@brnunes-stripe brnunes-stripe changed the title Fix crash on GooglePayLauncher when StripeIntent confirmation fails Fix crash on GooglePayLauncher when confirmation fails Aug 18, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 18, 2021

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 │  11.5 MiB │  11.5 MiB │ -257 B │  39.1 MiB │  39.1 MiB │ +144 B 
     arsc │   1.3 MiB │   1.3 MiB │    0 B │   1.3 MiB │   1.3 MiB │    0 B 
 manifest │   2.5 KiB │   2.5 KiB │    0 B │  10.5 KiB │  10.5 KiB │    0 B 
      res │ 701.5 KiB │ 701.5 KiB │    0 B │     1 MiB │     1 MiB │    0 B 
    asset │  77.6 KiB │  77.6 KiB │   -2 B │ 109.1 KiB │ 109.1 KiB │   -2 B 
    other │    78 KiB │    78 KiB │   +6 B │   154 KiB │   154 KiB │    0 B 
──────────┼───────────┼───────────┼────────┼───────────┼───────────┼────────
    total │  13.7 MiB │  13.7 MiB │ -253 B │  41.8 MiB │  41.8 MiB │ +142 B 


         │          raw           │           unique            
         ├────────┬────────┬──────┼────────┬────────┬───────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff      
─────────┼────────┼────────┼──────┼────────┼────────┼───────────
   files │      3 │      3 │    0 │        │        │           
 strings │ 177955 │ 177955 │    0 │ 165250 │ 165250 │ 0 (+2 -2) 
   types │  31288 │  31288 │    0 │  29739 │  29739 │ 0 (+0 -0) 
 classes │  27456 │  27456 │    0 │  27456 │  27456 │ 0 (+0 -0) 
 methods │ 158133 │ 158133 │    0 │ 154012 │ 154012 │ 0 (+0 -0) 
  fields │ 108087 │ 108087 │    0 │ 107785 │ 107785 │ 0 (+0 -0) 


 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  293 │  293 │  0   
 entries │ 4332 │ 4332 │  0
APK
    compressed    │   uncompressed    │                                                       
─────────┬────────┼──────────┬────────┤                                                       
 size    │ diff   │ size     │ diff   │ path                                                  
─────────┼────────┼──────────┼────────┼───────────────────────────────────────────────────────
 3.5 MiB │ -257 B │ 10.2 MiB │ +144 B │ ∆ classes2.dex                                        
   190 B │   +6 B │      6 B │    0 B │ ∆ META-INF/androidx.activity_activity-compose.version 
 5.4 KiB │   -2 B │  5.3 KiB │   -2 B │ ∆ assets/dexopt/baseline.prof                         
─────────┼────────┼──────────┼────────┼───────────────────────────────────────────────────────
 3.5 MiB │ -253 B │ 10.2 MiB │ +142 B │ (total)
DEX
STRINGS:

   old    │ new    │ diff      
  ────────┼────────┼───────────
   165250 │ 165250 │ 0 (+2 -2) 
  
  + SMAP
  GooglePayLauncherViewModel.kt
  Kotlin
  *S Kotlin
  *F
  + 1 GooglePayLauncherViewModel.kt
  com/stripe/android/googlepaylauncher/GooglePayLauncherViewModel
  + 2 Transformations.kt
  androidx/lifecycle/TransformationsKt
  + 3 fake.kt
  kotlin/jvm/internal/FakeKt
  *L
  1#1,281:1
  87#2:282
  1#3:283
  *S KotlinDebug
  *F
  + 1 GooglePayLauncherViewModel.kt
  com/stripe/android/googlepaylauncher/GooglePayLauncherViewModel
  *L
  50#1:282
  *E
  
  + Unexpected confirmation result.
  
  - SMAP
  GooglePayLauncherViewModel.kt
  Kotlin
  *S Kotlin
  *F
  + 1 GooglePayLauncherViewModel.kt
  com/stripe/android/googlepaylauncher/GooglePayLauncherViewModel
  + 2 Transformations.kt
  androidx/lifecycle/TransformationsKt
  *L
  1#1,284:1
  87#2:285
  *S KotlinDebug
  *F
  + 1 GooglePayLauncherViewModel.kt
  com/stripe/android/googlepaylauncher/GooglePayLauncherViewModel
  *L
  50#1:285
  *E
  
  - Unexpected result.

@brnunes-stripe brnunes-stripe merged commit 1abad34 into master Aug 19, 2021
@brnunes-stripe brnunes-stripe deleted the brnunes/gpbug branch August 19, 2021 15:16
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