-
Notifications
You must be signed in to change notification settings - Fork 663
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
Support networking relink flows #10000
base: master
Are you sure you want to change the base?
Conversation
Diffuse output:
APK
|
044eb9c
to
c13812c
Compare
1ac9279
to
2c010b4
Compare
07606b1
to
0471915
Compare
81957dc
to
54e7315
Compare
if (!isRelink) { | ||
storeSavedToLinkMessage(manifest, selectedAccountIds.size) | ||
} |
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 want to show […] and was saved to Link
, since the account is technically already in Link.
@@ -226,6 +228,7 @@ private fun LoadedContent( | |||
// is Loading or Success (completing auth after redirect) | |||
authenticationStatus = authenticationStatus, | |||
showInModal = showInModal, | |||
showSecondaryButton = !isRelinkSession, |
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.
In networked relink, we only show a single Continue
button.
fc2fbba
to
804f758
Compare
804f758
to
0ff00cc
Compare
0ff00cc
to
7698695
Compare
import com.stripe.android.financialconnections.repository.CoreAuthorizationPendingNetworkingRepairRepository | ||
import javax.inject.Inject | ||
|
||
internal fun interface IsNetworkingRelinkSession { |
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 have multiple screens where we want to know if we’re in a networking relink flow. This is easier to inject and test than using the full CoreAuthorizationPendingNetworkingRepairRepository
.
) | ||
) | ||
} | ||
if (result.networkingSuccessful == true) { |
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.
This was broken before, since result.networkingSuccessful?.let { … }
would run even if networkingSuccessful
was false
.
if (pane == Pane.BANK_AUTH_REPAIR) { | ||
initializeBankAuthRepair(sync) | ||
} else { | ||
initializePartnerAuth(sync) | ||
} |
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.
Using one ViewModel for both cases.
@@ -26,6 +26,6 @@ internal class CoreAuthorizationPendingNetworkingRepairRepository @Inject constr | |||
|
|||
@Parcelize | |||
data class State( | |||
val coreAuthorization: String? = null |
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.
Removing the nullability here, since having a non-null state should be an indication that a networking relink flow is underway.
flow = repairSession.flow, | ||
display = repairSession.display, | ||
_isOAuth = repairSession.isOAuth, | ||
nextPane = Pane.SUCCESS, |
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.
This aligns with Web.
c0fff9a
to
63c6d1d
Compare
Summary
This pull request adds support for networked relink.
Networked bank accounts that require an update will display an
Update required
subtitle, and actioning on them will create an auth repair session that we then map to an auth session. From there, the steps are largely the same as for a ”normal” auth flow.Note that the flow will complete successfully, but the SDK will return a
Canceled
result. This will be fixed backend-side.Motivation
Testing
Screenshots
Changelog