-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --save-path
Option to VanityArgs
for Custom Wallet File Saving
#6475
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good
You need to format with nightly |
Thank you very much for your assistance and guidance! I successfully formatted my code using the cargo +nightly fmt command, and now everything conforms to the project's formatting standards. Your support throughout this process has been invaluable. |
Updated test and made the option write directly to the given path rather than appending a file name to it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reasonable
Motivation
The current implementation of the cast wallet vanity generation tool (VanityArgs struct) lacks the flexibility of specifying a custom file path for saving generated wallet details. Users who need to organize their wallet information in specific directories, or those managing multiple wallets, are currently limited to the tool's default behavior of saving these details in the current working directory. This limitation can be inconvenient for users who require more control over where their wallet details are stored.
Solution
This PR introduces the save_path option to the VanityArgs struct, providing users the ability to specify a custom path for saving their wallet details. The implementation updates the run method within the VanityArgs struct to handle the logic for saving the wallet details at the user-specified path. If no path is specified, the wallet details will be saved in the current working directory, maintaining the existing default behavior.