-
Notifications
You must be signed in to change notification settings - Fork 649
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
[Prototype] Confirmation definition injection #9665
base: master
Are you sure you want to change the base?
Conversation
Diffuse output:
APK
|
import dagger.multibindings.IntoSet | ||
|
||
@Module | ||
internal class BacsConfirmationModule { |
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.
What do you think about nesting this class in the definition?
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.
Yeah I think that's fair!
@@ -197,13 +197,21 @@ internal interface ConfirmationHandler { | |||
} | |||
} | |||
|
|||
sealed interface Option : Parcelable { | |||
sealed class Option(val confirmationType: Type) : Parcelable { |
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.
To be honest, all of these should probably be decentralized. Happy to punt that until later though.
Ideally it would be nice to not need to add something centrally, or have one know about another.
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.
Ah yeah I think that's fair actually. Can just have the options implemented for each definition if needed.
confirmationOption: ConfirmationHandler.Option, | ||
intent: StripeIntent, | ||
): Boolean { | ||
return definition.option(confirmationOption)?.let { |
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.
what does definition.option
do?
Summary
This is a prototype of the confirmation flow with injectable definition components. This is not intended to be merged as there are no tests but provides an overview of what confirmation architecture will look like in the near future.
Motivation
Wanted to validate the design for the confirmation flow discussed with the team.