diff --git a/core/src/apps/solana/constants.py b/core/src/apps/solana/constants.py index dd0599dc0ae..f74d80fd549 100644 --- a/core/src/apps/solana/constants.py +++ b/core/src/apps/solana/constants.py @@ -6,4 +6,4 @@ SOLANA_COMPUTE_UNIT_LIMIT = const(200000) # 1 lamport has 1M microlamports -MICROLAMPORTS = const(1000000) +MICROLAMPORTS_PER_LAMPORT = const(1000000) diff --git a/core/src/apps/solana/transaction/__init__.py b/core/src/apps/solana/transaction/__init__.py index ebe20a1cefc..2af18cfdd66 100644 --- a/core/src/apps/solana/transaction/__init__.py +++ b/core/src/apps/solana/transaction/__init__.py @@ -5,7 +5,7 @@ from trezor.wire import DataError from ..constants import ( - MICROLAMPORTS, + MICROLAMPORTS_PER_LAMPORT, SOLANA_BASE_FEE_LAMPORTS, SOLANA_COMPUTE_UNIT_LIMIT, ) @@ -265,5 +265,6 @@ def calculate_fee(self) -> Fee: priority_fee = unit_price * unit_limit # in microlamports return Fee( base=base_fee, - priority=(priority_fee + MICROLAMPORTS - 1) // MICROLAMPORTS, + priority=(priority_fee + MICROLAMPORTS_PER_LAMPORT - 1) + // MICROLAMPORTS_PER_LAMPORT, )