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

Extend consumer lookup to FC flow #10349

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
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
Next Next commit
Extend consumer lookup to FC flow
  • Loading branch information
tillh-stripe committed Mar 7, 2025
commit 80720ecd2ea5e6945e6c58240f2ca44af99e9c63
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,13 @@ internal class ConsentViewModel @AssistedInject constructor(
private suspend fun determineNavigationDestination(
manifest: FinancialConnectionsSessionManifest,
): Destination {
val defaultDestination = manifest.nextPane.destination
val shouldLookupConsumer = manifest.accountholderCustomerEmailAddress == null && prefillDetails?.email != null
val showWarmupPane = shouldLookupConsumer && hasExistingLinkAccount(manifest, prefillDetails.email)

val useManifestNextPane = !isLinkWithStripe() ||
manifest.accountholderCustomerEmailAddress != null ||
prefillDetails?.email == null

if (useManifestNextPane) {
return defaultDestination
}

val hasExistingAccount = hasExistingLinkAccount(manifest, prefillDetails.email)
return if (hasExistingAccount) {
return if (showWarmupPane) {
NetworkingLinkLoginWarmup
} else {
defaultDestination
manifest.nextPane.destination
}
}

Expand Down
Loading