Skip to content

Commit

Permalink
fix specter list is_connected
Browse files Browse the repository at this point in the history
the method was deleted from HWI trait.
See wizardsardine/async-hwi#55
commit: 0c78a2fdf44a637ec8a769ad5a7d74398b16c16c
  • Loading branch information
edouardparis committed Nov 15, 2023
1 parent cfe29ac commit 30343f5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gui/src/hw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,13 @@ async fn refresh(mut state: State) -> (HardwareWalletMessage, State) {
still.push(id);
} else {
let device = specter::Specter::<specter::SerialTransport>::new(port.clone());
if device.is_connected().await.is_ok() {
if tokio::time::timeout(
std::time::Duration::from_millis(500),
device.fingerprint(),
)
.await
.is_ok()
{
match HardwareWallet::new(id, Arc::new(device), Some(&state.keys_aliases))
.await
{
Expand Down

0 comments on commit 30343f5

Please sign in to comment.