-
Notifications
You must be signed in to change notification settings - Fork 673
Simplify LinkHandler
& source of truth for Link enablement
#10858
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
base: master
Are you sure you want to change the base?
Conversation
Diffuse output:
APK
|
8aeaa7f
to
d8841cd
Compare
WalletsState.create( | ||
isLinkAvailable = isLinkAvailable, | ||
isLinkAvailable = paymentMethodMetadata.availableWallets.contains(WalletType.Link), |
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 has the same condition as isLinkEnabled
would after setupLink
(linkState
!= null)
if (state == null) return | ||
|
||
_linkConfiguration.value = state.configuration | ||
linkConfiguration.value = state.configuration | ||
} |
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.
By doing this, we effectively making this handler a logout manager outside of setting up for eager launch. I think there's an opportunity to move Link
setup into PaymentElementLoader
. From there, we indicate to the individual products if a session is eligible for eager launch through PaymentMethodMetadata
then each individual product can decide if they want to launch into it (in this case only PaymentSheet
for now)
d8841cd
to
a341d15
Compare
a341d15
to
5b86c54
Compare
Summary
Simplify
LinkHandler
& source of truth for Link enablementMotivation
Simplify
LinkHandler
& source of truth for Link enablementTesting