From 51dbb1a5e9a84c3b091577670afea2eb3d248cd0 Mon Sep 17 00:00:00 2001 From: Salvatore Ingala <6681844+bigspider@users.noreply.github.com> Date: Thu, 24 Nov 2022 11:36:41 +0100 Subject: [PATCH] Allow interaction with swap to continue even when an invalid APDU is sent first --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 888488750..0b79fd8f9 100644 --- a/src/main.c +++ b/src/main.c @@ -144,7 +144,7 @@ void app_main() { if (G_swap_state.called_from_swap) { if (cmd.cla != CLA_APP) { io_send_sw(SW_CLA_NOT_SUPPORTED); - return; + continue; } if (cmd.ins != GET_EXTENDED_PUBKEY && cmd.ins != GET_WALLET_ADDRESS && cmd.ins != SIGN_PSBT && cmd.ins != GET_MASTER_FINGERPRINT) { @@ -152,7 +152,7 @@ void app_main() { "Only GET_EXTENDED_PUBKEY, GET_WALLET_ADDRESS, SIGN_PSBT and " "GET_MASTER_FINGERPRINT can be called during swap\n"); io_send_sw(SW_INS_NOT_SUPPORTED); - return; + continue; } }