fix(trezor): pin input not visible in light mode#3034
Conversation
matches the dark theme implementation
i.e. if user presses cancel on the pin input screen
WalkthroughThe changes update the handling of color initialization in the light theme, enhance the Trezor authentication cancellation logic by integrating SDK cancellation, and ensure that closing the Trezor PIN dialog dispatches a cancellation event to the authentication bloc. Formatting improvements are also included. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant TrezorPinDialog
participant AuthBloc
participant TrezorSDK
User->>TrezorPinDialog: Close dialog (without PIN)
TrezorPinDialog->>AuthBloc: Dispatch AuthTrezorCancelled
AuthBloc->>TrezorSDK: cancelHardwareDeviceInitialization (if taskId present)
TrezorSDK-->>AuthBloc: (Handles cancellation or throws)
AuthBloc->>AuthBloc: Emit initial authentication state
TrezorPinDialog->>TrezorPinDialog: Close popup
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Suggested labels
Suggested reviewers
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (5)
✨ Finishing Touches🧪 Generate unit tests
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 (
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a visual issue where Trezor PIN input was not visible in light mode by correcting the theme color initialization approach. It also adds proper cancellation handling for Trezor authentication operations.
Key changes:
- Aligns light mode
keyPadColorinitialization with the dark theme approach by making it a constant instead of theme-dependent - Adds explicit cancellation handling when the Trezor PIN dialog is closed
- Includes various code formatting improvements and cleanup
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
app_theme/lib/src/light/theme_custom_light.dart |
Changes keyPadColor from theme-dependent initialization to a constant value to fix visibility in light mode |
lib/views/common/hw_wallet_dialog/show_trezor_pin_dialog.dart |
Adds proper cancellation event when PIN dialog is closed |
lib/bloc/auth_bloc/trezor_auth_mixin.dart |
Implements cancellation handling and includes code formatting improvements |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Visit the preview URL for this PR (updated for commit 6779802): https://walletrc--pull-3034-merge-a0kw75s6.web.app (expires Thu, 07 Aug 2025 19:52:42 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc |
* fix(trezor): revert keyPadColor to manual custom color matches the dark theme implementation * fix(trezor): call SDK HW cancellation for cancel event i.e. if user presses cancel on the pin input screen
* fix(trezor): revert keyPadColor to manual custom color matches the dark theme implementation * fix(trezor): call SDK HW cancellation for cancel event i.e. if user presses cancel on the pin input screen
* fix(trezor): revert keyPadColor to manual custom color matches the dark theme implementation * fix(trezor): call SDK HW cancellation for cancel event i.e. if user presses cancel on the pin input screen
* fix(trezor): revert keyPadColor to manual custom color matches the dark theme implementation * fix(trezor): call SDK HW cancellation for cancel event i.e. if user presses cancel on the pin input screen
* fix(trezor): revert keyPadColor to manual custom color matches the dark theme implementation * fix(trezor): call SDK HW cancellation for cancel event i.e. if user presses cancel on the pin input screen
* fix(trezor): revert keyPadColor to manual custom color matches the dark theme implementation * fix(trezor): call SDK HW cancellation for cancel event i.e. if user presses cancel on the pin input screen
Aligns the light-mode
keyPadColorinitialisation with the dark theme approach.Before
After
Summary by CodeRabbit
New Features
Style
Refactor