Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pythcoiner committed Feb 24, 2024
1 parent 5846fe3 commit e7b7fda
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions gui/src/app/state/receive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -301,23 +300,22 @@ 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::<Request>::None})),
Ok(json!(GetAddressResult::new(
addr.clone(),
ChildNumber::from_normal_idx(0).unwrap()
))),
)]);

let client = Arc::new(Lianad::new(daemon.run()));
let timestamp = client.get_info().unwrap().timestamp;
let sandbox: Sandbox<ReceivePanel> = 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();
Expand Down

0 comments on commit e7b7fda

Please sign in to comment.