From a82546b70303000b4fc053a1ee21d3d8c7d6ad66 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 28 Jun 2024 15:16:43 +0100 Subject: feat(login): login with nip46 remote signer and save details in git config --- src/sub_commands/login.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/sub_commands/login.rs') diff --git a/src/sub_commands/login.rs b/src/sub_commands/login.rs index e71d431..6f49ba8 100644 --- a/src/sub_commands/login.rs +++ b/src/sub_commands/login.rs @@ -17,7 +17,16 @@ pub struct SubCommandArgs { pub async fn launch(args: &Cli, command_args: &SubCommandArgs) -> Result<()> { let git_repo = Repo::discover().context("cannot find a git repository")?; if command_args.offline { - login::launch(&git_repo, &args.nsec, &args.password, None, true).await?; + login::launch( + &git_repo, + &args.bunker_uri, + &args.bunker_app_key, + &args.nsec, + &args.password, + None, + true, + ) + .await?; Ok(()) } else { #[cfg(not(test))] @@ -25,7 +34,16 @@ pub async fn launch(args: &Cli, command_args: &SubCommandArgs) -> Result<()> { #[cfg(test)] let client = ::default(); - login::launch(&git_repo, &args.nsec, &args.password, Some(&client), true).await?; + login::launch( + &git_repo, + &args.bunker_uri, + &args.bunker_app_key, + &args.nsec, + &args.password, + Some(&client), + true, + ) + .await?; client.disconnect().await?; Ok(()) } -- cgit v1.2.3