v0.0.7 - Fix: 'g' key only generates mnemonic when input buffer is empty, not while typing words

This commit is contained in:
Laan Tungir
2026-08-19 13:45:01 -04:00
parent 52ac2357f3
commit 7bc367e695
4 changed files with 9 additions and 5 deletions
Generated
+1 -1
View File
@@ -1490,7 +1490,7 @@ dependencies = [
[[package]]
name = "nsigner"
version = "0.0.5"
version = "0.0.6"
dependencies = [
"base64",
"chacha20poly1305",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "nsigner"
version = "0.0.6"
version = "0.0.7"
edition = "2021"
license = "MIT"
description = "Attended Nostr signing daemon — Rust port of n_signer"
+1 -1
View File
@@ -31,4 +31,4 @@ pub mod error;
pub use error::NsignerError;
/// Version string (matches C NSIGNER_VERSION).
pub const VERSION: &str = "v0.0.6";
pub const VERSION: &str = "v0.0.7";
+6 -2
View File
@@ -587,8 +587,12 @@ impl App {
// ── Seed entry ──────────────────────────────────────────────────────
fn handle_seed_key(&mut self, key: KeyEvent) {
// 'g' generates a new mnemonic directly.
if key.code == KeyCode::Char('g') || key.code == KeyCode::Char('G') {
// 'g' generates a new mnemonic only when the input buffer is empty.
// If the user has already started typing, 'g' is just a letter in a
// mnemonic word.
if (key.code == KeyCode::Char('g') || key.code == KeyCode::Char('G'))
&& self.unlock_input.buffer.is_empty()
{
match self.mnemonic.generate(12) {
Ok(phrase) => {
self.generated_phrase = phrase;