What changed, and why it matters
This commit fixes a build error in a special firmware variant called 'cypherpunk' (also referred to as BTC_ONLY). It changes which cryptocurrency address settings are used when the firmware is compiled without certain optional features. There is no direct evidence this is a security vulnerability; it appears to be a build-breakage fix that could affect which coin's receive/address settings appear in the UI.
Treat as a routine build fix. Verify that the cypherpunk/BTC_ONLY build now compiles and that address settings for the intended coin (Bitcoin) are selected in that configuration. No urgent security response is indicated by the diff alone.
Security signals we found
Build configuration fix for firmware variant
Conditional compilation change affecting address-setting selection
No memory safety, crypto, or input validation changes visible
Evidence from the diff
The patch adjusts preprocessor conditionals in gui_utxo_receive_widgets.c. Previously, code paths for LTC (Litecoin) address settings were guarded by #else after #ifdef BTC_ONLY, meaning they compiled in non-BTC_ONLY builds. The change introduces #elif WEB3_VERSION and #else branches so that in BTC_ONLY builds and in non-WEB3_VERSION builds the code falls back to mainNet/testNet Bitcoin address settings instead of referencing g_ltcAddressSettings. This resolves undefined-symbol or unreachable-code build failures for the cypherpunk/BTC_ONLY configuration. The change is build-system/UI-logic only and does not alter cryptographic, parsing, or memory-unsafe code.
Changed components
src/ui/gui_widgets/gui_utxo_receive_widgets.cCypherpunk / BTC_ONLY firmware build targetUTXO receive widget UI address settingsInspect captured patch +7 / −3
diff --git a/src/ui/gui_widgets/gui_utxo_receive_widgets.c b/src/ui/gui_widgets/gui_utxo_receive_widgets.c
index 1e0ed75..85b3ee9 100644
--- a/src/ui/gui_widgets/gui_utxo_receive_widgets.c
+++ b/src/ui/gui_widgets/gui_utxo_receive_widgets.c
@@ -430,8 +430,10 @@ static void GuiCreateMoreWidgets(lv_obj_t *parent)
int height = 132;
if (g_chainCard == HOME_WALLET_CARD_BTC) {
height = 324;
+#ifdef WEB3_VERSION
} else if (g_chainCard == HOME_WALLET_CARD_LTC) {
height = 208;
+#endif
}
#endif
g_utxoReceiveWidgets.moreCont = GuiCreateHintBox(height);
@@ -971,13 +973,15 @@ static void GuiCreateAddressSettingsWidget(lv_obj_t *parent)
uint16_t contHeight = 411;
#ifdef BTC_ONLY
g_addressSettings = GetIsTestNet() ? g_testNetAddressSettings : g_mainNetAddressSettings;
-#else
+#elif WEB3_VERSION
if (g_chainCard == HOME_WALLET_CARD_LTC) {
contHeight = 208;
g_addressSettings = g_ltcAddressSettings;
} else {
g_addressSettings = g_mainNetAddressSettings;
}
+#else
+ g_addressSettings = g_mainNetAddressSettings;
#endif
lv_obj_t *cont, *line, *label;
static lv_point_t points[2] = {{0, 0}, {360, 0}};
@@ -1261,7 +1265,7 @@ static void AddressSettingsCheckHandler(lv_event_t *e)
lv_obj_t *checkBox = lv_event_get_target(e);
#ifdef BTC_ONLY
g_addressSettings = GetIsTestNet() ? g_testNetAddressSettings : g_mainNetAddressSettings;
-#else
+#elif WEB3_VERSION
g_addressSettings = g_chainCard == HOME_WALLET_CARD_LTC ? g_ltcAddressSettings : g_addressSettings;
#endif
for (uint32_t i = 0; i < g_addressSettingsNum; i++) {
@@ -1522,7 +1526,7 @@ static void GetRootHdPath(char *hdPath, uint32_t maxLen)
return;
}
g_addressSettings = GetIsTestNet() ? g_testNetAddressSettings : g_mainNetAddressSettings;
-#else
+#elif WEB3_VERSION
g_addressSettings = g_chainCard == HOME_WALLET_CARD_LTC ? g_ltcAddressSettings : g_mainNetAddressSettings;
#endif
strcpy_s(hdPath, maxLen, g_addressSettings[addrType].path);
Why this scored 18/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.