Skip to content

Commit

Permalink
fix userpass auth
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisguida committed Dec 12, 2023
1 parent 16874f6 commit a5a02ba
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,19 @@ async fn main() -> Result<(), anyhow::Error> {
}
}
}
if let Some(smaug_brpc_cookie_dir) = configured_plugin.option("smaug_brpc_cookie_dir") {
if let Some(sbcd) = smaug_brpc_cookie_dir.as_str() {
brpc_auth = Auth::CookieFile(PathBuf::from(sbcd).join(".cookie"))
} else {
if network == "regtest" {
brpc_auth = Auth::CookieFile(
home_dir()
.expect("cannot determine home dir")
.join(".bitcoin/regtest")
.join(".cookie"),
);
if let Auth::None = brpc_auth {
if let Some(smaug_brpc_cookie_dir) = configured_plugin.option("smaug_brpc_cookie_dir") {
if let Some(sbcd) = smaug_brpc_cookie_dir.as_str() {
brpc_auth = Auth::CookieFile(PathBuf::from(sbcd).join(".cookie"))
} else {
if network == "regtest" {
brpc_auth = Auth::CookieFile(
home_dir()
.expect("cannot determine home dir")
.join(".bitcoin/regtest")
.join(".cookie"),
);
}
}
}
}
Expand Down

0 comments on commit a5a02ba

Please sign in to comment.