dashpay / dash-evo-tool

A tool to interact with Evolution
MIT License
4 stars 2 forks source link

feat: remove all compilation warnings #23

Closed pauldelucia closed 6 days ago

pauldelucia commented 1 week ago

Summary by CodeRabbit

coderabbitai[bot] commented 1 week ago

Walkthrough

The pull request implements significant changes across multiple files, primarily focusing on simplifying the application state and configuration management. Key modifications include the removal of various enum variants, methods, and fields from the AppState, NetworkConfig, and AppContext structures. Additionally, several database-related methods for managing contested names, contracts, and identities have been eliminated. The UI components have also been updated to reflect these changes, with adjustments to method signatures and error handling. Overall, the changes aim to streamline the codebase by reducing complexity and focusing on essential functionalities.

Changes

File Path Change Summary
src/app.rs Removed last_repaint from AppState, simplified DesiredAppAction and AppAction enums by removing variants, and updated update method to reflect these changes.
src/config.rs Removed multiple fields from NetworkConfig and eliminated methods related to validation and URI construction.
src/context.rs Removed NetworkConfig from AppContext, altered handling of network_config, and removed insert_local_identity method.
src/database/contested_names.rs Removed insert_or_update_name_contest and insert_or_update_contestant methods, affecting contested names and contestants management.
src/database/contracts.rs Removed insert_contract_if_not_exists and get_contract_by_name methods, renamed get_contracts to _get_contracts.
src/database/identities.rs Removed insert_remote_identity_if_not_exists method, simplifying identity management.
src/database/wallet.rs Removed UTXO management methods and updated update_wallet_alias_and_main.
src/model/contested_name.rs Removed state_is_votable method from ContestState enum.
src/model/qualified_identity.rs Removed display_string method and simplified available_transfer_keys method.
src/model/wallet/mod.rs Removed identity_authentication_ecdsa_public_key and identity_registration_ecdsa_public_key methods.
src/model/wallet/utxos.rs Removed unused import for PublicKey.
src/platform/contested_names/mod.rs Removed QueryDPNSVoteContenders variant from ContestedResourceTask enum and updated related match statement.
src/platform/contested_names/query_dpns_contested_resources.rs Updated method signatures by removing sender parameter from query_dpns_ending_times and query_dpns_vote_contenders.
src/platform/contested_names/query_dpns_vote_contenders.rs Removed sender parameter from query_dpns_vote_contenders method signature.
src/platform/contested_names/query_ending_times.rs Removed sender parameter from query_dpns_ending_times method signature.
src/platform/contract.rs Deleted file containing ContractTask enum and related methods.
src/platform/document.rs Deleted file containing DocumentTask enum and related methods.
src/platform/identity/add_key_to_identity.rs Enhanced error handling in add_key_to_identity method.
src/platform/identity/register_identity.rs Improved error handling and input destructuring in register_identity method.
src/platform/mod.rs Removed DocumentTask and ContractTask variants from BackendTask and updated run_backend_task method.
src/ui/components/contract_chooser_panel.rs Renamed add_contract_chooser_panel to _add_contract_chooser_panel and updated method call to _get_contracts.
src/ui/components/left_panel.rs Removed app_context parameter from add_left_panel function signature.
src/ui/document_query_screen.rs Removed sorting-related fields and methods from DocumentQueryScreen struct.
src/ui/dpns_contested_names_screen.rs Simplified add_left_panel function call by removing app_context argument.
src/ui/identities/add_existing_identity_screen.rs Removed fields from several structs related to identity management.
src/ui/identities/add_new_identity_screen.rs Removed KeyInfo struct and renamed new method to _new.
src/ui/identities/add_new_wallet_screen.rs Removed alias_input field from AddNewWalletScreen struct.
src/ui/identities/identities_screen.rs Updated ui method to simplify add_left_panel call and added parameter to show_public_key method.
src/ui/identities/register_dpns_name_screen.rs Enhanced user interface and feedback in RegisterDpnsNameScreen methods.
src/ui/key_info_screen.rs Improved error handling in ui and validate_and_store_private_key methods.
src/ui/mod.rs Removed AddNewIdentity variant from ScreenType enum and updated related methods.
src/ui/network_chooser_screen.rs Removed check_core_status method and updated add_left_panel call.
src/ui/transfers/mod.rs Updated display_message method to simplify its parameter and enhanced error handling in show_confirmation_popup.
src/ui/transition_visualizer_screen.rs Simplified add_left_panel call by removing app_context parameter.

Possibly related PRs

Suggested reviewers

🐰 In the code we hop and play,
Simplifying things along the way.
With enums trimmed and methods few,
Our app is light, and so much new!
Let's celebrate this code delight,
For every change makes our work bright! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
🪧 Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit , please review it.` - `Generate unit testing code for this file.` - `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 generate unit testing code for this file.` - `@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 generate unit testing code.` - `@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.` 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 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.