fix(core): exclude altcoin functions from bitcoinonly build

pull/3591/head
matejcik 2 months ago committed by matejcik
parent f34ad3daf1
commit b6e8567a49

@ -1,7 +1,7 @@
from typing import TYPE_CHECKING
import trezorui2
from trezor import TR, io, loop, ui
from trezor import TR, io, loop, ui, utils
from trezor.enums import ButtonRequestType
from trezor.wire import ActionCancelled
from trezor.wire.context import wait as ctx_wait
@ -1079,7 +1079,9 @@ def confirm_total(
)
async def confirm_ethereum_staking_tx(
if not utils.BITCOIN_ONLY:
async def confirm_ethereum_staking_tx(
title: str,
intro_question: str,
verb: str,
@ -1091,7 +1093,7 @@ async def confirm_ethereum_staking_tx(
chunkify: bool = False,
br_type: str = "confirm_ethereum_staking_tx",
br_code: ButtonRequestType = ButtonRequestType.SignTx,
) -> None:
) -> None:
# intro
await confirm_value(
title,
@ -1128,8 +1130,7 @@ async def confirm_ethereum_staking_tx(
)
)
def confirm_solana_tx(
def confirm_solana_tx(
amount: str,
fee: str,
items: Iterable[tuple[str, str]],
@ -1137,7 +1138,7 @@ def confirm_solana_tx(
fee_title: str | None = None,
br_type: str = "confirm_solana_tx",
br_code: ButtonRequestType = ButtonRequestType.SignTx,
) -> Awaitable[None]:
) -> Awaitable[None]:
amount_title = (
amount_title if amount_title is not None else f"{TR.words__amount}:"
) # def_arg
@ -1159,8 +1160,7 @@ def confirm_solana_tx(
)
)
async def confirm_ethereum_tx(
async def confirm_ethereum_tx(
recipient: str,
total_amount: str,
maximum_fee: str,
@ -1168,7 +1168,7 @@ async def confirm_ethereum_tx(
br_type: str = "confirm_ethereum_tx",
br_code: ButtonRequestType = ButtonRequestType.SignTx,
chunkify: bool = False,
) -> None:
) -> None:
summary_layout = RustLayout(
trezorui2.altcoin_tx_summary(
amount_title=f"{TR.words__amount}:",

@ -1,7 +1,7 @@
from typing import TYPE_CHECKING
import trezorui2
from trezor import TR, ui
from trezor import TR, ui, utils
if TYPE_CHECKING:
from typing import Any
@ -57,13 +57,13 @@ def pin_progress(message: str, description: str) -> ProgressLayout:
return progress(message, description)
def monero_keyimage_sync_progress() -> ProgressLayout:
return progress("", TR.progress__syncing)
if not utils.BITCOIN_ONLY:
def monero_keyimage_sync_progress() -> ProgressLayout:
return progress("", TR.progress__syncing)
def monero_live_refresh_progress() -> ProgressLayout:
def monero_live_refresh_progress() -> ProgressLayout:
return progress("", TR.progress__refreshing, indeterminate=True)
def monero_transaction_progress_inner() -> ProgressLayout:
def monero_transaction_progress_inner() -> ProgressLayout:
return progress("", TR.progress__signing_transaction)

@ -1,7 +1,7 @@
from typing import TYPE_CHECKING
import trezorui2
from trezor import TR, io, loop, ui
from trezor import TR, io, loop, ui, utils
from trezor.enums import ButtonRequestType
from trezor.wire import ActionCancelled
from trezor.wire.context import wait as ctx_wait
@ -1001,7 +1001,9 @@ def confirm_summary(
)
async def confirm_ethereum_tx(
if not utils.BITCOIN_ONLY:
async def confirm_ethereum_tx(
recipient: str,
total_amount: str,
maximum_fee: str,
@ -1009,7 +1011,7 @@ async def confirm_ethereum_tx(
br_type: str = "confirm_ethereum_tx",
br_code: ButtonRequestType = ButtonRequestType.SignTx,
chunkify: bool = False,
) -> None:
) -> None:
total_layout = RustLayout(
trezorui2.confirm_total(
title=TR.words__title_summary,
@ -1047,8 +1049,7 @@ async def confirm_ethereum_tx(
except ActionCancelled:
continue
async def confirm_ethereum_staking_tx(
async def confirm_ethereum_staking_tx(
title: str,
intro_question: str,
verb: str,
@ -1060,7 +1061,7 @@ async def confirm_ethereum_staking_tx(
chunkify: bool = False,
br_type: str = "confirm_ethereum_staking_tx",
br_code: ButtonRequestType = ButtonRequestType.SignTx,
) -> None:
) -> None:
# intro
await confirm_value(
title,
@ -1092,8 +1093,7 @@ async def confirm_ethereum_staking_tx(
br_code=br_code,
)
def confirm_solana_tx(
def confirm_solana_tx(
amount: str,
fee: str,
items: Iterable[tuple[str, str]],
@ -1101,7 +1101,7 @@ def confirm_solana_tx(
fee_title: str | None = None,
br_type: str = "confirm_solana_tx",
br_code: ButtonRequestType = ButtonRequestType.SignTx,
) -> Awaitable[None]:
) -> Awaitable[None]:
amount_title = (
amount_title if amount_title is not None else f"{TR.words__amount}:"
) # def_arg

@ -1,7 +1,7 @@
from typing import TYPE_CHECKING
import trezorui2
from trezor import TR, ui
from trezor import TR, ui, utils
if TYPE_CHECKING:
from typing import Any
@ -60,13 +60,13 @@ def pin_progress(message: str, description: str) -> ProgressLayout:
return progress(message, description=description)
def monero_keyimage_sync_progress() -> ProgressLayout:
return progress("", TR.progress__syncing)
if not utils.BITCOIN_ONLY:
def monero_keyimage_sync_progress() -> ProgressLayout:
return progress("", TR.progress__syncing)
def monero_live_refresh_progress() -> ProgressLayout:
def monero_live_refresh_progress() -> ProgressLayout:
return progress("", TR.progress__refreshing, indeterminate=True)
def monero_transaction_progress_inner() -> ProgressLayout:
def monero_transaction_progress_inner() -> ProgressLayout:
return progress("", TR.progress__signing_transaction)

Loading…
Cancel
Save