Merge #1003: Add default hint for hardware wallet errors

d2c4f136649c0a259b29531487737a50a2339be9 Add hint for hw errors (edouardparis)

Pull request description:

  Signing fails if another process has an open connection with a Ledger for example. Async-hwi needs to have a more detailed error api in order to handle graciously errors, but for now we provide a hint to what to check for the user

  close #381
  ![20240312_17h00m03s_grim](https://github.com/wizardsardine/liana/assets/6933020/6e5aff8c-d46f-4a44-a5e6-68d40e4d297c)

ACKs for top commit:
  jp1ac4:
    utACK d2c4f13664.

Tree-SHA512: 651c123e4f65af7080a6617062c98fb58f03b3b564c3bd104332eaa198b27242bda180118c996b46822b27168fabdd1ff422a9dfd2285db479f0332edc8908a4
This commit is contained in:
Antoine Poinsot 2024-03-13 17:11:32 +01:00
commit 3bd9160d02
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -51,7 +51,7 @@ impl std::fmt::Display for Error {
DaemonError::CoinSelectionError => write!(f, "{}", e),
},
Self::Unexpected(e) => write!(f, "Unexpected error: {}", e),
Self::HardwareWallet(e) => write!(f, "{}", e),
Self::HardwareWallet(e) => write!(f, "error: {}\nPlease check if the device is still connected and unlocked with the correct firmware open for the current network and no other application is accessing the device.", e),
Self::Desc(e) => write!(f, "Liana descriptor error: {}", e),
}
}