stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

Correctly filter out saved PMs that we do not display

Open amk-stripe opened this issue 9 months ago • 1 comments

Summary

Filter out saved payment methods that we don't display in the view model, rather than at the UI layer

Motivation

The current behavior introduces a few bugs if the user has saved link PMs but no other saved PMs, specifically:

  • you can remove the last PM even if allowsRemovalOfLastSavedPM is false
  • the select your payment method screen will be displayed with no saved payment method tabs

Testing

  • [ ] Added tests
  • [ ] Modified tests
  • [X] Manually verified

Screen recordings

Before:

https://github.com/stripe/stripe-android/assets/160939932/597be1b8-12e1-4dd8-b565-8cc995bff20c

After:

https://github.com/stripe/stripe-android/assets/160939932/e75b40d8-b728-443a-815a-3d89dac5c2a3

Changelog

  • [FIXED] Issue where "Select your payment method" screen would be displayed with no saved payment methods to select

amk-stripe avatar May 29 '24 19:05 amk-stripe