1717 from buffer_types import AnyBytes , StrOrBytes
1818 from typing import Any , Awaitable , Coroutine , Iterable , NoReturn , Sequence , TypeVar
1919
20- from trezor .messages import StellarAsset
20+ from trezor .messages import EthereumNetworkInfo , EthereumTokenInfo , StellarAsset
2121 from trezor .ui .layouts .menu import Details
2222
2323 from ..common import ExceptionType , PropertyType , StrPropertyType
@@ -904,7 +904,7 @@ def confirm_properties(
904904
905905
906906def confirm_total (
907- total_amount : str | None ,
907+ total_amount : str ,
908908 fee_amount : str ,
909909 title : str | None = None ,
910910 total_label : str | None = None ,
@@ -1068,18 +1068,22 @@ def confirm_solana_unknown_token_warning() -> Awaitable[None]:
10681068
10691069 async def confirm_ethereum_tx (
10701070 recipient : str | None ,
1071- total_amount : str ,
1071+ tx_value : int ,
10721072 account : str | None ,
10731073 account_path : str | None ,
10741074 maximum_fee : str ,
10751075 fee_info_items : Iterable [StrPropertyType ],
1076+ network : EthereumNetworkInfo ,
1077+ token : EthereumTokenInfo | None ,
10761078 is_send : bool ,
10771079 br_name : str = "confirm_total" ,
10781080 br_code : ButtonRequestType = ButtonRequestType .SignTx ,
10791081 chunkify : bool = False ,
10801082 ) -> None :
10811083 from trezor .ui .layouts .menu import Menu , interact_with_menu
10821084
1085+ from apps .ethereum .helpers import format_ethereum_amount
1086+
10831087 subtitle = (
10841088 None
10851089 if not is_send and recipient is None
@@ -1100,6 +1104,8 @@ async def confirm_ethereum_tx(
11001104 else :
11011105 menu_items = []
11021106
1107+ amount_str = format_ethereum_amount (tx_value , token , network )
1108+
11031109 await confirm_linear_flow (
11041110 lambda : interact_with_menu (
11051111 trezorui_api .confirm_value (
@@ -1120,7 +1126,7 @@ async def confirm_ethereum_tx(
11201126 ),
11211127 lambda : interact (
11221128 trezorui_api .confirm_summary (
1123- amount = total_amount ,
1129+ amount = amount_str ,
11241130 amount_label = TR .words__amount ,
11251131 fee = maximum_fee ,
11261132 fee_label = TR .send__maximum_fee ,
0 commit comments