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

IOS-7148 Handle finalized card #368

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Conversation

tureck1y
Copy link
Collaborator

@tureck1y tureck1y commented Sep 5, 2024

Хэндлинг корнер кейсов
https://tangem.atlassian.net/browse/IOS-7148

@tureck1y tureck1y changed the title IOS-7148 Ignore invalid state IOS-7148 Handle finalized card Sep 5, 2024
} else if repo.data.attestSignature == nil || repo.data.backupData.count < repo.data.backupCards.count {
} else if repo.data.attestSignature == nil
|| repo.data.backupData.count < repo.data.backupCards.count
|| repo.data.primaryCardFinalized == false {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

При перезапуске приложения нужно доводить финализацию до конца

Comment on lines +128 to +133
if case .invalidState = error {
Log.debug("Got \(error). Ignoring..")
self.onFinalize()
completion(.success(card))
return
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Получается при invalidState мы все равно помечаем бэкап как выполненный?

Copy link
Collaborator Author

@tureck1y tureck1y Sep 10, 2024

Choose a reason for hiding this comment

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

Да, этот invalidState приходит от конкретной команды в кейсе когда она уже выполнилась прежде, поэтому тут безопасно заигнорить его, на карте уже все ок

@tureck1y tureck1y merged commit 8df589c into develop Sep 10, 2024
3 checks passed
@tureck1y tureck1y deleted the IOS-7148_handle_finalized_card branch September 10, 2024 12:55
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.

4 participants