stripe-android
stripe-android copied to clipboard
Fix deletion of last saved payment method
Summary
When the last saved payment method was deleted on Payment Sheet, the selection wasn't cleared on the ViewModel. Now the selection is cleared, we exit edit mode and hide the edit button since there are no items left to delete.
Motivation
Follow up to #5592.
Testing
- [x] Added tests
- [ ] Modified tests
- [x] Manually verified
Screenshots
https://user-images.githubusercontent.com/77990083/192072959-6980aa9e-8f49-498c-aaba-e6ae369fe3e8.mp4