chore(clear_signing): add duration formatter
What changed, and why it matters
This commit simply adds a new value called FORMATTER_DURATION to an existing list of field formatter types used for Ethereum clear-signing. It only updates generated enum definitions across the codebase and does not change any actual formatting logic, parsing code, or security behavior. There is no indication this introduces a vulnerability.
No security action required. Treat as routine schema maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change adds a single enum variant EthereumERC7730FieldFormatterType::FORMATTER_DURATION = 8 to the protobuf definitions and regenerates the corresponding Python, Rust, and core enum files. No implementation of the duration formatter is included, and no existing code paths are modified beyond the generated descriptor bytes. It is a schema-only additive change.
Changed components
common/protob/messages-definitions.protocore/src/trezor/enums/EthereumERC7730FieldFormatterType.pycore/src/trezor/enums/__init__.pypython/src/trezorlib/messages.pyrust/trezor-client/src/protos/generated/messages_definitions.rsInspect captured patch +14 / −5
### common/protob/messages-definitions.proto
@@ -141,6 +141,7 @@ enum EthereumERC7730FieldFormatterType {
FORMATTER_DATE = 5;
FORMATTER_CALLDATA = 6;
FORMATTER_ENUM = 7;
+ FORMATTER_DURATION = 8;
}
/**
### core/src/trezor/enums/EthereumERC7730FieldFormatterType.py
@@ -10,3 +10,4 @@
FORMATTER_DATE = 5
FORMATTER_CALLDATA = 6
FORMATTER_ENUM = 7
+FORMATTER_DURATION = 8
### core/src/trezor/enums/__init__.py
@@ -335,6 +335,7 @@ class EthereumERC7730FieldFormatterType(IntEnum):
FORMATTER_DATE = 5
FORMATTER_CALLDATA = 6
FORMATTER_ENUM = 7
+ FORMATTER_DURATION = 8
class EthereumERC7730ContainerPath(IntEnum):
FROM = 1
### python/src/trezorlib/messages.py
@@ -379,6 +379,7 @@ class EthereumERC7730FieldFormatterType(IntEnum):
FORMATTER_DATE = 5
FORMATTER_CALLDATA = 6
FORMATTER_ENUM = 7
+ FORMATTER_DURATION = 8
class EthereumERC7730ContainerPath(IntEnum):
### rust/trezor-client/src/protos/generated/messages_definitions.rs
@@ -3222,6 +3222,8 @@ pub enum EthereumERC7730FieldFormatterType {
FORMATTER_CALLDATA = 6,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.definitions.EthereumERC7730FieldFormatterType.FORMATTER_ENUM)
FORMATTER_ENUM = 7,
+ // @@protoc_insertion_point(enum_value:hw.trezor.messages.definitions.EthereumERC7730FieldFormatterType.FORMATTER_DURATION)
+ FORMATTER_DURATION = 8,
}
impl ::protobuf::Enum for EthereumERC7730FieldFormatterType {
@@ -3241,6 +3243,7 @@ impl ::protobuf::Enum for EthereumERC7730FieldFormatterType {
5 => ::std::option::Option::Some(EthereumERC7730FieldFormatterType::FORMATTER_DATE),
6 => ::std::option::Option::Some(EthereumERC7730FieldFormatterType::FORMATTER_CALLDATA),
7 => ::std::option::Option::Some(EthereumERC7730FieldFormatterType::FORMATTER_ENUM),
+ 8 => ::std::option::Option::Some(EthereumERC7730FieldFormatterType::FORMATTER_DURATION),
_ => ::std::option::Option::None
}
}
@@ -3255,6 +3258,7 @@ impl ::protobuf::Enum for EthereumERC7730FieldFormatterType {
"FORMATTER_DATE" => ::std::option::Option::Some(EthereumERC7730FieldFormatterType::FORMATTER_DATE),
"FORMATTER_CALLDATA" => ::std::option::Option::Some(EthereumERC7730FieldFormatterType::FORMATTER_CALLDATA),
"FORMATTER_ENUM" => ::std::option::Option::Some(EthereumERC7730FieldFormatterType::FORMATTER_ENUM),
+ "FORMATTER_DURATION" => ::std::option::Option::Some(EthereumERC7730FieldFormatterType::FORMATTER_DURATION),
_ => ::std::option::Option::None
}
}
@@ -3268,6 +3272,7 @@ impl ::protobuf::Enum for EthereumERC7730FieldFormatterType {
EthereumERC7730FieldFormatterType::FORMATTER_DATE,
EthereumERC7730FieldFormatterType::FORMATTER_CALLDATA,
EthereumERC7730FieldFormatterType::FORMATTER_ENUM,
+ EthereumERC7730FieldFormatterType::FORMATTER_DURATION,
];
}
@@ -3431,15 +3436,15 @@ static file_descriptor_proto_data: &'static [u8] = b"\
\x10\x10\x12\x0e\n\nABI_INT160\x10\x11\x12\x0f\n\x0bABI_BYTES32\x10\x14\
\x12\x0f\n\x0bABI_BYTES16\x10\x15\x12\x0e\n\nABI_BYTES8\x10\x16\x12\x0e\
\n\nABI_BYTES4\x10\x17\x12\x0f\n\x0bABI_BYTES20\x10\x18\x12\r\n\tABI_BYT\
- ES\x10\x1e\x12\x0e\n\nABI_STRING\x10\x1f*\xd8\x01\n!EthereumERC7730Field\
+ ES\x10\x1e\x12\x0e\n\nABI_STRING\x10\x1f*\xf0\x01\n!EthereumERC7730Field\
FormatterType\x12\x1a\n\x16FORMATTER_ADDRESS_NAME\x10\0\x12\x14\n\x10FOR\
MATTER_AMOUNT\x10\x01\x12\x1a\n\x16FORMATTER_TOKEN_AMOUNT\x10\x02\x12\
\x12\n\x0eFORMATTER_UNIT\x10\x03\x12\x11\n\rFORMATTER_RAW\x10\x04\x12\
\x12\n\x0eFORMATTER_DATE\x10\x05\x12\x16\n\x12FORMATTER_CALLDATA\x10\x06\
- \x12\x12\n\x0eFORMATTER_ENUM\x10\x07*;\n\x1cEthereumERC7730ContainerPath\
- \x12\x08\n\x04FROM\x10\x01\x12\t\n\x05VALUE\x10\x02\x12\x06\n\x02TO\x10\
- \x03B?\n#com.satoshilabs.trezor.lib.protobufB\x18TrezorMessageDefinition\
- s\
+ \x12\x12\n\x0eFORMATTER_ENUM\x10\x07\x12\x16\n\x12FORMATTER_DURATION\x10\
+ \x08*;\n\x1cEthereumERC7730ContainerPath\x12\x08\n\x04FROM\x10\x01\x12\t\
+ \n\x05VALUE\x10\x02\x12\x06\n\x02TO\x10\x03B?\n#com.satoshilabs.trezor.l\
+ ib.protobufB\x18TrezorMessageDefinitions\
";
/// `FileDescriptorProto` object which was a source for this generated fileWhy 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.