What changed, and why it matters
This commit is a simple code cleanup in the BitBox02 hardware wallet's user interface. It removes a duplicate, upside-down version of a small 'rotate' icon and instead flips the existing icon when needed. There is no security change.
No security action needed; treat as routine UI refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch refactors the orientation screen rendering. Previously, two bitmap assets existed (IMAGE_ROTATE and IMAGE_ROTATE_REVERSE) and two image components were created; the reverse one was rendered in one branch. The change removes IMAGE_ROTATE_REVERSE and the second component, instead calling ui_util_component_render_rotated_180() on the standard rotate component. This is a pure UI simplification with no functional or security behavior change.
Changed components
src/ui/components/orientation_arrows.csrc/ui/components/ui_images.hInspect captured patch +2 / −15
diff --git a/src/ui/components/orientation_arrows.c b/src/ui/components/orientation_arrows.c
index 9a6f70a..dc71341 100644
--- a/src/ui/components/orientation_arrows.c
+++ b/src/ui/components/orientation_arrows.c
@@ -125,8 +125,8 @@ static void _render(component_t* component)
component_t* sc_rotate = component->sub_components.sub_components[2];
sc_rotate->f->render(sc_rotate);
} else {
- component_t* sc_rotate_reverse = component->sub_components.sub_components[3];
- sc_rotate_reverse->f->render(sc_rotate_reverse);
+ component_t* sc_rotate = component->sub_components.sub_components[2];
+ ui_util_component_render_rotated_180(sc_rotate);
}
data->enable_touch = true;
}
@@ -176,19 +176,11 @@ component_t* orientation_arrows_create(void (*done_callback)(bool, void*), void*
component_t* button_top = button_create_wide(TEXT, top_slider, _flip, orientation);
component_t* rotate = image_create(
IMAGE_ROTATE, sizeof(IMAGE_ROTATE), IMAGE_ROTATE_W, IMAGE_ROTATE_H, CENTER, orientation);
- component_t* rotate_reverse = image_create(
- IMAGE_ROTATE_REVERSE,
- sizeof(IMAGE_ROTATE),
- IMAGE_ROTATE_W,
- IMAGE_ROTATE_H,
- CENTER,
- orientation);
// Order/presence is important and affects rendering `sc->f->render(sc)`;
ui_util_add_sub_component(orientation, button_bottom);
ui_util_add_sub_component(orientation, button_top);
ui_util_add_sub_component(orientation, rotate);
- ui_util_add_sub_component(orientation, rotate_reverse);
return orientation;
}
diff --git a/src/ui/components/ui_images.h b/src/ui/components/ui_images.h
index b2d287a..38a259a 100644
--- a/src/ui/components/ui_images.h
+++ b/src/ui/components/ui_images.h
@@ -19,11 +19,6 @@ static const uint8_t IMAGE_ROTATE[] = {0x00, 0x60, 0x00, 0x06, 0x00, 0x00, 0x20,
0x00, 0x10, 0x08, 0x00, 0x40, 0x10, 0x02, 0x00, 0x40, 0x08,
0x00, 0x80, 0x40, 0x01, 0x86, 0x00, 0x01, 0xe0, 0x00};
-static const uint8_t IMAGE_ROTATE_REVERSE[] = {
- 0x00, 0x78, 0x00, 0x06, 0x18, 0x00, 0x20, 0x10, 0x01, 0x00, 0x20, 0x04, 0x00,
- 0x80, 0x20, 0x01, 0x00, 0x80, 0x04, 0x3f, 0xe0, 0x10, 0x7f, 0x00, 0x40, 0xf8,
- 0x02, 0x01, 0xc0, 0x08, 0x02, 0x00, 0x40, 0x00, 0x06, 0x00, 0x00, 0x60, 0x00};
-
#define IMAGE_DEFAULT_ARROW_HEIGHT 6
#define IMAGE_DEFAULT_CHECKMARK_HEIGHT 7
#define IMAGE_DEFAULT_CROSS_HEIGHT 6
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.