fix(pubky): testnet hardcoded configurations

This commit is contained in:
nazeh
2025-02-13 13:08:24 +03:00
parent 9ac41b43ec
commit 15cfeef84d
2 changed files with 15 additions and 5 deletions

View File

@@ -18,8 +18,9 @@ struct Cli {
/// Pubky Auth url
url: Url,
// Whether or not to use testnet Dht network (local testing)
testnet: Option<bool>,
/// Use testnet mode
#[clap(long)]
testnet: bool,
}
#[tokio::main]
@@ -65,7 +66,8 @@ async fn main() -> Result<()> {
println!("Successfully decrypted recovery file...");
println!("PublicKey: {}", keypair.public_key());
let client = if cli.testnet.unwrap_or_default() {
let client = if cli.testnet {
dbg!("HERE");
let client = Client::builder().testnet().build()?;
// For the purposes of this demo, we need to make sure