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-3488 Letting signExternally throw exceptions #8

Conversation

megakoko
Copy link

@megakoko megakoko commented May 1, 2023

Подрефакторил чтобы не писать такое:

Screenshot 2023-05-01 at 16 31 04

@megakoko megakoko requested a review from tureck1y May 1, 2023 12:35
@megakoko megakoko marked this pull request as ready for review May 1, 2023 12:36
}
return try! SigningOutput(serializedData: outputData)
Copy link
Collaborator

Choose a reason for hiding this comment

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

а тут нужен try! ? Да и в целом может не писать try, раз у нас и так throws?

Copy link
Author

Choose a reason for hiding this comment

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

try! сделан чтобы не пробрасывать наверх ошибки WalletCore, а только наши, от нашего сайнера.

Судя по тому, что в стандартной реализации все возможные исключения WalletCore перехватываются и обрабатываются через fatalError проблем тут быть не должно. Просто сделал чтобы было подобие стандартной реализации.

@megakoko megakoko merged commit 0b48435 into master May 3, 2023
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