v0.0.7 - Fix: 'g' key only generates mnemonic when input buffer is empty, not while typing words
This commit is contained in:
Generated
+1
-1
@@ -1490,7 +1490,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nsigner"
|
||||
version = "0.0.5"
|
||||
version = "0.0.6"
|
||||
dependencies = [
|
||||
"base64",
|
||||
"chacha20poly1305",
|
||||
|
||||
+1
-1
@@ -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
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user