From e7b7fdabf0ebbb4cad7e2703a84045a0ed844210 Mon Sep 17 00:00:00 2001 From: pythcoiner Date: Sat, 24 Feb 2024 15:16:22 +0100 Subject: [PATCH] fix tests --- gui/src/app/state/receive.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gui/src/app/state/receive.rs b/gui/src/app/state/receive.rs index c51199366..6fb39320f 100644 --- a/gui/src/app/state/receive.rs +++ b/gui/src/app/state/receive.rs @@ -284,9 +284,8 @@ mod tests { daemon::{ client::{Lianad, Request}, model::*, - Daemon, }, - utils::{mock::Daemon as MockDaemon, sandbox::Sandbox}, + utils::{mock::Daemon, sandbox::Sandbox}, }; use liana::{descriptors::LianaDescriptor, miniscript::bitcoin::Address}; @@ -301,7 +300,7 @@ mod tests { Address::from_str("tb1qkldgvljmjpxrjq2ev5qxe8dvhn0dph9q85pwtfkjeanmwdue2akqj4twxj") .unwrap() .assume_checked(); - let daemon = MockDaemon::new(vec![( + let daemon = Daemon::new(vec![( Some(json!({"method": "getnewaddress", "params": Option::::None})), Ok(json!(GetAddressResult::new( addr.clone(), @@ -309,15 +308,14 @@ mod tests { ))), )]); - let client = Arc::new(Lianad::new(daemon.run())); - let timestamp = client.get_info().unwrap().timestamp; let sandbox: Sandbox = Sandbox::new(ReceivePanel::new( PathBuf::new(), Arc::new(Wallet::new( LianaDescriptor::from_str(DESC).unwrap(), - timestamp, + 0, )), )); + let client = Arc::new(Lianad::new(daemon.run())); let sandbox = sandbox.load(client, &Cache::default()).await; let panel = sandbox.state();