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

[FC] Should not show manual entry success screen if doesn't use microdeposits #7575

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
### PaymentSheet
* [FIXED][7570](https://github.com/stripe/stripe-android/pull/7570) Fixed an issue where compiling PaymentSheet with R8 would cause an irrelevant warning for missing classes from Financial Connections if the module wasn't included.

### Financial Connections
* [FIXED][7575](https://github.com/stripe/stripe-android/pull/7575) Don't show microdeposits screen if microdeposits are not required.

## 20.34.3 - 2023-10-31

### PaymentSheet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ import com.stripe.android.financialconnections.model.FinancialConnectionsSession
import com.stripe.android.financialconnections.model.LinkAccountSessionPaymentAccount
import com.stripe.android.financialconnections.model.ManualEntryMode
import com.stripe.android.financialconnections.model.PaymentAccountParams
import com.stripe.android.financialconnections.navigation.Destination
import com.stripe.android.financialconnections.navigation.Destination.ManualEntrySuccess
import com.stripe.android.financialconnections.navigation.NavigationManager
import com.stripe.android.financialconnections.navigation.destination
import com.stripe.android.financialconnections.ui.FinancialConnectionsSheetNativeActivity
import javax.inject.Inject

Expand Down Expand Up @@ -139,12 +138,19 @@ internal class ManualEntryViewModel @Inject constructor(
accountNumber = requireNotNull(state.account)
)
).also {
val args = Destination.ManualEntrySuccess.argMap(
microdepositVerificationMethod = it.microdepositVerificationMethod,
last4 = state.account.takeLast(4)
)
val destination = (it.nextPane ?: Pane.MANUAL_ENTRY_SUCCESS).destination
navigationManager.tryNavigateTo(destination(PANE, args))
if (sync.manifest.manualEntryUsesMicrodeposits) {
navigationManager.tryNavigateTo(
ManualEntrySuccess(
referrer = PANE,
args = ManualEntrySuccess.argMap(
microdepositVerificationMethod = it.microdepositVerificationMethod,
last4 = state.account.takeLast(4)
)
)
)
} else {
nativeAuthFlowCoordinator().emit(Complete())
}
}
}.execute { copy(linkPaymentAccount = it) }
}
Expand Down Expand Up @@ -177,8 +183,7 @@ internal data class ManualEntryState(
val routingError: Int? = null,
val accountError: Int? = null,
val accountConfirmError: Int? = null,
val linkPaymentAccount: Async<LinkAccountSessionPaymentAccount> = Uninitialized,

val linkPaymentAccount: Async<LinkAccountSessionPaymentAccount> = Uninitialized
) : MavericksState {

data class Payload(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,5 @@ tags:
- tapOn:
text: "Continue"
retryTapIfNoChange: false
- tapOn: "Done"
Copy link
Collaborator Author

@carlosmuvi-stripe carlosmuvi-stripe Nov 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing the manual entry microdeposits click

- assertVisible: ".*Completed!.*"
- stopRecording
Loading