What changed, and why it matters
This commit fixes the build process for a software simulator used during development. It adds a missing dependency for the Sui cryptocurrency app, wraps a real-device bootloader update check so it is excluded from simulator builds, and provides a simulator-only stub that always returns 'no update needed.' There is no indication this change affects real hardware security or user funds.
No security action required; treat as a normal build-maintenance commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch is a build-fix for the COMPILE_SIMULATOR target. Changes include: (1) adding rust_tools to rust/apps/sui/Cargo.toml and rust/Cargo.lock to satisfy a dependency; (2) guarding NeedUpdateBoot() in src/config/version.c with #ifndef COMPILE_SIMULATOR; (3) adding a stub NeedUpdateBoot() returning false in ui_simulator/simulator_model.c and declaring it in simulator_model.h; and (4) trivial whitespace/newline corrections in images_hash.txt and gui_check_delete_wallet_widgets.h. No cryptographic, parsing, or access-control logic is modified.
Changed components
ui_simulator/simulator_model.cui_simulator/simulator_model.hsrc/config/version.crust/apps/sui/Cargo.tomlrust/Cargo.lockInspect captured patch +12 / −2
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
index 01d425c..9373c39 100644
--- a/rust/Cargo.lock
+++ b/rust/Cargo.lock
@@ -367,6 +367,7 @@ dependencies = [
"blake2",
"hex",
"keystore",
+ "rust_tools",
"serde",
"serde_derive",
"serde_json",
diff --git a/rust/apps/sui/Cargo.toml b/rust/apps/sui/Cargo.toml
index 23401af..618b75e 100644
--- a/rust/apps/sui/Cargo.toml
+++ b/rust/apps/sui/Cargo.toml
@@ -17,6 +17,7 @@ blake2 = { workspace = true }
serde_json = { workspace = true }
bitcoin = { workspace = true }
thiserror = { workspace = true }
+rust_tools = { workspace = true }
[dev-dependencies]
keystore = { workspace = true, features = ["multi_coins"] }
diff --git a/src/config/version.c b/src/config/version.c
index 44f28eb..acbccd9 100644
--- a/src/config/version.c
+++ b/src/config/version.c
@@ -84,6 +84,7 @@ void GetBootVersionNumber(char *version)
snprintf(version, SOFTWARE_VERSION_MAX_LEN, "%d.%d.%d", major, minor, build);
}
+#ifndef COMPILE_SIMULATOR
bool NeedUpdateBoot(void)
{
uint32_t major, minor, build;
@@ -95,6 +96,7 @@ bool NeedUpdateBoot(void)
}
return true;
}
+#endif
bool GetBootSoftwareVersion(uint32_t *major, uint32_t *minor, uint32_t *build)
{
diff --git a/src/ui/gui_assets/images_hash.txt b/src/ui/gui_assets/images_hash.txt
index c4b8f0d..d82c2e2 100644
--- a/src/ui/gui_assets/images_hash.txt
+++ b/src/ui/gui_assets/images_hash.txt
@@ -1 +1 @@
-1fe77cd6baa075335b432a836be48a88
\ No newline at end of file
+1fe77cd6baa075335b432a836be48a88
diff --git a/src/ui/gui_widgets/gui_check_delete_wallet_widgets.h b/src/ui/gui_widgets/gui_check_delete_wallet_widgets.h
index c798559..408062f 100644
--- a/src/ui/gui_widgets/gui_check_delete_wallet_widgets.h
+++ b/src/ui/gui_widgets/gui_check_delete_wallet_widgets.h
@@ -8,4 +8,4 @@ void GuiCheckDeleteWalletInit(void);
void GuiCheckDeleteWalletDeInit(void);
void GuiDelWalletToSetup(void);
-#endif
\ No newline at end of file
+#endif
diff --git a/ui_simulator/simulator_model.c b/ui_simulator/simulator_model.c
index e52e343..5461e76 100644
--- a/ui_simulator/simulator_model.c
+++ b/ui_simulator/simulator_model.c
@@ -27,6 +27,11 @@ void OTP_PowerOn(void)
{
}
+bool NeedUpdateBoot(void)
+{
+ return false;
+}
+
void StampTimeToUtcTime(int64_t timeStamp, char *utcTime, int maxLen)
{
struct tm *utc_time = gmtime(&timeStamp);
diff --git a/ui_simulator/simulator_model.h b/ui_simulator/simulator_model.h
index 4b41366..75af22e 100644
--- a/ui_simulator/simulator_model.h
+++ b/ui_simulator/simulator_model.h
@@ -44,6 +44,7 @@ void OTP_PowerOn(void);
void random_buffer(uint8_t *buf, size_t len);
bool IsPreviousLockScreenEnable(void);
void SetLockScreen(bool enable);
+bool NeedUpdateBoot(void);
extern bool g_reboot;
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.