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

Fixed cli restore in existing wallet folder #1187

Merged
merged 21 commits into from
Sep 22, 2023

Conversation

kwek20
Copy link
Contributor

@kwek20 kwek20 commented Sep 8, 2023

Description of change

Checks before restoring a stronghold file if there is an existing stronghold.
The check for restoring when accounts exist was already in place, with error: "can't restore backup when there are already accounts"
Also adds a check for snapshot_path being a file, not folder (it crashes oddly if you send a folder path)

Links to any relevant issues

Closes #1068

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How the change has been tested

Ran the following scenarios:

  • Import an export in empty folder
  • Import an export in a folder with wallet, but no account
  • Import an export in a folder with wallet with accounts
  • Import from the same folder as export (this errors saying already has an account, or succeeds if there wasnt any)

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Thoralf-M
Thoralf-M previously approved these changes Sep 11, 2023
DaughterOfMars
DaughterOfMars previously approved these changes Sep 18, 2023
Copy link
Member

@thibault-martinez thibault-martinez left a comment

Choose a reason for hiding this comment

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

Changelog

cli/src/command/wallet.rs Outdated Show resolved Hide resolved
DaughterOfMars
DaughterOfMars previously approved these changes Sep 20, 2023
Thoralf-M
Thoralf-M previously approved these changes Sep 20, 2023
Thoralf-M
Thoralf-M previously approved these changes Sep 21, 2023
abdulmth
abdulmth previously approved these changes Sep 21, 2023
@kwek20 kwek20 dismissed stale reviews from abdulmth and Thoralf-M via e51776f September 21, 2023 15:18
Thoralf-M
Thoralf-M previously approved these changes Sep 21, 2023
abdulmth
abdulmth previously approved these changes Sep 22, 2023
@thibault-martinez thibault-martinez merged commit ba10600 into iotaledger:1.1 Sep 22, 2023
35 checks passed
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.

[Bug]: (CLI) restore command asks for the cached stronghold instead of specified
6 participants