Skip to content

Conversation

@CharlVS
Copy link
Collaborator

@CharlVS CharlVS commented Jul 23, 2025

This pull request introduces enhancements to the security settings flow, focusing on private key management and pubkey unbanning. It also includes updates to UI components and localization strings. The most significant changes are grouped into themes: private key management, seed phrase handling, and UI improvements.

Private Key Management Enhancements:

  • Added events and state management for private key export, including authentication, visibility toggling, copying, downloading, and security warnings. Private keys are handled in the UI layer for minimal memory exposure. (lib/bloc/security_settings/security_settings_bloc.dart, lib/bloc/security_settings/security_settings_event.dart, lib/bloc/security_settings/security_settings_state.dart) [1] [2] [3]
  • Introduced SecuritySettingsStep.privateKeyShow to represent private key export in the flow. (lib/bloc/security_settings/security_settings_state.dart)

Seed Phrase Handling:

  • Enhanced seed phrase-related events and methods, including confirmation, visibility toggling, and clipboard handling. (lib/bloc/security_settings/security_settings_bloc.dart, lib/bloc/security_settings/security_settings_event.dart) [1] [2]
  • Updated localization strings to improve clarity for seed phrase-related actions. (assets/translations/en.json)

UI Improvements:

  • Updated the wallet password dialog to show a loading indicator when an action is in progress. (lib/views/common/wallet_password_dialog/password_dialog_content.dart)
  • Added new localization strings for private key export functionality, including warnings and success messages. (assets/translations/en.json)

These changes collectively enhance the security settings flow, improve user experience, and ensure sensitive data is handled securely.

Roll SDK for overhauled privkey export in KDF branch `offline_key_export` and implement privkey methods into SDK
@CharlVS CharlVS self-assigned this Jul 23, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 23, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add/hd-privkey-export

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.

❤️ Share
🪧 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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

@CharlVS CharlVS marked this pull request as draft July 23, 2025 22:40
@github-actions
Copy link

github-actions bot commented Jul 23, 2025

Visit the preview URL for this PR (updated for commit 2bb9a4d):

https://walletrc--pull-2982-merge-kl5rm3ui.web.app

(expires Wed, 06 Aug 2025 19:28:58 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@CharlVS CharlVS changed the title feat(wallet): HD + offline private key export and Tendermint HD support feat(wallet): HD + offline private key export Jul 26, 2025
@CharlVS CharlVS changed the title feat(wallet): HD + offline private key export feat(wallet): HD + offline private key export + unban pubkeys Jul 29, 2025
@CharlVS CharlVS added the QA Ready for QA Testing label Jul 29, 2025
@CharlVS CharlVS added this to the v0.9.2 Release milestone Jul 29, 2025
@CharlVS CharlVS marked this pull request as ready for review July 29, 2025 16:09
@CharlVS CharlVS requested review from ca333 and smk762 July 29, 2025 16:09
Remove redundant pubkey unban control in the general settings page since it is also in the security settings page.
cursor[bot]

This comment was marked as outdated.

@smk762
Copy link
Collaborator

smk762 commented Jul 30, 2025

UX Enhancement

Currently the private keys are shown on their own. This was ok in non-HD mode, as it was clear that the single private key related to the single address for a coin in your wallet.

Since we've introduced HD, it is less obvious which private key links to which address. Though the derivation path is shown, casual users are unlikely to understand this.

To improve the UX in this page, I suggest that alongside the private key, we include the address (at minimum). Including the pubkey might come in handy, if space is available. The derivation path should be retained in view.

@smk762
Copy link
Collaborator

smk762 commented Jul 30, 2025

confirmed privkey export not accessible in Trezor mode ✅

cursor[bot]

This comment was marked as outdated.

@CharlVS
Copy link
Collaborator Author

CharlVS commented Jul 30, 2025

Blocker

To replicate:

  • Login, and attempt to activate HT and/or some HCO20 tokens. These will predictably fail to activate
  • Go to settings > security > export private keys
  • enter password
  • Don't see HT in the list.

{SNIP}

I should be able to see it listed in the privkey exports list, and have its keys exported.

@smk762, please re-test this - I've pushed a fix. I've also included the address/pubkey in the UI as requested.

image

In HD mode, I notice the first 11 keys are on display (assuming default start index 0 and end_index `10). Though this is a reasonable (literal) starting point, my wallet has not actually created most of these addresses yet. There is also the case of a mature wallet which may have active addresses beyond the 11th address index.

The KDF team has confirmed that they will address it in 2.6.0 and that it should have already been like that. Perhaps add an issues in the KDF repo so that it doesn't slip through the cracks.

Though a global "hide private keys" is better than nothing, our more paranoid users may appreciate individual visibility triggers (akin to those we have in use in the login password input field). This is not a blocker and can be delegated to enhancement issue if needed.

image

Please open an issue.

CharlVS added 2 commits July 30, 2025 17:54
Display a tooltip for the sparkline chart so users can understand what the data represents, considering that we no longer display table headings.
Roll SDK for address generation errors
cursor[bot]

This comment was marked as outdated.

@CharlVS CharlVS changed the title feat(wallet): HD + offline private key export + unban pubkeys feat(wallet): HD & offline private key export + unban pubkeys Jul 30, 2025
Copy link
Collaborator

@smk762 smk762 left a comment

Choose a reason for hiding this comment

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

Confirmed blocker resolved. HT now returns privkeys despite failure to activate 🎉
Addresses for each privkey now also visible which was primary UX concern. Other comments will be converted to issue for next release.

CharlVS added 2 commits July 30, 2025 21:22
Delete HD-related types. Previous references have likely been migrated to the SDK types.

TODO: Investigate if there are any other similar cases.
@CharlVS CharlVS merged commit 5d57faf into dev Jul 30, 2025
10 of 14 checks passed
@CharlVS CharlVS deleted the add/hd-privkey-export branch July 30, 2025 19:26
smk762 pushed a commit that referenced this pull request Aug 1, 2025
* chore: roll sdk for overhauled privkey export

Roll SDK for overhauled privkey export in KDF branch `offline_key_export` and implement privkey methods into SDK

* chore: roll SDK

* wip: settings private key export

* chore: roll sdk

* chore: roll SDK

* fix(ui): polish private key export

* chore: roll SDK

* fix(lint): fix lint warning

* fix: minor private key fixes

* feat(ui): Simplify/polish private key export

* feat: pubkey unbanning

* refactor: clean up pubkey unbanning

* fix: remove duplicate pubkey unbanning message

* fix(ui): Enforce max scaffold message width for unbanning

* fix(ui): Remove redundant pubkey unban control

Remove redundant pubkey unban control in the general settings page since it is also in the security settings page.

* refactor: make password confirmation re-usable

* fix(password): allow auto-fill for password confirmation

* feat: password manager integration for password confirmation

* chore: roll SDK for pubkey unban fix

* chore: roll SDK

* fix: include failed activations in privkey export

* fix(ui): show tooltip for sparkline chart

Display a tooltip for the sparkline chart so users can understand what the data represents, considering that we no longer display table headings.

* chore: roll SDK

Roll SDK for address generation errors

* chore: delete unused types

Delete HD-related types. Previous references have likely been migrated to the SDK types.

TODO: Investigate if there are any other similar cases.

* chore: roll SDK
smk762 pushed a commit that referenced this pull request Aug 1, 2025
git status
q
git config --list | grep -E "(rebase|pull|push)"
at(wallet): HD & offline private key export + unban pubkeys (#2982)

* chore: roll sdk for overhauled privkey export

Roll SDK for overhauled privkey export in KDF branch `offline_key_export` and implement privkey methods into SDK

* chore: roll SDK

* wip: settings private key export

* chore: roll sdk

* chore: roll SDK

* fix(ui): polish private key export

* chore: roll SDK

* fix(lint): fix lint warning

* fix: minor private key fixes

* feat(ui): Simplify/polish private key export

* feat: pubkey unbanning

* refactor: clean up pubkey unbanning

* fix: remove duplicate pubkey unbanning message

* fix(ui): Enforce max scaffold message width for unbanning

* fix(ui): Remove redundant pubkey unban control

Remove redundant pubkey unban control in the general settings page since it is also in the security settings page.

* refactor: make password confirmation re-usable

* fix(password): allow auto-fill for password confirmation

* feat: password manager integration for password confirmation

* chore: roll SDK for pubkey unban fix

* chore: roll SDK

* fix: include failed activations in privkey export

* fix(ui): show tooltip for sparkline chart

Display a tooltip for the sparkline chart so users can understand what the data represents, considering that we no longer display table headings.

* chore: roll SDK

Roll SDK for address generation errors

* chore: delete unused types

Delete HD-related types. Previous references have likely been migrated to the SDK types.

TODO: Investigate if there are any other similar cases.

* chore: roll SDK
smk762 pushed a commit that referenced this pull request Aug 1, 2025
* chore: roll sdk for overhauled privkey export

Roll SDK for overhauled privkey export in KDF branch `offline_key_export` and implement privkey methods into SDK

* chore: roll SDK

* wip: settings private key export

* chore: roll sdk

* chore: roll SDK

* fix(ui): polish private key export

* chore: roll SDK

* fix(lint): fix lint warning

* fix: minor private key fixes

* feat(ui): Simplify/polish private key export

* feat: pubkey unbanning

* refactor: clean up pubkey unbanning

* fix: remove duplicate pubkey unbanning message

* fix(ui): Enforce max scaffold message width for unbanning

* fix(ui): Remove redundant pubkey unban control

Remove redundant pubkey unban control in the general settings page since it is also in the security settings page.

* refactor: make password confirmation re-usable

* fix(password): allow auto-fill for password confirmation

* feat: password manager integration for password confirmation

* chore: roll SDK for pubkey unban fix

* chore: roll SDK

* fix: include failed activations in privkey export

* fix(ui): show tooltip for sparkline chart

Display a tooltip for the sparkline chart so users can understand what the data represents, considering that we no longer display table headings.

* chore: roll SDK

Roll SDK for address generation errors

* chore: delete unused types

Delete HD-related types. Previous references have likely been migrated to the SDK types.

TODO: Investigate if there are any other similar cases.

* chore: roll SDK
smk762 pushed a commit that referenced this pull request Aug 1, 2025
* chore: roll sdk for overhauled privkey export

Roll SDK for overhauled privkey export in KDF branch `offline_key_export` and implement privkey methods into SDK

* chore: roll SDK

* wip: settings private key export

* chore: roll sdk

* chore: roll SDK

* fix(ui): polish private key export

* chore: roll SDK

* fix(lint): fix lint warning

* fix: minor private key fixes

* feat(ui): Simplify/polish private key export

* feat: pubkey unbanning

* refactor: clean up pubkey unbanning

* fix: remove duplicate pubkey unbanning message

* fix(ui): Enforce max scaffold message width for unbanning

* fix(ui): Remove redundant pubkey unban control

Remove redundant pubkey unban control in the general settings page since it is also in the security settings page.

* refactor: make password confirmation re-usable

* fix(password): allow auto-fill for password confirmation

* feat: password manager integration for password confirmation

* chore: roll SDK for pubkey unban fix

* chore: roll SDK

* fix: include failed activations in privkey export

* fix(ui): show tooltip for sparkline chart

Display a tooltip for the sparkline chart so users can understand what the data represents, considering that we no longer display table headings.

* chore: roll SDK

Roll SDK for address generation errors

* chore: delete unused types

Delete HD-related types. Previous references have likely been migrated to the SDK types.

TODO: Investigate if there are any other similar cases.

* chore: roll SDK
smk762 pushed a commit that referenced this pull request Aug 1, 2025
* chore: roll sdk for overhauled privkey export

Roll SDK for overhauled privkey export in KDF branch `offline_key_export` and implement privkey methods into SDK

* chore: roll SDK

* wip: settings private key export

* chore: roll sdk

* chore: roll SDK

* fix(ui): polish private key export

* chore: roll SDK

* fix(lint): fix lint warning

* fix: minor private key fixes

* feat(ui): Simplify/polish private key export

* feat: pubkey unbanning

* refactor: clean up pubkey unbanning

* fix: remove duplicate pubkey unbanning message

* fix(ui): Enforce max scaffold message width for unbanning

* fix(ui): Remove redundant pubkey unban control

Remove redundant pubkey unban control in the general settings page since it is also in the security settings page.

* refactor: make password confirmation re-usable

* fix(password): allow auto-fill for password confirmation

* feat: password manager integration for password confirmation

* chore: roll SDK for pubkey unban fix

* chore: roll SDK

* fix: include failed activations in privkey export

* fix(ui): show tooltip for sparkline chart

Display a tooltip for the sparkline chart so users can understand what the data represents, considering that we no longer display table headings.

* chore: roll SDK

Roll SDK for address generation errors

* chore: delete unused types

Delete HD-related types. Previous references have likely been migrated to the SDK types.

TODO: Investigate if there are any other similar cases.

* chore: roll SDK
smk762 pushed a commit that referenced this pull request Aug 1, 2025
* chore: roll sdk for overhauled privkey export

Roll SDK for overhauled privkey export in KDF branch `offline_key_export` and implement privkey methods into SDK

* chore: roll SDK

* wip: settings private key export

* chore: roll sdk

* chore: roll SDK

* fix(ui): polish private key export

* chore: roll SDK

* fix(lint): fix lint warning

* fix: minor private key fixes

* feat(ui): Simplify/polish private key export

* feat: pubkey unbanning

* refactor: clean up pubkey unbanning

* fix: remove duplicate pubkey unbanning message

* fix(ui): Enforce max scaffold message width for unbanning

* fix(ui): Remove redundant pubkey unban control

Remove redundant pubkey unban control in the general settings page since it is also in the security settings page.

* refactor: make password confirmation re-usable

* fix(password): allow auto-fill for password confirmation

* feat: password manager integration for password confirmation

* chore: roll SDK for pubkey unban fix

* chore: roll SDK

* fix: include failed activations in privkey export

* fix(ui): show tooltip for sparkline chart

Display a tooltip for the sparkline chart so users can understand what the data represents, considering that we no longer display table headings.

* chore: roll SDK

Roll SDK for address generation errors

* chore: delete unused types

Delete HD-related types. Previous references have likely been migrated to the SDK types.

TODO: Investigate if there are any other similar cases.

* chore: roll SDK
smk762 pushed a commit that referenced this pull request Aug 8, 2025
* chore: roll sdk for overhauled privkey export

Roll SDK for overhauled privkey export in KDF branch `offline_key_export` and implement privkey methods into SDK

* chore: roll SDK

* wip: settings private key export

* chore: roll sdk

* chore: roll SDK

* fix(ui): polish private key export

* chore: roll SDK

* fix(lint): fix lint warning

* fix: minor private key fixes

* feat(ui): Simplify/polish private key export

* feat: pubkey unbanning

* refactor: clean up pubkey unbanning

* fix: remove duplicate pubkey unbanning message

* fix(ui): Enforce max scaffold message width for unbanning

* fix(ui): Remove redundant pubkey unban control

Remove redundant pubkey unban control in the general settings page since it is also in the security settings page.

* refactor: make password confirmation re-usable

* fix(password): allow auto-fill for password confirmation

* feat: password manager integration for password confirmation

* chore: roll SDK for pubkey unban fix

* chore: roll SDK

* fix: include failed activations in privkey export

* fix(ui): show tooltip for sparkline chart

Display a tooltip for the sparkline chart so users can understand what the data represents, considering that we no longer display table headings.

* chore: roll SDK

Roll SDK for address generation errors

* chore: delete unused types

Delete HD-related types. Previous references have likely been migrated to the SDK types.

TODO: Investigate if there are any other similar cases.

* chore: roll SDK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QA Ready for QA Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants