upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/login')
-rw-r--r--src/lib/login/fresh.rs8
-rw-r--r--src/lib/login/mod.rs14
2 files changed, 13 insertions, 9 deletions
diff --git a/src/lib/login/fresh.rs b/src/lib/login/fresh.rs
index 683d4af..a169177 100644
--- a/src/lib/login/fresh.rs
+++ b/src/lib/login/fresh.rs
@@ -278,7 +278,7 @@ pub async fn get_fresh_nip46_signer(
278 let input = Interactor::default() 278 let input = Interactor::default()
279 .input( 279 .input(
280 PromptInputParms::default().with_prompt(if let Some(error) = error { 280 PromptInputParms::default().with_prompt(if let Some(error) = error {
281 format!("error: {}. try again with NIP-05 address", error) 281 format!("error: {error}. try again with NIP-05 address")
282 } else { 282 } else {
283 "NIP-05 address".to_string() 283 "NIP-05 address".to_string()
284 }), 284 }),
@@ -296,7 +296,7 @@ pub async fn get_fresh_nip46_signer(
296 let input = Interactor::default() 296 let input = Interactor::default()
297 .input( 297 .input(
298 PromptInputParms::default().with_prompt(if let Some(error) = error { 298 PromptInputParms::default().with_prompt(if let Some(error) = error {
299 format!("error: {}. try again with bunker url", error) 299 format!("error: {error}. try again with bunker url")
300 } else { 300 } else {
301 "bunker url".to_string() 301 "bunker url".to_string()
302 }), 302 }),
@@ -505,7 +505,7 @@ async fn save_to_git_config(
505 if let Err(error) = 505 if let Err(error) =
506 silently_save_to_git_config(git_repo, signer_info, global).context(err_msg.clone()) 506 silently_save_to_git_config(git_repo, signer_info, global).context(err_msg.clone())
507 { 507 {
508 eprintln!("Error: {:?}", error); 508 eprintln!("Error: {error:?}");
509 match signer_info { 509 match signer_info {
510 SignerInfo::Nsec { 510 SignerInfo::Nsec {
511 nsec, 511 nsec,
@@ -577,7 +577,7 @@ async fn save_to_git_config(
577 ), 577 ),
578 ) 578 )
579 { 579 {
580 eprintln!("Error: {:?}", error); 580 eprintln!("Error: {error:?}");
581 eprintln!("login details were not saved"); 581 eprintln!("login details were not saved");
582 } else { 582 } else {
583 eprintln!( 583 eprintln!(
diff --git a/src/lib/login/mod.rs b/src/lib/login/mod.rs
index bfc7328..3fcd755 100644
--- a/src/lib/login/mod.rs
+++ b/src/lib/login/mod.rs
@@ -79,11 +79,15 @@ fn print_logged_in_as(
79 "failed to find your relay list. consider using another nostr client to create one to enhance your nostr experience." 79 "failed to find your relay list. consider using another nostr client to create one to enhance your nostr experience."
80 ); 80 );
81 } 81 }
82 eprintln!("logged in as {}{}", user_ref.metadata.name, match source { 82 eprintln!(
83 SignerInfoSource::CommandLineArguments => " via cli arguments", 83 "logged in as {}{}",
84 SignerInfoSource::GitLocal => " to local repository", 84 user_ref.metadata.name,
85 SignerInfoSource::GitGlobal => "", 85 match source {
86 }); 86 SignerInfoSource::CommandLineArguments => " via cli arguments",
87 SignerInfoSource::GitLocal => " to local repository",
88 SignerInfoSource::GitGlobal => "",
89 }
90 );
87 Ok(()) 91 Ok(())
88} 92}
89 93