ethereum/amount: fix typo in docstring
What changed, and why it matters
This commit only changes placeholder text in documentation and unit tests. It replaces the fake token name 'LOL' with 'ETH' in code comments and test expectations. No real program behavior is altered, and there is no security relevance.
No action needed; this is a non-functional cleanup change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is a pure documentation/test-cosmetic change in src/rust/bitbox02-rust/src/hww/api/ethereum/amount.rs. It updates a docstring example and test-case expected strings to use ‘ETH’ instead of the placeholder ‘LOL’. The formatting logic itself is untouched.
Changed components
src/rust/bitbox02-rust/src/hww/api/ethereum/amount.rsInspect captured patch +20 / −20
diff --git a/src/rust/bitbox02-rust/src/hww/api/ethereum/amount.rs b/src/rust/bitbox02-rust/src/hww/api/ethereum/amount.rs
index 371a7f6..dc8b7b5 100644
--- a/src/rust/bitbox02-rust/src/hww/api/ethereum/amount.rs
+++ b/src/rust/bitbox02-rust/src/hww/api/ethereum/amount.rs
@@ -16,10 +16,10 @@ impl Amount<'_> {
/// ellipsis ('...') are appended.
///
/// Example:
- /// - unit: FOO,
+ /// - unit: ETH,
/// - decimals: 18,
/// - value: 38723987932742983742983742
- /// - returns: "38723987.9327... LOL"
+ /// - returns: "38723987.9327... ETH"
pub fn format(&self) -> String {
// Truncate the number at this many chars and append '...' if truncated.
// Empirically found to fit on one line on the screen (including unit).
@@ -61,64 +61,64 @@ mod tests {
// 0
bigendian: b"",
decimals: 6,
- unit: "LOL",
- expected_result: "0 LOL",
+ unit: "ETH",
+ expected_result: "0 ETH",
},
Test {
// 1000000
bigendian: b"\x0f\x42\x40",
decimals: 6,
- unit: "LOL",
- expected_result: "1 LOL",
+ unit: "ETH",
+ expected_result: "1 ETH",
},
Test {
// 1100000
bigendian: b"\x10\xc8\xe0",
decimals: 6,
- unit: "LOL",
- expected_result: "1.1 LOL",
+ unit: "ETH",
+ expected_result: "1.1 ETH",
},
Test {
// 38723987932742983742983742
bigendian: b"\x20\x08\x1f\x97\x9a\x5c\x8d\x47\x29\x0e\x3e",
decimals: 18,
- unit: "LOL",
- expected_result: "38723987.9327... LOL",
+ unit: "ETH",
+ expected_result: "38723987.9327... ETH",
},
Test {
// 123456
bigendian: b"\x01\xe2\x40",
decimals: 8,
- unit: "LOL",
- expected_result: "0.00123456 LOL",
+ unit: "ETH",
+ expected_result: "0.00123456 ETH",
},
Test {
// 123456
bigendian: b"\x01\xe2\x40",
decimals: 8,
- unit: "LOL",
- expected_result: "0.00123456 LOL",
+ unit: "ETH",
+ expected_result: "0.00123456 ETH",
},
Test {
// 124567890123
bigendian: b"\x1d\x00\xd3\x28\xcb",
decimals: 10,
- unit: "LOL",
- expected_result: "12.4567890123 LOL",
+ unit: "ETH",
+ expected_result: "12.4567890123 ETH",
},
Test {
// 1245678901234
bigendian: b"\x01\x22\x08\x3f\x97\xf2",
decimals: 11,
- unit: "LOL",
- expected_result: "12.4567890123... LOL",
+ unit: "ETH",
+ expected_result: "12.4567890123... ETH",
},
Test {
// 123456
bigendian: b"\x01\xe2\x40",
decimals: 0,
- unit: "LOL",
- expected_result: "123456 LOL",
+ unit: "ETH",
+ expected_result: "123456 ETH",
},
];
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.