What changed, and why it matters
This commit is a user-interface cleanup for Zcash and Shamir backup flows. It removes some on-screen explanations about 20-word versus 33-word Shamir shares, reuses an existing notice window instead of a separate hint box, and makes Zcash support checks apply only to a special 'cypherpunk' build variant. There is no direct evidence of a security vulnerability being fixed.
No security action required; treat as routine UI/UX maintenance. If reviewing for release, verify that removing the 20-word/33-word Shamir descriptions does not mislead users about supported coins, but this is a product/usability concern rather than a security defect.
Security signals we found
No security-relevant signal: UI-only refactor and string cleanup
No bounds-check, crypto, or authentication changes observed
No vendor mention of security relevance in commit title or message
Evidence from the diff
The patch changes four files. account_manager.c wraps the SLIP39 entropy-length Zcash check in CYPHERPUNK_VERSION so it only applies to that build. gui_create_share_widgets.c removes the dedicated g_noticeHintBox and reuses g_noticeWindow, simplifies the word-count selection UI by removing descriptive labels, and removes redundant re-registration of the right-button callback. gui_cypherpunk_home_widgets.c removes a conditional warning shown when SLIP39 wallets did not support Zcash. lv_i18n.c deletes the now-unused translated strings for those warnings. No cryptographic, memory-safety, or access-control fixes are visible.
Changed components
src/managers/account_manager.csrc/ui/gui_widgets/gui_create_share_widgets.csrc/ui/gui_widgets/multi/cypherpunk/gui_cypherpunk_home_widgets.csrc/ui/lv_i18n/lv_i18n.cInspect captured patch +23 / −66
diff --git a/src/managers/account_manager.c b/src/managers/account_manager.c
index 097f166..f11caad 100644
--- a/src/managers/account_manager.c
+++ b/src/managers/account_manager.c
@@ -590,7 +590,9 @@ bool IsZcashSupportedForCurrentMnemonic(void)
{
MnemonicType type = GetMnemonicType();
if (type == MNEMONIC_TYPE_BIP39) return true;
+#ifdef CYPHERPUNK_VERSION
if (type == MNEMONIC_TYPE_SLIP39) return GetCurrentAccountEntropyLen() >= 32;
+#endif
return false;
}
diff --git a/src/ui/gui_widgets/gui_create_share_widgets.c b/src/ui/gui_widgets/gui_create_share_widgets.c
index faec5eb..356e6ec 100644
--- a/src/ui/gui_widgets/gui_create_share_widgets.c
+++ b/src/ui/gui_widgets/gui_create_share_widgets.c
@@ -73,7 +73,6 @@ static uint8_t g_pressedBtnFlag[SLIP39_MNEMONIC_WORDS_MAX + 1];
static uint8_t g_currId = 0;
static char g_randomBuff[BUFFER_SIZE_512];
static lv_obj_t *g_noticeWindow = NULL;
-static lv_obj_t *g_noticeHintBox = NULL;
static uint8_t g_entropyMethod;
static PageWidget_t *g_pageWidget;
static void SelectParseCntHandler(lv_event_t *e);
@@ -539,7 +538,6 @@ int8_t GuiCreateSharePrevTile(void)
void GuiCreateShareDeInit(void)
{
GUI_DEL_OBJ(g_noticeWindow)
- GUI_DEL_OBJ(g_noticeHintBox)
for (int i = 0; i < SLIP39_MNEMONIC_WORDS_MAX + 1; i++) {
g_pressedBtn[i] = 0;
g_pressedBtnFlag[i] = 0;
@@ -589,47 +587,32 @@ static void SelectParseCntHandler(lv_event_t *e)
static uint32_t currentIndex = 0;
lv_obj_t *checkBox = NULL;
lv_obj_t *checkedCheckBox = NULL;
- lv_obj_t *desc = NULL;
-
- GUI_DEL_OBJ(g_noticeHintBox)
- g_noticeHintBox = GuiCreateHintBox(350);
- lv_obj_add_event_cb(lv_obj_get_child(g_noticeHintBox, 0), CloseHintBoxHandler, LV_EVENT_CLICKED, &g_noticeHintBox);
- lv_obj_t *label = GuiCreateIllustrateLabel(g_noticeHintBox, _("single_phrase_word_amount_select"));
- lv_obj_align(label, LV_ALIGN_DEFAULT, 36, 492);
+ g_noticeWindow = GuiCreateHintBox(282);
+ lv_obj_add_event_cb(lv_obj_get_child(g_noticeWindow, 0), CloseHintBoxHandler, LV_EVENT_CLICKED, &g_noticeWindow);
+ lv_obj_t *label = GuiCreateIllustrateLabel(g_noticeWindow, _("single_phrase_word_amount_select"));
+ lv_obj_align(label, LV_ALIGN_DEFAULT, 36, 560);
lv_obj_set_style_text_opa(label, LV_OPA_60, LV_PART_MAIN);
- lv_obj_t *button = GuiCreateImgButton(g_noticeHintBox, &imgClose, 36, CloseHintBoxHandler, &g_noticeHintBox);
- lv_obj_align(button, LV_ALIGN_DEFAULT, 407, 482);
-
- if (g_selectCnt == SLIP39_MNEMONIC_33_WORDS) {
- checkBox = GuiCreateSingleCheckBox(g_noticeHintBox, _("wallet_phrase_20words"));
- lv_obj_align(checkBox, LV_ALIGN_DEFAULT, 30, 562);
- desc = GuiCreateIllustrateLabel(g_noticeHintBox, _("shamir_20words_desc"));
- lv_obj_set_style_text_opa(desc, LV_OPA_60, LV_PART_MAIN);
- lv_obj_align(desc, LV_ALIGN_DEFAULT, 66, 600);
- checkBox = GuiCreateSingleCheckBox(g_noticeHintBox, _("wallet_phrase_33words"));
- lv_obj_align(checkBox, LV_ALIGN_DEFAULT, 30, 636);
+ lv_obj_t *button = GuiCreateImgButton(g_noticeWindow, &imgClose, 36, CloseHintBoxHandler, &g_noticeWindow);
+ lv_obj_align(button, LV_ALIGN_DEFAULT, 407, 550);
+
+ if (g_selectCnt == 33) {
+ checkBox = GuiCreateSingleCheckBox(g_noticeWindow, _("wallet_phrase_20words"));
+ lv_obj_align(checkBox, LV_ALIGN_DEFAULT, 30, 630);
+ checkBox = GuiCreateSingleCheckBox(g_noticeWindow, _("wallet_phrase_33words"));
+ lv_obj_align(checkBox, LV_ALIGN_DEFAULT, 30, 618 + 100);
lv_obj_add_state(checkBox, LV_STATE_CHECKED);
checkedCheckBox = checkBox;
- desc = GuiCreateIllustrateLabel(g_noticeHintBox, _("shamir_33words_desc"));
- lv_obj_set_style_text_opa(desc, LV_OPA_60, LV_PART_MAIN);
- lv_obj_align(desc, LV_ALIGN_DEFAULT, 66, 674);
} else {
- checkBox = GuiCreateSingleCheckBox(g_noticeHintBox, _("wallet_phrase_20words"));
- lv_obj_align(checkBox, LV_ALIGN_DEFAULT, 30, 562);
+ checkBox = GuiCreateSingleCheckBox(g_noticeWindow, _("wallet_phrase_20words"));
+ lv_obj_align(checkBox, LV_ALIGN_DEFAULT, 30, 630);
lv_obj_add_state(checkBox, LV_STATE_CHECKED);
checkedCheckBox = checkBox;
- desc = GuiCreateIllustrateLabel(g_noticeHintBox, _("shamir_20words_desc"));
- lv_obj_set_style_text_opa(desc, LV_OPA_60, LV_PART_MAIN);
- lv_obj_align(desc, LV_ALIGN_DEFAULT, 66, 600);
- checkBox = GuiCreateSingleCheckBox(g_noticeHintBox, _("wallet_phrase_33words"));
- lv_obj_align(checkBox, LV_ALIGN_DEFAULT, 30, 636);
- desc = GuiCreateIllustrateLabel(g_noticeHintBox, _("shamir_33words_desc"));
- lv_obj_set_style_text_opa(desc, LV_OPA_60, LV_PART_MAIN);
- lv_obj_align(desc, LV_ALIGN_DEFAULT, 66, 674);
+ checkBox = GuiCreateSingleCheckBox(g_noticeWindow, _("wallet_phrase_33words"));
+ lv_obj_align(checkBox, LV_ALIGN_DEFAULT, 30, 618 + 100);
}
currentIndex = lv_obj_get_index(checkedCheckBox);
- lv_obj_add_event_cb(g_noticeHintBox, SelectCheckBoxHandler, LV_EVENT_CLICKED, ¤tIndex);
+ lv_obj_add_event_cb(g_noticeWindow, SelectCheckBoxHandler, LV_EVENT_CLICKED, ¤tIndex);
}
static void SelectCheckBoxHandler(lv_event_t* e)
@@ -638,11 +621,11 @@ static void SelectCheckBoxHandler(lv_event_t* e)
.threShold = g_selectSliceTile.memberThreshold,
.memberCnt = g_selectSliceTile.memberCnt,
};
- uint32_t *active_id = lv_event_get_user_data(e);
+ uint32_t* active_id = lv_event_get_user_data(e);
lv_obj_t *actCb = lv_event_get_target(e);
- lv_obj_t *oldCb = lv_obj_get_child(g_noticeHintBox, *active_id);
+ lv_obj_t *oldCb = lv_obj_get_child(g_noticeWindow, *active_id);
- if (actCb == g_noticeHintBox || oldCb == NULL || !lv_obj_check_type(actCb, &lv_checkbox_class)) {
+ if (actCb == g_noticeWindow || oldCb == NULL || !lv_obj_check_type(actCb, &lv_checkbox_class)) {
return;
}
Vibrate(SLIGHT);
@@ -654,7 +637,6 @@ static void SelectCheckBoxHandler(lv_event_t* e)
const char *currText = lv_checkbox_get_text(actCb);
if (!strcmp(currText, _("wallet_phrase_20words"))) {
SetRightBtnLabel(g_pageWidget->navBarWidget, NVS_BAR_WORD_SELECT, "20");
- SetRightBtnCb(g_pageWidget->navBarWidget, SelectParseCntHandler, NULL);
if (g_selectCnt != 20) {
g_selectCnt = 20;
slip39.wordCnt = g_selectCnt;
@@ -666,7 +648,6 @@ static void SelectCheckBoxHandler(lv_event_t* e)
}
} else if (!strcmp(currText, _("wallet_phrase_33words"))) {
SetRightBtnLabel(g_pageWidget->navBarWidget, NVS_BAR_WORD_SELECT, "33");
- SetRightBtnCb(g_pageWidget->navBarWidget, SelectParseCntHandler, NULL);
if (g_selectCnt != 33) {
g_selectCnt = 33;
slip39.wordCnt = g_selectCnt;
@@ -679,5 +660,5 @@ static void SelectCheckBoxHandler(lv_event_t* e)
}
lv_obj_clear_flag(g_pageWidget->navBarWidget->rightBtn, LV_OBJ_FLAG_CLICKABLE);
lv_obj_scroll_to_y(g_shareBackupTile.keyBoard->cont, 0, LV_ANIM_ON);
- GUI_DEL_OBJ(g_noticeHintBox)
+ GUI_DEL_OBJ(g_noticeWindow)
}
diff --git a/src/ui/gui_widgets/multi/cypherpunk/gui_cypherpunk_home_widgets.c b/src/ui/gui_widgets/multi/cypherpunk/gui_cypherpunk_home_widgets.c
index 25f4b05..fab847c 100644
--- a/src/ui/gui_widgets/multi/cypherpunk/gui_cypherpunk_home_widgets.c
+++ b/src/ui/gui_widgets/multi/cypherpunk/gui_cypherpunk_home_widgets.c
@@ -318,11 +318,6 @@ static void OpenManageAssetsHandler(lv_event_t *e)
lv_obj_set_width(label, 416);
lv_label_set_long_mode(label, LV_LABEL_LONG_WRAP);
lv_obj_align(label, LV_ALIGN_TOP_LEFT, 32, 144);
- } else if (GetMnemonicType() == MNEMONIC_TYPE_SLIP39 && !IsZcashSupportedForCurrentMnemonic()) {
- lv_obj_t *label = GuiCreateIllustrateLabel(checkBoxCont, _("shamir_20word_coin_notice"));
- lv_obj_set_width(label, 416);
- lv_label_set_long_mode(label, LV_LABEL_LONG_WRAP);
- lv_obj_align(label, LV_ALIGN_BOTTOM_LEFT, 32, -12);
}
lv_obj_t *btn = GuiCreateBtn(g_manageCont, USR_SYMBOL_CHECK);
diff --git a/src/ui/lv_i18n/lv_i18n.c b/src/ui/lv_i18n/lv_i18n.c
index 7b1749f..269e1a5 100644
--- a/src/ui/lv_i18n/lv_i18n.c
+++ b/src/ui/lv_i18n/lv_i18n.c
@@ -731,9 +731,6 @@ const static lv_i18n_phrase_t en_singulars[] = {
{"self_destruction_hint", "Contact us"},
{"self_destruction_title", "Device No Longer Usable"},
{"set_passcode_desc", "This PIN code will be used to unlock your wallet and authorize transactions."},
- {"shamir_20word_coin_notice", "Some coins (Zcash) require 33-word Shamir shares. To use them, create a new wallet with 33-word shares."},
- {"shamir_20words_desc", "Supports most coins"},
- {"shamir_33words_desc", "Also supports Zcash"},
{"shamir_backup", "Shamir Backup"},
{"shamir_phrase_backup_desc", "Write down your Share #F5870A 1# phrase and keep it properly."},
{"shamir_phrase_cancel_create_desc", "If you cancel, any confirmed Shares will be lost."},
@@ -1690,9 +1687,6 @@ const static lv_i18n_phrase_t de_singulars[] = {
{"self_destruction_hint", "Kontaktieren Sie uns"},
{"self_destruction_title", "Gerät nicht mehr verwendbar"},
{"set_passcode_desc", "Dieser PIN-Code wird verwendet, um Ihre Brieftasche zu entsperren und Transaktionen zu autorisieren."},
- {"shamir_20word_coin_notice", "Bei einigen Kryptowährungen (Zcash) sind 33-Wort-Shamir-Shares erforderlich. Um diese zu verwenden, erstellen Sie eine neue Wallet mit 33-Wort-Shares."},
- {"shamir_20words_desc", "Unterstützt die meisten Kryptowährungen"},
- {"shamir_33words_desc", "Unterstützt auch Zcash"},
{"shamir_backup", "Shamir Backup"},
{"shamir_phrase_backup_desc", "Schreiben Sie Ihre Share #F5870A 1# Phrase auf und bewahren Sie sie ordnungsgemäß auf."},
{"shamir_phrase_cancel_create_desc", "Wenn Sie stornieren, werden alle bestätigten Anteile verloren gehen."},
@@ -2649,9 +2643,6 @@ const static lv_i18n_phrase_t es_singulars[] = {
{"self_destruction_hint", "Contáctanos"},
{"self_destruction_title", "Dispositivo ya no utilizable"},
{"set_passcode_desc", "Este código PIN se utilizará para desbloquear tu billetera y autorizar transacciones"},
- {"shamir_20word_coin_notice", "Algunas monedas (Zcash) requieren fragmentos de Shamir (Shares) de 33 palabras. Para utilizarlas, crea un nuevo monedero con fragmentos de 33 palabras."},
- {"shamir_20words_desc", "Compatible con la mayoría de las monedas"},
- {"shamir_33words_desc", "También es compatible con Zcash"},
{"shamir_backup", "Copia de seguridad Shamir"},
{"shamir_phrase_backup_desc", "Escribe la frase de tu fragmento(Share) #F5870A 1# y guárdala correctamente"},
{"shamir_phrase_cancel_create_desc", "Si cancelas, se perderán todos los fragmentos confirmados."},
@@ -3605,9 +3596,6 @@ const static lv_i18n_phrase_t ja_singulars[] = {
{"self_destruction_hint", "お問い合わせ"},
{"self_destruction_title", "デバイスは使用できなくなりました."},
{"set_passcode_desc", "このPINコードは、貴方のウォレットを解除し、取引を承認するために使用されます."},
- {"shamir_20word_coin_notice", "一部のコイン(Zcash)には33ワードのシャミールシェアが必要です。使用するには、33ワードのシェアで新しいウォレットを作成してください。"},
- {"shamir_20words_desc", "ほとんどのコインに対応"},
- {"shamir_33words_desc", "Zcashにも対応"},
{"shamir_backup", "シャミールバックアップ"},
{"shamir_phrase_backup_desc", "あなたのShare #F5870A 1# フレーズを書き留め、適切に保管してください."},
{"shamir_phrase_cancel_create_desc", "キャンセルすると、確認済みのシェアが失われます."},
@@ -4559,9 +4547,6 @@ const static lv_i18n_phrase_t ko_singulars[] = {
{"self_destruction_hint", "연락처"},
{"self_destruction_title", "디바이스를 더 이상 사용할 수 없음"},
{"set_passcode_desc", "이 PIN 코드는 지갑 잠금을 해제하고 거래를 승인하는 데 사용됩니다."},
- {"shamir_20word_coin_notice", "일부 코인(Zcash)은 33단어 샤미르 공유가 필요합니다. 이를 사용하려면 33단어 공유로 새 지갑을 만드세요."},
- {"shamir_20words_desc", "대부분의 코인 지원"},
- {"shamir_33words_desc", "Zcash도 지원"},
{"shamir_backup", "샤미르 백업"},
{"shamir_phrase_backup_desc", "공유 #F5870A 1# 시드 구문을 적어서 잘 보관하세요."},
{"shamir_phrase_cancel_create_desc", "취소할 경우 확인된 공유가 저장되지 않습니다."},
@@ -5513,9 +5498,6 @@ const static lv_i18n_phrase_t ru_singulars[] = {
{"self_destruction_hint", "Связаться с нами"},
{"self_destruction_title", "Нерабочее устройство"},
{"set_passcode_desc", "PIN-код нужен для разблокировки кошелька и подписи транзакций"},
- {"shamir_20word_coin_notice", "Некоторые монеты (Zcash) требуют 33-словные части Шамира. Чтобы использовать их, создайте новый кошелёк с 33-словными частями."},
- {"shamir_20words_desc", "Поддерживает большинство монет"},
- {"shamir_33words_desc", "Также поддерживает Zcash"},
{"shamir_backup", "Фраза Шамира"},
{"shamir_phrase_backup_desc", "Запишите фразу Часть #F5870A 1# и сохраните ее правильно."},
{"shamir_phrase_cancel_create_desc", "Если вы прервете процесс, то все подтвержденные Части будут потеряны."},
@@ -6475,9 +6457,6 @@ const static lv_i18n_phrase_t zh_cn_singulars[] = {
{"self_destruction_hint", "联系我们"},
{"self_destruction_title", "设备不再可用"},
{"set_passcode_desc", "此PIN码将用于解锁您的钱包以及签署交易."},
- {"shamir_20word_coin_notice", "部分币种(Zcash)需要33字的Shamir分片。如需使用,请创建一个使用33字分片的新钱包。"},
- {"shamir_20words_desc", "支持大多数币种"},
- {"shamir_33words_desc", "还支持Zcash"},
{"shamir_backup", "分片助记词"},
{"shamir_phrase_backup_desc", "写下您的分片#F5870A 1#部分的助记词,并妥善保存."},
{"shamir_phrase_cancel_create_desc", "如果取消,之前输入的分片助记词将不会被保存."},
Why this scored 12/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.