Skip to content

Commit 993dbad

Browse files
committed
chore(ethereum): cleanup ERC-7730 type names
[no changelog]
1 parent f9868a6 commit 993dbad

12 files changed

Lines changed: 100 additions & 100 deletions

File tree

common/protob/messages-definitions.proto

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum DefinitionType {
1313
ETHEREUM_NETWORK = 0;
1414
ETHEREUM_TOKEN = 1;
1515
SOLANA_TOKEN = 2;
16-
ETHEREUM_ERC7730_DISPLAY_FORMAT = 3;
16+
ETHEREUM_DISPLAY_FORMAT = 3;
1717
}
1818

1919
// ****** CROSS-PARSEABILITY NOTE ******
@@ -27,7 +27,7 @@ enum DefinitionType {
2727
// * EthereumNetworkInfo: varint, length-delimited, varint, ...
2828
// * EthereumTokenInfo: length-delimited, varint, ...
2929
// * SolanaTokenInfo: length-delimited, length-delimited, ...
30-
// * EthereumERC7730DisplayFormat: varint, length-delimited, length-delimited, ...
30+
// * EthereumDisplayFormat: varint, length-delimited, length-delimited, ...
3131

3232
// ****** ETHEREUM_NETWORK ******
3333

@@ -68,7 +68,7 @@ message SolanaTokenInfo {
6868
required string name = 3;
6969
}
7070

71-
// ****** ETHEREUM_ERC7730_DISPLAY_FORMAT ******
71+
// ****** ETHEREUM_DISPLAY_FORMAT ******
7272

7373
/**
7474
* Solidity types.
@@ -172,10 +172,10 @@ message EthereumERC7730FieldInfo {
172172
}
173173

174174
/**
175-
* Ethereum ERC-7730 display format - corresponding to `DisplayFormat` in `clear_signing.py`.
175+
* Ethereum display format - corresponding to `DisplayFormat` in `clear_signing.py`.
176176
* @embed
177177
*/
178-
message EthereumERC7730DisplayFormatInfo {
178+
message EthereumDisplayFormatInfo {
179179
required uint64 chain_id = 1;
180180
required bytes address = 2;
181181
required bytes func_sig = 3;

core/src/apps/common/definitions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import TYPE_CHECKING
22

33
from trezor.messages import (
4-
EthereumERC7730DisplayFormatInfo,
4+
EthereumDisplayFormatInfo,
55
EthereumNetworkInfo,
66
EthereumTokenInfo,
77
SolanaTokenInfo,
@@ -18,7 +18,7 @@
1818
EthereumNetworkInfo,
1919
EthereumTokenInfo,
2020
SolanaTokenInfo,
21-
EthereumERC7730DisplayFormatInfo,
21+
EthereumDisplayFormatInfo,
2222
)
2323

2424

@@ -42,8 +42,8 @@ def decode_definition(definition: AnyBytes, expected_type: type[DefType]) -> Def
4242
expected_type_number = DefinitionType.ETHEREUM_TOKEN
4343
if expected_type.MESSAGE_NAME == SolanaTokenInfo.MESSAGE_NAME:
4444
expected_type_number = DefinitionType.SOLANA_TOKEN
45-
if expected_type.MESSAGE_NAME == EthereumERC7730DisplayFormatInfo.MESSAGE_NAME:
46-
expected_type_number = DefinitionType.ETHEREUM_ERC7730_DISPLAY_FORMAT
45+
if expected_type.MESSAGE_NAME == EthereumDisplayFormatInfo.MESSAGE_NAME:
46+
expected_type_number = DefinitionType.ETHEREUM_DISPLAY_FORMAT
4747

4848
try:
4949
# first check format version

core/src/apps/ethereum/clear_signing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,11 +727,11 @@ def get_value_for_path(path: Path) -> Value:
727727

728728
@classmethod
729729
def from_encoded(cls, encoded: AnyBytes) -> Self:
730-
from trezor.messages import EthereumERC7730DisplayFormatInfo
730+
from trezor.messages import EthereumDisplayFormatInfo
731731

732732
from apps.common.definitions import decode_definition
733733

734-
proto = decode_definition(encoded, EthereumERC7730DisplayFormatInfo)
734+
proto = decode_definition(encoded, EthereumDisplayFormatInfo)
735735

736736
return cls(
737737
binding_context=BindingContext([(proto.chain_id, bytes(proto.address))]),

core/src/trezor/enums/DefinitionType.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/src/trezor/enums/__init__.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/src/trezor/messages.py

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

legacy/firmware/protob/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SKIPPED_MESSAGES := Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tez
99
DebugLinkN4W1Connected DebugLinkN4W1Read DebugLinkN4W1Write DebugLinkN4W1Response \
1010
DebugLinkOptigaSetSecMax DebugLinkSetLogFilter \
1111
GetNonce TxAckInput TxAckOutput TxAckPrev PaymentRequest \
12-
EthereumABITupleInfo EthereumABIValueInfo EthereumERC7730FieldInfo EthereumERC7730DisplayFormatInfo EthereumERC7730Path \
12+
EthereumABITupleInfo EthereumABIValueInfo EthereumERC7730FieldInfo EthereumDisplayFormatInfo EthereumERC7730Path \
1313
EthereumSignTypedData EthereumTypedDataStructRequest EthereumTypedDataStructAck \
1414
EthereumTypedDataValueRequest EthereumTypedDataValueAck ShowDeviceTutorial \
1515
UnlockBootloader AuthenticateDevice AuthenticityProof \

python/src/trezorlib/messages.py

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)