Skip to content
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

feat: add wallet backup #29

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

chandrabosep
Copy link

Implemented Wallet Backup Functionality

Description:

  • Added backupCommand function to handle wallet backups.
  • Validates backup path and ensures directory creation if needed.
  • Supports saving wallet data to the specified file, with default filename handling for directories.
  • Improved error handling for edge cases (e.g., missing wallet file, invalid paths).

Example Usage:

image

image

@chrisarevalodev
Copy link
Collaborator

Hey @chandrabosep! Thanks a lot for your contribution. I already tested it and is working fine so well done!

I just have one comment: in the wallet.ts file you created a function called backupCommand that manages backing up the wallet data in the directory/file the user specifies. In this function, at the moment you are about to write the content in the file, your code is so similar to the function writeWalletData so you can maybe use this function to reduce duplicated code. Feel free to edit the writeWalletData as it fits your needs and it doesn't affect the code already working.

Let me know if you have any questions or if you have a different opinion so we can discuss it. I'll be looking forward to the updates.

Thanks again!

@chandrabosep
Copy link
Author

Hey @chrisarevalodev

Thank you for the feedback! I will reuse the code and will update you soon!

@chandrabosep
Copy link
Author

Hey @chrisarevalodev

Could you review the changes I made and also take a look at the batch transfer PR #30

Thanks!

Copy link
Collaborator

@chrisarevalodev chrisarevalodev left a comment

Choose a reason for hiding this comment

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

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.

2 participants