Skip to content

Commit

Permalink
Avoid sending a status word twice on failure, which would cause an ap…
Browse files Browse the repository at this point in the history
…p crash
  • Loading branch information
bigspider committed Feb 5, 2024
1 parent aac2e7a commit bdcbe1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/handler/sign_psbt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2473,10 +2473,12 @@ sign_transaction(dispatcher_context_t *dc,
return false;

if (!sign_transaction_input(dc, st, &hashes, &placeholder_info, &input, i)) {
SEND_SW(dc, SW_BAD_STATE); // should never happen
if (!G_swap_state.called_from_swap) {
ui_post_processing_confirm_transaction(dc, false);
}

// we do not send a status word, since sign_transaction_input
// already does it on failure
return false;
}
}
Expand Down

0 comments on commit bdcbe1b

Please sign in to comment.