Skip to content

Commit

Permalink
Handle NoError response correctly (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead authored Sep 10, 2021
1 parent 885961c commit bb8c4fa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ledger/src/transports/hid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,13 @@ impl TransportNativeHID {

match apdu_answer.response_status() {
None => Ok(apdu_answer),
Some(response) => Err(response.into()),
Some(response) => {
if response.is_success() {
Ok(apdu_answer)
} else {
Err(response.into())
}
}
}
}

Expand Down

0 comments on commit bb8c4fa

Please sign in to comment.