From 9a450f2ce740da08843a541d230c43194b934f5f Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 22 Mar 2024 15:51:36 +0000 Subject: replace XOnlyPublicKey with wrapper PublicKey to reflect new name in rust-nostr --- src/sub_commands/init.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/sub_commands/init.rs') diff --git a/src/sub_commands/init.rs b/src/sub_commands/init.rs index 4f098c0..56129a6 100644 --- a/src/sub_commands/init.rs +++ b/src/sub_commands/init.rs @@ -1,5 +1,5 @@ use anyhow::{Context, Result}; -use nostr::{secp256k1::XOnlyPublicKey, FromBech32, ToBech32}; +use nostr::{FromBech32, PublicKey, ToBech32}; use super::send::send_events; #[cfg(not(test))] @@ -163,7 +163,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { args.web.clone() }; - let maintainers: Vec = { + let maintainers: Vec = { let mut dont_ask = !args.other_maintainers.is_empty(); let mut maintainers_string = if !args.other_maintainers.is_empty() { [args.other_maintainers.clone()].concat().join(" ") @@ -185,7 +185,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { }; // add current user if not present if maintainers.iter().any(|m| { - if let Ok(m_pubkey) = XOnlyPublicKey::from_bech32(m) { + if let Ok(m_pubkey) = PublicKey::from_bech32(m) { user_ref.public_key.eq(&m_pubkey) } else { false @@ -210,9 +210,9 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { .map(std::string::ToString::to_string) .collect(); } - let mut maintainers: Vec = vec![]; + let mut maintainers: Vec = vec![]; for m in maintainers_string.split(' ') { - if let Ok(m_pubkey) = XOnlyPublicKey::from_bech32(m) { + if let Ok(m_pubkey) = PublicKey::from_bech32(m) { maintainers.push(m_pubkey); } else { println!("not a valid set of npubs seperated by a space"); -- cgit v1.2.3