Fix failing validation on trezor login#2740
Fix failing validation on trezor login#2740CharlVS merged 4 commits intorelease/hot-fix-trezor-loginfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Visit the preview URL for this PR (updated for commit 63ac1bd): https://walletrc--pull-2740-merge-4b24qqps.web.app (expires Wed, 11 Jun 2025 13:30:52 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc |
| Future<void> _loginToTrezorWallet({ | ||
| String walletName = 'My Trezor', | ||
| String password = 'hidden-login', | ||
| String password = 'Hidden-login1!', |
There was a problem hiding this comment.
Does the password have to remain constant between restarts? If not, rather opt for using SecurityUtils.generatePasswordSecure(16), which generates a secure password that meets KDF's password criteria using the device's secure RNG.
| String password = 'Hidden-login1!', | ||
| String? password | ||
| }) async { | ||
| password ??= generatePassword(); |
There was a problem hiding this comment.
@smk762 I see this function isn't referenced anywhere else in the codebase. Could you please remove the reference and delete the function? Then instead reference SecurityUtils.generatePasswordSecure(16);
There was a problem hiding this comment.
lib/bloc/trezor_init_bloc/trezor_init_bloc.dart:276:23: Error: Undefined name 'SecurityUtils'.
String password = SecurityUtils.generatePasswordSecure(16),
^^^^^^^^^^^^^
lib/bloc/trezor_init_bloc/trezor_init_bloc.dart:276:37: Error: Method invocation is not a constant expression.
String password = SecurityUtils.generatePasswordSecure(16),
^^^^^^^^^^^^^^^^^^^^^^
Searching codebase for generatePasswordSecure or SecurityUtils returned no results, but I did find this, which allowed app to build - https://github.com/KomodoPlatform/komodo-wallet/blob/main/lib/shared/utils/password.dart#L3
If you can suggest the required import for the function you mention, happy to use it.
A simple fix for a a significant problem.