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

R4R: Prompt user for confirmation when deleting ledger and offline keys #2923

Merged
merged 7 commits into from
Nov 29, 2018

Conversation

alessio
Copy link
Contributor

@alessio alessio commented Nov 28, 2018

  • Add --yes flag to skip confirmation.
  • Keybase.Delete() does not check passphrase == "yes" anymore. It's command line tool responsibility to prompt user for confirmation when deleting ledger/offline keys.

Closes: #2921

  • Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote tests
  • Updated relevant documentation (docs/)
  • Added entries in PENDING.md with issue #
  • rereviewed Files changed in the github PR explorer

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Nov 28, 2018

Codecov Report

Merging #2923 into develop will decrease coverage by 0.05%.
The diff coverage is 75%.

@@             Coverage Diff             @@
##           develop    #2923      +/-   ##
===========================================
- Coverage    56.29%   56.23%   -0.06%     
===========================================
  Files          120      120              
  Lines         8411     8400      -11     
===========================================
- Hits          4735     4724      -11     
  Misses        3354     3354              
  Partials       322      322

@alessio alessio changed the title WIP: Force password to 'yes' when deleting ledger and offline keys R4R: Force password to 'yes' when deleting ledger and offline keys Nov 28, 2018
Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

See comments.

client/keys/delete.go Outdated Show resolved Hide resolved
client/keys/delete.go Outdated Show resolved Hide resolved
client/keys/delete.go Outdated Show resolved Hide resolved
crypto/keys/keybase.go Outdated Show resolved Hide resolved
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

tested (non-ledger) and LGTM.

if err != nil {
return err
}

buf := client.BufferStdin()
if info.GetType() == keys.TypeLedger || info.GetType() == keys.TypeOffline {
if !viper.GetBool(flagYes) {
Copy link
Contributor

Choose a reason for hiding this comment

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

++

@alessio alessio force-pushed the alessio/2921-delete-ledger-keys branch from 85a4917 to 2cc3b8f Compare November 28, 2018 18:59
@cwgoes
Copy link
Contributor

cwgoes commented Nov 28, 2018

CI failure is unrelated, once fixed on develop this LGTM.

@alessio alessio force-pushed the alessio/2921-delete-ledger-keys branch from 4898f1b to 4a5b52a Compare November 29, 2018 15:48
@alessio alessio changed the title R4R: Force password to 'yes' when deleting ledger and offline keys R4R: Ask for confirmation when deleting ledger and offline keys Nov 29, 2018
@alessio alessio changed the title R4R: Ask for confirmation when deleting ledger and offline keys R4R: Prompt user for confirmation when deleting ledger and offline keys Nov 29, 2018
crypto/keys/keybase.go Show resolved Hide resolved
@cwgoes cwgoes merged commit a6bc60e into develop Nov 29, 2018
@cwgoes cwgoes deleted the alessio/2921-delete-ledger-keys branch November 29, 2018 20:55
mircea-c pushed a commit that referenced this pull request Dec 4, 2018
… offline keys

* Force password to 'yes' when deleting ledger-offline keys
* Improve UX, better docs on removing offline/ledger keys
* Ask for confirmation on offline/ledger keys deletion
chengwenxi added a commit to chengwenxi/irishub that referenced this pull request Dec 19, 2018
chillyvee pushed a commit to chillyvee/cosmos-sdk that referenced this pull request Mar 1, 2024
* fix!: check v1 and v1beta1 MsgVote in VoteSpamDecorator

cosmos/gaia#2912 introuced the VoteSpamDecorator.

The implementation was not complete and only v1beta1 gov types were handled.

The CLI supports v1 gov types so the validation was not sufficient.

This commit expands the antehandler validation to allow correct processing of both v1 and v1beta1 messages.

* appease linter

* test: stop app from failing non-determinism test on gov vote

* ante: handle edgecase with 0 minStakedTokens

* appease linter
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.

4 participants