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

Fix issue where multiple accounts are selected for single select #4187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mats-stripe
Copy link
Collaborator

@mats-stripe mats-stripe commented Oct 25, 2024

Summary

This fixes an issue in the account picker pane where multiple account could be selected when both skipAccountSelection and manifest.singleAccount is true. Instead, we select the first selectable account.

Motivation

Fixes bug reported by Doordash.

Testing

Manual testing via latest Testflight build on this branch. @carlosmuvi-stripe confirmed this fixes the issue!

Changelog

N/a

Comment on lines +188 to +191
if self.dataSource.manifest.singleAccount {
if let firstEnabledAccount = accounts.first(where: \.allowSelectionNonOptional) {
self.dataSource.updateSelectedAccounts([firstEnabledAccount])
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@carlosmuvi-stripe Any thoughts on what we should do in the else block of this condition? This would be where no accounts have been selected.

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.

1 participant