-
Notifications
You must be signed in to change notification settings - Fork 42
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-5986 Validate derivation for edslip #2920
Conversation
@@ -93,6 +94,14 @@ class CommonUserTokensManager { | |||
let tokenItems = converter.convertToTokenItem(nonCustomTokens) | |||
swapAvailabilityController.loadSwapAvailability(for: tokenItems, forceReload: forceReload, userWalletId: userWalletId.stringValue) | |||
} | |||
|
|||
private func validateDerivation(for tokenItem: TokenItem) throws { |
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.
В целом был еще вот такой метод:
addTokenItemPrecondition
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.
возможно я по flow путаю где надо ошибку кинуть, но там метод как раз на проверки добавления
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.
И тогда возможно не придется тянуть throws, но throws я бы оставил конечно
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.
Не очень понял что ты имеешь в виду. Внутри addTokenItemPrecondition тоже вызывается validateDerivation
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.
Тут я сделал так, чтобы не было возможности добавить токен с неправильной деривацией, поэтому throws нужен
обновил тэг и починил конфликты в подфайле |
Добавил валидацию деривации для edslip. В идеале надо валидировать инпут, но это уже можно будет сделать отдельно на новом кастом менедж токенс, если захочется. Сейчас закрываю такую возможность на более низком уровне
TODO: поднять тэг сдк с игнорированием ошибок tangem/tangem-sdk-ios#341