Skip to content

fix: remove the attach to pin version restriction#382

Merged
guowei0105 merged 2 commits intoOneKeyHQ:mainfrom
guowei0105:main
Aug 19, 2025
Merged

fix: remove the attach to pin version restriction#382
guowei0105 merged 2 commits intoOneKeyHQ:mainfrom
guowei0105:main

Conversation

@guowei0105
Copy link
Copy Markdown
Contributor

@guowei0105 guowei0105 commented Aug 19, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Corrected the displayed/reported passphrase protection status when the device is unlocked. It now accurately reflects configurations that use passphrase-on-PIN and scenarios where attaching a passphrase to PIN isn’t supported, preventing misleading “passphrase enabled” indications. Clients reading device features will see the correct passphrase protection state in these cases.

@guowei0105 guowei0105 requested a review from a team as a code owner August 19, 2025 02:49
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Aug 19, 2025

Walkthrough

Passphrase-related logic in get_features() now depends on unlock state, attach-to-pin capability, and passphrase PIN status via a local import. The top-level passphrase import was removed. The workflow handler wrapper no longer performs a post-execution version compatibility check.

Changes

Cohort / File(s) Summary of Changes
Passphrase feature computation
core/src/apps/base.py
Compute passphrase_protection only when unlocked; add local import of apps.common.passphrase; set passphrase_protection False if no attach-to-pin capability and passphrase PIN is enabled; otherwise use storage.device.is_passphrase_enabled(); remove prior top-level passphrase import usage.
Workflow version check removal
core/src/apps/workflow_handlers.py
Removed import and call to check_version_compatibility in _wrap_with_version_check; wrapper now awaits and returns handler result without post-run version check.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@revan-zhang
Copy link
Copy Markdown
Contributor

revan-zhang commented Aug 19, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b77b710 and 5b1a5ec.

📒 Files selected for processing (2)
  • core/src/apps/base.py (1 hunks)
  • core/src/apps/workflow_handlers.py (0 hunks)
💤 Files with no reviewable changes (1)
  • core/src/apps/workflow_handlers.py
🧰 Additional context used
🧬 Code Graph Analysis (1)
core/src/apps/base.py (2)
core/src/apps/common/passphrase.py (1)
  • is_passphrase_pin_enabled (15-16)
core/src/storage/device.py (2)
  • is_passphrase_pin_enabled (1423-1431)
  • is_passphrase_enabled (908-912)
⏰ 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). (3)
  • GitHub Check: Gen check
  • GitHub Check: Defs check
  • GitHub Check: Style check

@guowei0105 guowei0105 merged commit fdd458e into OneKeyHQ:main Aug 19, 2025
9 checks passed
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