From dc1dafcddc3b2ede0aa80332b11e6f48e73f95e2 Mon Sep 17 00:00:00 2001 From: Carlos M Date: Thu, 2 Nov 2023 11:46:52 -0700 Subject: [PATCH 1/4] [skip ci] Start PR From 05a85787b6d7ad80b93ed9aa42f2ea9c1dd90f92 Mon Sep 17 00:00:00 2001 From: Carlos M Date: Thu, 2 Nov 2023 11:54:27 -0700 Subject: [PATCH 2/4] Completes session if microdeposits are not required. --- .../manualentry/ManualEntryViewModel.kt | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) 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( From a1148d14eded993464276dfe67bae571b18e91b9 Mon Sep 17 00:00:00 2001 From: Carlos M Date: Thu, 2 Nov 2023 12:16:50 -0700 Subject: [PATCH 3/4] Do not show manual entry success if not required. --- maestro/financial-connections/Testmode-Token-ManualEntry.yaml | 1 - 1 file changed, 1 deletion(-) 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 From 35f5d9d89b6ba6fd19b96b330fb64d798c097b3b Mon Sep 17 00:00:00 2001 From: Carlos M Date: Thu, 2 Nov 2023 12:23:43 -0700 Subject: [PATCH 4/4] Updates changelog. --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) 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