chore(todo): Some tasks

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-05-24 14:08:25 +00:00
parent ddea5028ee
commit 87da5035da
2 changed files with 6 additions and 1 deletions

View File

@@ -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<PublicKey> {

View File

@@ -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;