-
Notifications
You must be signed in to change notification settings - Fork 645
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
[Refactor] Merge the post verification logic between verification panes. #8653
base: master
Are you sure you want to change the base?
[Refactor] Merge the post verification logic between verification panes. #8653
Conversation
Diffuse output:
APK
|
…muvi/BANKCON-11254/android-support-for-networking-a-manually-entered
import com.stripe.android.financialconnections.repository.AttachedPaymentAccountRepository | ||
import javax.inject.Inject | ||
|
||
internal class CompleteVerification @Inject constructor( |
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.
equivalent web code: https://git.corp.stripe.com/stripe-internal/stripe-js-v3/blob/02e07063/src/linkedAccounts/inner/components/panes/v3/LinkVerificationPane/index.tsx#L177
Note this is just merging the logic across verification panes into a usecase. No new code here besides checking if an account of type bank_account
has been previously attached.
@@ -45,15 +45,15 @@ internal data class PartnerAccountsList( | |||
@Parcelize | |||
internal data class PartnerAccount( |
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 fields are nullable now to support NME accounts.
internal class AttachedPaymentAccountRepository @Inject constructor( | ||
savedStateHandle: SavedStateHandle, | ||
private val logger: Logger, | ||
) : PersistingRepository<AttachedPaymentAccountRepository.State>( | ||
savedStateHandle = savedStateHandle, | ||
) { |
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 is used to remember previously attached accounts locally. If an account of type bank_account
(manually entered) was attached, we'll call save_accounts_to_link
with null
as accounts
.
@@ -35,11 +37,13 @@ internal class PollAttachPaymentAccount @Inject constructor( | |||
retryCondition = { exception -> exception.shouldRetry } | |||
) { | |||
try { | |||
repository.postLinkAccountSessionPaymentAccount( | |||
repository.postAttachPaymentAccountToLinkAccountSession( |
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.
renamed this api request to be more precise.
Summary
Motivation
TBD
Testing
Screenshots
Changelog