bhwi-cli: warn about network mismatch#29
Conversation
ce4c981 to
aaa8e65
Compare
|
@edouardparis not sure about whether we want to have See: impl From<JadeNetworks> for bitcoin::Network {
fn from(networks: JadeNetworks) -> Self {
match networks {
JadeNetworks::Main | JadeNetworks::All => Self::Bitcoin,
JadeNetworks::Test => Self::Testnet,
}
}
} |
|
I do not have a strong opinion about it. Most usage will be Mainnet/Bitcoin in the end. We can change common::Response::Version (should be renamed I think for Info if this has multiple fields outside of version, and rename get_version for get_info), to have a networks [] field too. Having |
This makes more sense since the struct actually contains more than just the device firmware version. Also change network field to networks for devices that may support multiple networks at a time (currently just jade).
Show a warning to the user when the device's configured network doesn't match what bhwi-cli expects.
aaa8e65 to
4bafd7b
Compare
@edouardparis this seems better. I force-pushed these changes. I think it's good enough for now and we can just rework later probably. |
Warn the user when the CLI's network config is inconsistent with the network
that is configured on the device.
Includes a refactor from
get_version->get_infoFixes #23