fix(desktop): show Continue when a raw nsec is loaded in the backup restore dialog - #6649
Open
BradGroux wants to merge 1 commit into
Open
fix(desktop): show Continue when a raw nsec is loaded in the backup restore dialog#6649BradGroux wants to merge 1 commit into
BradGroux wants to merge 1 commit into
Conversation
…estore dialog
The backup-file restore dialog (mode="backup") accepts .key files
containing a raw nsec1 key. The file parser loads the key and shows
"Nostr identity found" with the derived npub, but the submit button
only rendered when mode === "key" or isPasswordStage (ncryptsec). A
raw nsec in backup mode satisfies neither condition, so the user sees
a recognized identity with no forward action — a dead end.
Add isValid to the render guard so a valid raw nsec shows the Continue
button regardless of mode. The button's disabled={!isValid} check
already prevents submission of invalid input.
Closes block#5261.
Co-authored-by: Brad Groux <brad@digitalmeld.com>
Signed-off-by: Brad Groux <brad@digitalmeld.com>
Signed-off-by: dm-builder <f01486f036641ccb52c11bb1e0ff2346ea89a8b4e3b49cd772249948f6fcbae6@digitalmeld.communities.buzz.xyz>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The backup-file restore dialog accepts
.keyfiles containing a rawnsec1private key. The file parser loads the key and displays "Nostr identity found" with the derived npub, but the submit button only rendered whenmode === "key"orisPasswordStage(ncryptsec). A raw nsec inmode="backup"satisfies neither condition, so the user sees a recognized identity with no Continue button — a dead end with no forward action.Add
isValidto the submit button's render guard so a valid raw nsec shows the Continue button regardless of mode. The button's existingdisabled={!isValid}check prevents submission of invalid input, andkeyImportSubmitEnabledalready validates the nsec by deriving its npub.Related issue
Fixes #5261.
Testing