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!: key rename cli command #9601

Merged
merged 29 commits into from
Jul 19, 2021
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
238dbe2
added key renaming
technicallyty Jun 28, 2021
46762a6
add cli cmds
technicallyty Jun 28, 2021
950752a
changelog
technicallyty Jun 28, 2021
4368e14
gofmt
technicallyty Jun 28, 2021
8283b67
move changelog
technicallyty Jun 28, 2021
9acfb00
fix root_test
technicallyty Jun 29, 2021
16b6632
Apply suggestions from code review
technicallyty Jul 5, 2021
ec01a52
Merge branch 'master' into ty/9407-rename_keys_cli
technicallyty Jul 5, 2021
26ec3a5
add equality function
technicallyty Jul 5, 2021
9a2ba38
Update crypto/keyring/keyring.go
technicallyty Jul 6, 2021
2c7395b
move passphrase to const defs
technicallyty Jul 6, 2021
588c082
refactor test
technicallyty Jul 6, 2021
ed51363
allow duplicate keys as long as names are different
technicallyty Jul 6, 2021
8d464aa
Merge branch 'master' into ty/9407-rename_keys_cli
technicallyty Jul 6, 2021
fc19867
lint
technicallyty Jul 6, 2021
c6aed98
Update CHANGELOG.md
technicallyty Jul 8, 2021
3c1e9b9
Update crypto/keyring/keyring.go
technicallyty Jul 8, 2021
4044320
Merge branch 'master' into ty/9407-rename_keys_cli
technicallyty Jul 9, 2021
e4d2a3f
Merge branch 'master' into ty/9407-rename_keys_cli
mergify[bot] Jul 10, 2021
2d563b2
Merge branch 'master' into ty/9407-rename_keys_cli
mergify[bot] Jul 12, 2021
1a9347c
Merge branch 'master' into ty/9407-rename_keys_cli
mergify[bot] Jul 12, 2021
102169b
Merge branch 'master' into ty/9407-rename_keys_cli
mergify[bot] Jul 12, 2021
e3cca96
Merge branch 'master' into ty/9407-rename_keys_cli
mergify[bot] Jul 12, 2021
3865a9e
Merge branch 'master' into ty/9407-rename_keys_cli
mergify[bot] Jul 13, 2021
aae59f9
Merge branch 'master' into ty/9407-rename_keys_cli
mergify[bot] Jul 13, 2021
e6f8508
Merge branch 'master' into ty/9407-rename_keys_cli
mergify[bot] Jul 13, 2021
e5e35f6
Merge branch 'master' into ty/9407-rename_keys_cli
mergify[bot] Jul 17, 2021
4edd229
Merge branch 'master' into ty/9407-rename_keys_cli
technicallyty Jul 18, 2021
c21bd5f
Merge branch 'master' into ty/9407-rename_keys_cli
amaury1093 Jul 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update crypto/keyring/keyring.go
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
  • Loading branch information
technicallyty and alexanderbez authored Jul 6, 2021
commit 9a2ba3836a7798ba05fee866ed6ad48be8c3bd26
2 changes: 1 addition & 1 deletion crypto/keyring/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ func (ks keystore) DeleteByAddress(address sdk.Address) error {
func (ks keystore) Rename(oldName, newName string) error {
_, err := ks.Key(newName)
if err == nil {
return errors.New(fmt.Sprintf("rename failed: %s already exists in the keyring", newName))
return fmt.Errorf("rename failed: %s already exists in the keyring", newName)
}

passPhrase := "temp"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this should be a private const

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup that makes much more sense - moved it to the other private const vars

Expand Down