Skip to content
This repository has been archived by the owner on Feb 28, 2021. It is now read-only.

cli: Move from 'local account' to 'key-pair' #415

Merged
merged 2 commits into from
May 4, 2020
Merged

Conversation

NunoAlexandre
Copy link
Contributor

@NunoAlexandre NunoAlexandre commented May 1, 2020

Closes #414

  • Disambiguate the terminology 'account' and 'local account' by now
    calling local accounts key-pairs;
  • Move key-pair related commands to a new command group 'key-pair'
  • Update the README and the CHANGELOG
  • Migrate the local accounts.json file to key-pairs.json

Test required:
Pull this branch and run either of the key-pair sub-commands. Doing so will trigger a migration to rename the accounts.json file to key-pairs.json. I faced a permissions issue myself, where the accounts.json file permissions seem to have been changed somehow (recent system upgrade?).

Note: Docs companion PR: radicle-dev/registry.radicle.xyz#37

@NunoAlexandre NunoAlexandre added this to the FFnet milestone May 1, 2020
@NunoAlexandre NunoAlexandre requested a review from a team May 1, 2020 09:07
@NunoAlexandre NunoAlexandre self-assigned this May 1, 2020
@NunoAlexandre NunoAlexandre marked this pull request as ready for review May 1, 2020 09:11
Copy link
Contributor

@CodeSandwich CodeSandwich left a comment

Choose a reason for hiding this comment

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

For me the migration was flawless 👍

cli/src/command/account.rs Outdated Show resolved Hide resolved
@NunoAlexandre
Copy link
Contributor Author

Thanks, @CodeSandwich. I have included your rewording in the first commit.

cli/src/command/account.rs Outdated Show resolved Hide resolved
cli/src/command/account.rs Outdated Show resolved Hide resolved
- Disambiguate the terminology 'account' and 'local account' by now
calling local accounts key-pairs;
- Move key-pair related commands to a new command group 'key-pair'
- Update the README and the CHANGELOG
- Migrate the local accounts.json file to key-pairs.json
To follow the latest convention on error display, where we have a single
place printing all the source errors recursively. As it is now, the
source error is printed twice, first inlined and a second time beneath.
@NunoAlexandre
Copy link
Contributor Author

@geigerzaehler thanks for your review! Can you have another look?

if !path.exists() {
std::fs::write(path, b"{}").map_err(WritingError::IO)?;
}

Ok(path_buf)
}

fn build_path(filename: &str) -> Result<PathBuf, Error> {
let dir = dir()?;

Choose a reason for hiding this comment

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

Suggestion: dir is only used here. might make sense just to inline it.

@NunoAlexandre NunoAlexandre merged commit b2a1019 into master May 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cli: Differentiate between “local” accounts and on-chain accounts in terminology
3 participants