add expiration for warpped tron instance
What changed, and why it matters
This commit adds a new 'expiration' field to a Tron transaction data structure used inside the Keystone hardware wallet firmware. The change only initializes the field to an empty string in a few places and does not, by itself, appear to fix or introduce any security vulnerability. It looks like a routine data-structure update to support an expiration value that may be shown or used elsewhere.
No immediate action required based on this diff alone. If the expiration field is intended to protect against replay or stale transactions, verify that downstream code reads and enforces it before signing. Review related commits for the actual expiration validation logic.
Security signals we found
New struct field added but not validated in the visible diff
No explicit security claim in commit title or message
No functional code change beyond struct initialization
Evidence from the diff
The patch modifies rust/apps/tron/src/transaction/wrapped_tron.rs, adding expiration: String::new() to the WrappedTron struct initialization in three locations: the main parser and two unit-test fixtures. The field is added to the struct but is not read, validated, or used for security decisions in the visible diff. There is no logic change around signature hashing, fee limits, or transaction validation.
Changed components
rust/apps/tron/src/transaction/wrapped_tron.rsWrappedTron structTron transaction parsing moduleInspect captured patch +3 / −0
diff --git a/rust/apps/tron/src/transaction/wrapped_tron.rs b/rust/apps/tron/src/transaction/wrapped_tron.rs
index f27ccbf..bc63466 100644
--- a/rust/apps/tron/src/transaction/wrapped_tron.rs
+++ b/rust/apps/tron/src/transaction/wrapped_tron.rs
@@ -106,6 +106,7 @@ impl WrappedTron {
token_short_name: None,
fee_limit: 0,
memo: String::new(),
+ expiration: String::new(),
};
if let Some(raw) = &instance.tron_tx.raw_data {
@@ -589,6 +590,7 @@ mod tests {
divider: 1.0,
fee_limit: 0,
memo: String::new(),
+ expiration: String::new(),
};
assert!(tx_no_raw.signature_hash().is_err());
}
@@ -641,6 +643,7 @@ mod tests {
divider: 1.0,
fee_limit: 0,
memo: String::new(),
+ expiration: String::new(),
};
let result = tx.signature_hash();
assert!(result.is_err());
Why this scored 11/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.