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

Bank value is allowed to be null in the case of "other" #4334

Merged
merged 1 commit into from
Oct 28, 2021

Conversation

michelleb-stripe
Copy link
Contributor

Summary

For the bank selector we always allow the user to enter Other and this is not associated with a bank. The resource value associated with Other in the past was an empty string. This meant that we create a payment method create params with an empty string in the bank value. In the past an empty string was removed when sent to the server, but there was a recent change that now allows this string to be sent.

For this review we change it so that Other is associated with a null string, which will not be sent to the server.

Motivation

See screenshot below

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

image

@github-actions
Copy link
Contributor

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.6 MiB │  11.6 MiB │ -158 B │    39.4 MiB │    39.4 MiB │ +44 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 │ 640.8 KiB │ 640.8 KiB │    0 B │ 1,020.4 KiB │ 1,020.4 KiB │   0 B 
    asset │  77.6 KiB │  77.6 KiB │   +9 B │   109.1 KiB │   109.1 KiB │  +6 B 
    other │    78 KiB │    78 KiB │   -6 B │     154 KiB │     154 KiB │   0 B 
──────────┼───────────┼───────────┼────────┼─────────────┼─────────────┼───────
    total │  13.7 MiB │  13.7 MiB │ -155 B │      42 MiB │      42 MiB │ +50 B 


         │          raw           │           unique            
         ├────────┬────────┬──────┼────────┬────────┬───────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff      
─────────┼────────┼────────┼──────┼────────┼────────┼───────────
   files │      3 │      3 │    0 │        │        │           
 strings │ 179474 │ 179474 │    0 │ 166298 │ 166298 │ 0 (+1 -1) 
   types │  31652 │  31652 │    0 │  30002 │  30002 │ 0 (+0 -0) 
 classes │  27705 │  27705 │    0 │  27705 │  27705 │ 0 (+0 -0) 
 methods │ 159920 │ 159920 │    0 │ 155583 │ 155583 │ 0 (+0 -0) 
  fields │ 108860 │ 108860 │    0 │ 108506 │ 108506 │ 0 (+0 -0) 


 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  287 │  287 │  0   
 entries │ 4349 │ 4349 │  0
APK
    compressed    │   uncompressed   │                                                       
─────────┬────────┼──────────┬───────┤                                                       
 size    │ diff   │ size     │ diff  │ path                                                  
─────────┼────────┼──────────┼───────┼───────────────────────────────────────────────────────
 3.5 MiB │ -158 B │ 10.2 MiB │ +44 B │ ∆ classes2.dex                                        
   184 B │   -6 B │      6 B │   0 B │ ∆ META-INF/androidx.activity_activity-compose.version 
   922 B │   +3 B │  3.3 KiB │  +2 B │ ∆ assets/epsBanks.json                                
   378 B │   +3 B │    1 KiB │  +2 B │ ∆ assets/idealBanks.json                              
   666 B │   +3 B │  2.3 KiB │  +2 B │ ∆ assets/p24Banks.json                                
─────────┼────────┼──────────┼───────┼───────────────────────────────────────────────────────
 3.5 MiB │ -155 B │ 10.2 MiB │ +50 B │ (total)
DEX
STRINGS:

   old    │ new    │ diff      
  ────────┼────────┼───────────
   166298 │ 166298 │ 0 (+1 -1) 
  
  + >
  ���
  ��
  
  ���
  
  ���
  ���
  ���
  ��	
  ���
  ���
  ���
  ���
  ���
  
  ���
  ������� �2�0�:���B-��������0���������0���������0���������0�¢���	B���������0�������0�¢���
  J�������0�H�J	����0�H�J�����02
  ��������0�2�������0�HÆ�J�����0�2�������0�HÖ�J	����0�HÖ�J	����0�HÖ�J!����0�2�����02�����0�2�����0�HÇ�R�����0�¢��
  �����R�������0�¢��
  ���
  �¨��
  
  - >
  ���
  ��
  
  ���
  
  ���
  ���
  ���
  ��	
  ���
  ���
  ���
  ���
  ���
  
  ���
  ������� �2�0�:���B-��������0���������0���������0���������0�¢���	B�������0�������0�¢���
  J	����0�HÆ�J	����0�HÆ�J�����02�������0�2�������0�HÆ�J�����0�2�������0�HÖ�J	����0�HÖ�J	����0�HÖ�J!����0�2�����02�����0�2�����0�HÇ�R�����0�¢��
  �����R�����0�¢��
  ���
  �¨�

@michelleb-stripe michelleb-stripe merged commit a5476e9 into master Oct 28, 2021
@michelleb-stripe michelleb-stripe deleted the michelleb/ideal-bank-error branch October 28, 2021 21: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.

None yet

2 participants