Skip to content

Commit

Permalink
return failure to app exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
chcmedeiros committed Jan 13, 2025
1 parent 5c01c49 commit 8d49d0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/apdu_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ __Z_INLINE void handleSign(volatile uint32_t *flags, volatile uint32_t *tx, uint
const int error_msg_length = strnlen(error_msg, sizeof(G_io_apdu_buffer));
MEMCPY(G_io_apdu_buffer, error_msg, error_msg_length);
*tx += (error_msg_length);

#ifdef HAVE_SWAP
// Finalize the transaction with failure status
finalize_exchange_sign_transaction(false);
#endif
THROW(APDU_CODE_DATA_INVALID);
}

Expand Down

0 comments on commit 8d49d0a

Please sign in to comment.