Skip to content

Commit

Permalink
liana-gui: import liana with directory path
Browse files Browse the repository at this point in the history
  • Loading branch information
edouardparis committed Nov 19, 2024
1 parent c14c55b commit b0fbe08
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 29 deletions.
26 changes: 2 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion liana-gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ path = "src/main.rs"
[dependencies]
async-trait = "0.1"
async-hwi = { version = "0.0.24" }
liana = { git = "https://github.com/wizardsardine/liana", branch = "master", default-features = false, features = ["nonblocking_shutdown"] }
liana = { path = "../liana", default-features = false, features = ["nonblocking_shutdown"] }
liana-ui = { path = "../liana-ui" }
backtrace = "0.3"
hex = "0.4.3"
Expand Down
4 changes: 3 additions & 1 deletion liana-gui/src/daemon/embedded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ pub struct EmbeddedDaemon {

impl EmbeddedDaemon {
pub fn start(config: Config) -> Result<EmbeddedDaemon, DaemonError> {
let handle = DaemonHandle::start_default(config.clone()).map_err(DaemonError::Start)?;
let handle =
DaemonHandle::start_default(config.clone(), false).map_err(DaemonError::Start)?;
Ok(Self {
handle: Mutex::new(Some(handle)),
config,
Expand All @@ -31,6 +32,7 @@ impl EmbeddedDaemon {
{
match self.handle.lock().await.as_mut() {
Some(DaemonHandle::Controller { control, .. }) => method(control),
Some(_) => unreachable!("No lianad rpc server must be started"),
None => Err(DaemonError::DaemonStopped),
}
}
Expand Down
4 changes: 1 addition & 3 deletions liana-gui/src/installer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ impl Installer {

pub fn daemon_check(cfg: liana::config::Config) -> Result<(), Error> {
// Start Daemon to check correctness of installation
match liana::DaemonHandle::start_default(cfg) {
match liana::DaemonHandle::start_default(cfg, false) {
Ok(daemon) => daemon
.stop()
.map_err(|e| Error::Unexpected(format!("Failed to stop Liana daemon: {}", e))),
Expand Down Expand Up @@ -685,8 +685,6 @@ pub async fn extract_local_gui_settings(ctx: &Context) -> Settings {

pub fn extract_daemon_config(ctx: &Context) -> Config {
Config {
#[cfg(unix)]
daemon: false,
log_level: log::LevelFilter::Info,
main_descriptor: ctx
.descriptor
Expand Down

0 comments on commit b0fbe08

Please sign in to comment.