Skip to content

Commit fbbda9f

Browse files
Fix tests to assert for new error
1 parent a75b1db commit fbbda9f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cmd/crates/stellar-ledger/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,8 @@ mod test {
476476
let test_hash = b"3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889";
477477

478478
let err = ledger.sign_blob(&path.into(), test_hash).await.unwrap_err();
479-
if let Error::APDUExchangeError(msg) = err {
479+
480+
if let Error::BlindSigningModeNotEnabled(msg) = err {
480481
assert_eq!(msg, "Ledger APDU retcode: 0x6C66");
481482
} else {
482483
panic!("Unexpected error: {err:?}");

cmd/crates/stellar-ledger/tests/test/emulator_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ async fn test_sign_tx_hash_when_hash_signing_is_not_enabled(ledger_device_model:
165165
let test_hash = b"313e8447f569233bb8db39aa607c8889";
166166

167167
let result = ledger.sign_transaction_hash(path, test_hash).await;
168-
if let Err(Error::APDUExchangeError(msg)) = result {
168+
if let Error::BlindSigningModeNotEnabled(msg) = result {
169169
assert_eq!(msg, "Ledger APDU retcode: 0x6C66");
170170
// this error code is SW_TX_HASH_SIGNING_MODE_NOT_ENABLED https://github.com/LedgerHQ/app-stellar/blob/develop/docs/COMMANDS.md
171171
} else {

0 commit comments

Comments
 (0)