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

issue #3992 [Setup] Fix showing error modal when uploading invalid private key #4058

Merged
merged 2 commits into from Oct 15, 2021

Conversation

limonte
Copy link
Contributor

@limonte limonte commented Oct 15, 2021

This PR fixes showing the error modal when user imports invalid key file. The functionality was already there, but it was broken.

close #3992


Tests (delete all except exactly one):

  • Tests added or updated

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

@@ -14,6 +14,7 @@ import { KeyUtil } from '../../core/crypto/key';
export type SavePassphraseChecks = {
isSavePassphraseHidden?: boolean | undefined,
isSavePassphraseChecked?: boolean | undefined
isInvalidKey?: boolean | undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

This check isn't related to "save passphrase", so the type name SavePassphraseChecks would no longer be relevant.
Moreover, these checks are supposed to be optional (can be skipped), which is not the case with invalid key -- we HAVE to dismiss the alert to proceed with the recipe, so conceptually this is not the best place for this parameter.
Can we put it somewhere to ManualEnterOpts maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks 👍

@rrrooommmaaa rrrooommmaaa merged commit 37b5415 into master Oct 15, 2021
@rrrooommmaaa rrrooommmaaa deleted the issue-3992-notify-about-invalid-private-key branch October 15, 2021 12:52
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.

Nothing happens when selecting an invalid key file during setting up the FlowCrypt Extension
2 participants