-
Notifications
You must be signed in to change notification settings - Fork 659
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 issue where continue button is disabled when canceling account selection #7464
Conversation
bf2c2e5
to
329b462
Compare
...va/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormScreenState.kt
Outdated
Show resolved
Hide resolved
paymentsheet-example/src/androidTest/java/com/stripe/android/test/core/PlaygroundTestDriver.kt
Outdated
Show resolved
Hide resolved
...va/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormScreenState.kt
Outdated
Show resolved
Hide resolved
3abed5c
to
0e5927c
Compare
22150da
to
42a2554
Compare
merchantName = viewModel.formattedMerchantName(), | ||
onPrimaryButtonClick = viewModel::handlePrimaryButtonClick, | ||
onPrimaryButtonStateChanged = viewModel::handlePrimaryButtonStateChanged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just call handlePrimaryButtonStateChanged(StartProcessing)
from inside handlePrimaryButtonClick
?
We also don’t seem to reset the processing state. Do we need to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ping about whether or not we need to reset the state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to, it is handled when the bank account is returned from FC SDK, by setting the isProcessing
flag to false.
42a2554
to
81f43a4
Compare
...java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormViewModel.kt
Outdated
Show resolved
Hide resolved
...java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormViewModel.kt
Outdated
Show resolved
Hide resolved
...va/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormScreenState.kt
Outdated
Show resolved
Hide resolved
81f43a4
to
0c6357d
Compare
2598cd0
to
6e9642e
Compare
val currentScreenState = viewModel.currentScreenState.stateIn(viewModel.viewModelScope).value | ||
viewModel.handlePrimaryButtonClick(currentScreenState as USBankAccountFormScreenState.VerifyWithMicrodeposits) | ||
|
||
assertThat(awaitItem().screenState).isEqualTo(currentScreenState.copy(isProcessing = true)) | ||
assertThat(awaitItem().screenState).isEqualTo(currentScreenState) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what this is testing now. We confirm that the screen state doesn‘t change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The screenstate should no longer change since we moved the isProcessing update to BillingDetails collection flow
...java/com/stripe/android/paymentsheet/paymentdatacollection/ach/USBankAccountFormViewModel.kt
Outdated
Show resolved
Hide resolved
6e9642e
to
c2e0754
Compare
c2e0754
to
f3529d2
Compare
f3529d2
to
d9458d5
Compare
d9458d5
to
4f7ec64
Compare
Summary
Motivation
Allow users to launch bank account selection again.
Testing
Changelog