diff --git a/src/ui/bagl_display.c b/src/ui/bagl_display.c index 7ce33489b..c036c5113 100644 --- a/src/ui/bagl_display.c +++ b/src/ui/bagl_display.c @@ -97,15 +97,6 @@ int ui_display_address() { G_context.state = STATE_NONE; return io_send_sw(SW_BAD_STATE); } - - char bip32_path[60] = {0}; - if (!bip32_path_format(G_context.bip32_path, - G_context.bip32_path_len, - bip32_path, - sizeof(bip32_path))) { - return io_send_sw(SW_DISPLAY_BIP32_PATH_FAIL); - } - memset(g_address, 0, sizeof(g_address)); uint8_t address[ADDRESS_LEN] = {0}; if (!address_from_pubkey(G_context.pk_info.raw_public_key, address, sizeof(address))) { diff --git a/src/ui/nbgl_display_address.c b/src/ui/nbgl_display_address.c index 5fc21aa9c..6ecf45ede 100644 --- a/src/ui/nbgl_display_address.c +++ b/src/ui/nbgl_display_address.c @@ -70,15 +70,6 @@ int ui_display_address() { G_context.state = STATE_NONE; return io_send_sw(SW_BAD_STATE); } - - char bip32_path[60] = {0}; - if (!bip32_path_format(G_context.bip32_path, - G_context.bip32_path_len, - bip32_path, - sizeof(bip32_path))) { - return io_send_sw(SW_DISPLAY_BIP32_PATH_FAIL); - } - memset(g_address, 0, sizeof(g_address)); uint8_t address[ADDRESS_LEN] = {0}; if (!address_from_pubkey(G_context.pk_info.raw_public_key, address, sizeof(address))) { diff --git a/tests/test_error_cmd.py b/tests/test_error_cmd.py index 1c3f1a6b8..96361a5c0 100644 --- a/tests/test_error_cmd.py +++ b/tests/test_error_cmd.py @@ -36,13 +36,13 @@ def test_wrong_p1p2(backend): # Ensure the app returns an error when a bad data length is used def test_wrong_data_length(backend): - # APDUs must be at least 5 bytes: CLA, INS, P1, P2, Lc. + # APDUs must be at least 4 bytes: CLA, INS, P1, P2. with pytest.raises(ExceptionRAPDU) as e: - backend.exchange_raw(b"E0030000") + backend.exchange_raw(bytes.fromhex("E00300")) assert e.value.status == Errors.SW_WRONG_DATA_LENGTH # APDUs advertises a too long length with pytest.raises(ExceptionRAPDU) as e: - backend.exchange_raw(b"E003000005") + backend.exchange_raw(bytes.fromhex("E003000005")) assert e.value.status == Errors.SW_WRONG_DATA_LENGTH