From ec68e972f7676c54d7d5f06e06861fe62b3008f3 Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Mon, 18 Aug 2025 12:24:59 +0000
Subject: [PATCH] fix: check the nip07 signer in `CliOptions::ensure_signer`
Signed-off-by: Awiteb
---
src/cli/commands/mod.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/cli/commands/mod.rs b/src/cli/commands/mod.rs
index 3fe8b26..006834f 100644
--- a/src/cli/commands/mod.rs
+++ b/src/cli/commands/mod.rs
@@ -172,8 +172,7 @@ impl CliOptions {
/// Returns an error if there are no signers
pub fn ensure_signer(&self) -> N34Result<()> {
- if !self.config.keyring_secret_key && self.secret_key.is_none() && self.bunker_url.is_none()
- {
+ if self.secret_key.is_none() && self.bunker_url.is_none() && !self.nip07 {
return Err(N34Error::SignerRequired);
}
Ok(())
@@ -185,6 +184,7 @@ impl fmt::Debug for CliOptions {
f.debug_struct("CliOptions")
.field("secret_key", &self.secret_key.as_ref().map(|_| "*******"))
.field("bunker_url", &self.bunker_url.as_ref().map(|_| "*******"))
+ .field("nip07", &self.nip07)
.field("relays", &self.relays)
.field("pow", &self.pow)
.field("config", &self.config)