fix: error loading identities from local DB on token creation screen#364
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 (
|
There was a problem hiding this comment.
Pull Request Overview
This PR addresses errors when loading identities with null wallets by ensuring wallet info is properly determined and loaded, standardizes custom_dash_qt_path handling using PathBuf, and streamlines version management.
- Added error logging and early return in the token creator when local identities fail to load
- Migrated all
custom_dash_qt_pathfields and database storage to usePathBuf, with improved UI enable/disable behavior - Introduced
determine_wallet_infoinQualifiedIdentity, replaced build script version include withenv!("CARGO_PKG_VERSION"), and enhanced logging
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ui/tokens/tokens_screen/token_creator.rs | Added tracing error log when identities fail to load |
| src/ui/network_chooser_screen.rs | Migrated custom_dash_qt_path to PathBuf and updated Start button UI |
| src/ui/identities/keys/key_info_screen.rs | Updated insert_local_qualified_identity calls to new signature |
| src/ui/components/top_panel.rs | Guarded Dash-Qt startup on presence of custom path |
| src/model/qualified_identity/mod.rs | Added determine_wallet_info for wallet seed index extraction |
| src/main.rs | Replaced version include with env!("CARGO_PKG_VERSION") constant |
| src/logging.rs | Enhanced logger init with structured version and log file info |
| src/database/settings.rs | Changed Dash-Qt path to use PathBuf and added conversion logic |
| src/database/initialization.rs | Improved migration panic message with version details |
| src/database/identities.rs | Updated insert/get local identities to pass wallet info by reference |
| src/context.rs | Refactored load_local_user_identities to load wallets into identities |
| src/backend_task/identity/register_identity.rs | Adapted insert_local_qualified_identity calls to new signature |
| src/backend_task/identity/load_identity_from_wallet.rs | Updated insert_local_qualified_identity signature for wallet info |
| src/backend_task/identity/load_identity.rs | Integrated determine_wallet_info when loading identities |
| src/backend_task/core/start_dash_qt.rs | Simplified Dash-Qt binary resolution to require PathBuf |
| src/backend_task/core/mod.rs | Updated CoreTask variant to accept PathBuf |
| src/app.rs | Introduced detect_dash_qt_path util and use Option<PathBuf> for custom path |
| build.rs | Removed build script (version.rs generation) |
| Cargo.toml | Removed build entry and updated dependencies |
Comments suppressed due to low confidence (1)
src/context.rs:334
- The type
WalletSeedHashis used but not imported in this file; adduse crate::model::qualified_identity::WalletSeedHash;(or the appropriate path) to avoid compilation errors.
fn load_wallet_for_identity(
&self,
identity: &mut QualifiedIdentity,
wallet_hashes: &[WalletSeedHash],
) -> Result<()> {
* feat: add token by token id * fmt * update cargo toml
Previously, if the content did not fit on the screen there was no way to view it unless the application window could be made larger
…evious attempt (#372) * ok * fix * fmt
* feat: dark mode * ok * fmt * clippy
* fix: identity not found error when refreshing identities * chore: ui - gray out inactive identities * chore: minor ui fixes * chore: identity status creation failed cannot be reliably determined * fix: det overwrites pending/failed creation status * chore: copilot's review * chore: refactor * Update src/model/qualified_identity/mod.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: not needed migration call removed * chore: clippy --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feat: enhance input decoding to support multiple formats * more work * more work
* fix: token balances displaying decimals incorrectly * fix * fix * fmt
…ds per timestamp (#381)
f630e42 to
ffcb001
Compare
|
@coderabbitai review all |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain@lklimek I'll conduct a comprehensive review of all changes in this PR. Let me first gather information about what files have been modified. 🏁 Script executed: Length of output: 481 Let me try a different approach to identify the changes in this PR: 🏁 Script executed: Length of output: 62801 This is a substantial PR that appears to add comprehensive token functionality to the Dash Evo Tool. Let me examine the key changes to provide a thorough review. 🏁 Script executed: Length of output: 13017 🏁 Script executed: Length of output: 6853 🏁 Script executed: Length of output: 5365 🏁 Script executed: Length of output: 7855 Based on my comprehensive review of this substantial PR, I'll provide feedback on the key areas of concern and improvements needed. 🔍 Overall AssessmentThis is a massive PR (486 files, 39K+ additions) that introduces a comprehensive token management system to Dash Evo Tool. While the feature set is impressive, there are several critical concerns that need to be addressed.
|
Importing an identity from the network causes NULL wallet in database identity table. This causes errors when loading identities.