diff --git a/app/src/swap/handle_check_address.c b/app/src/swap/handle_check_address.c index abcfcd95..7def33e3 100644 --- a/app/src/swap/handle_check_address.c +++ b/app/src/swap/handle_check_address.c @@ -31,17 +31,17 @@ void handle_check_address(check_address_parameters_t *params) { params->result = 0; // Address parameters have the following structure - // 00 byte |path length (1 byte) | bip32 path (4 * pathLength bytes) + // path length (1 byte) | bip32 path (4 * pathLength bytes) // Get the path uint32_t bip32_path[HDPATH_LEN_DEFAULT] = {0}; - uint8_t bip32_path_length = params->address_parameters[1]; + uint8_t bip32_path_length = params->address_parameters[0]; if (bip32_path_length != HDPATH_LEN_DEFAULT) { return; } for (uint32_t i = 0; i < HDPATH_LEN_DEFAULT; i++) { - readU32BE(params->address_parameters + 2 + (i * 4), &bip32_path[i]); + readU32BE(params->address_parameters + 1 + (i * 4), &bip32_path[i]); } char address_computed[100] = {0};