diff --git a/CHANGELOG.md b/CHANGELOG.md index 0539ecf548c..40ffc1fa5e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/financial-connections/src/main/java/com/stripe/android/financialconnections/features/manualentry/ManualEntryViewModel.kt b/financial-connections/src/main/java/com/stripe/android/financialconnections/features/manualentry/ManualEntryViewModel.kt index 006adf04c00..aa2339458c1 100644 --- a/financial-connections/src/main/java/com/stripe/android/financialconnections/features/manualentry/ManualEntryViewModel.kt +++ b/financial-connections/src/main/java/com/stripe/android/financialconnections/features/manualentry/ManualEntryViewModel.kt @@ -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 @@ -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) } } @@ -177,8 +183,7 @@ internal data class ManualEntryState( val routingError: Int? = null, val accountError: Int? = null, val accountConfirmError: Int? = null, - val linkPaymentAccount: Async = Uninitialized, - + val linkPaymentAccount: Async = Uninitialized ) : MavericksState { data class Payload( diff --git a/maestro/financial-connections/Testmode-Token-ManualEntry.yaml b/maestro/financial-connections/Testmode-Token-ManualEntry.yaml index 32b02d5d0cd..bc12508724f 100644 --- a/maestro/financial-connections/Testmode-Token-ManualEntry.yaml +++ b/maestro/financial-connections/Testmode-Token-ManualEntry.yaml @@ -32,6 +32,5 @@ tags: - tapOn: text: "Continue" retryTapIfNoChange: false -- tapOn: "Done" - assertVisible: ".*Completed!.*" - stopRecording