From 87da5035daa57a4764a0b324b14146fe891c5753 Mon Sep 17 00:00:00 2001
From: Awiteb
Date: Sat, 24 May 2025 14:08:25 +0000
Subject: [PATCH] chore(todo): Some tasks
Signed-off-by: Awiteb
---
src/cli/commands/mod.rs | 5 ++++-
src/cli/commands/repo/view.rs | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/cli/commands/mod.rs b/src/cli/commands/mod.rs
index 93c50e7..cbebb77 100644
--- a/src/cli/commands/mod.rs
+++ b/src/cli/commands/mod.rs
@@ -35,11 +35,12 @@ use self::repo::RepoSubcommands;
use super::traits::CommandRunner;
use crate::error::{N34Error, N34Result};
+// TODO: Make the `signer` group optional
/// The command-line interface options
#[derive(Args, Clone)]
#[clap(
group(
- ArgGroup::new("auth")
+ ArgGroup::new("signer")
.args(&["secret_key"])
.required(true)
)
@@ -92,6 +93,8 @@ impl CommandRunner for Commands {
}
}
+// TODO: Implement `ensure_signer` function with similar functionality to
+// `ensure_relays`
impl CliOptions {
/// Gets the public key of the user.
pub async fn pubkey(&self) -> N34Result {
diff --git a/src/cli/commands/repo/view.rs b/src/cli/commands/repo/view.rs
index b6100d2..e1f5ba2 100644
--- a/src/cli/commands/repo/view.rs
+++ b/src/cli/commands/repo/view.rs
@@ -38,6 +38,8 @@ pub struct ViewArgs {
impl CommandRunner for ViewArgs {
async fn run(self, options: CliOptions) -> N34Result<()> {
+ // FIXME: The signer is not required here
+
let naddr = utils::naddr_or_file(self.naddr, &utils::nostr_address_path()?)?;
let client = NostrClient::init(&options).await;
client.add_relays(&naddr.relays).await;