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

[MBL-2021] Disable "authenticate card" after completion of 3DS auth in PPO #2282

Merged
merged 4 commits into from
Feb 14, 2025

Conversation

stevestreza-ksr
Copy link
Contributor

📲 What

After the "Authenticate Card" flow is complete, the button now disables.

🛠 How

PPOActionState was already being propagated into the PPOProjectCardViewModel, so I added a new "isComplete" flag to that, which is reacted to by the PPOProjectCard.

@@ -35,6 +35,7 @@ typealias PPOProjectCardViewModelType = Equatable & Hashable & Identifiable & Ob
final class PPOProjectCardViewModel: PPOProjectCardViewModelType {
@Published private(set) var card: PPOProjectCardModel
@Published var isLoading: Bool = false
@Published var isComplete: Bool = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Since these booleans are interconnected (at least, I'd assume the card can't be loading and complete at the same time), what do you think of doing an enum "state" here as well, instead of two separate bools? I'm okay with this as-is, though, if you prefer.

@stevestreza-ksr stevestreza-ksr merged commit 29be730 into main Feb 14, 2025
5 checks passed
@stevestreza-ksr stevestreza-ksr deleted the stevestreza/ppo/fix-3ds-button-state branch February 14, 2025 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants