diff --git a/core/src/apps/bitcoin/common.py b/core/src/apps/bitcoin/common.py index c2518b43f..d9b7bf00b 100644 --- a/core/src/apps/bitcoin/common.py +++ b/core/src/apps/bitcoin/common.py @@ -12,6 +12,9 @@ if False: from trezor.messages.TxInputType import EnumTypeInputScriptType from trezor.messages.TxOutputType import EnumTypeOutputScriptType + +BITCOIN_NAMES = ("Bitcoin", "Regtest", "Testnet") + # Default signature hash type in Bitcoin which signs all inputs and all outputs of the transaction. SIGHASH_ALL = const(0x01) diff --git a/core/src/apps/bitcoin/sign_tx/__init__.py b/core/src/apps/bitcoin/sign_tx/__init__.py index 396195477..139fa801c 100644 --- a/core/src/apps/bitcoin/sign_tx/__init__.py +++ b/core/src/apps/bitcoin/sign_tx/__init__.py @@ -6,6 +6,7 @@ from trezor.messages.TxRequest import TxRequest from apps.common import coininfo, paths, seed +from ..common import BITCOIN_NAMES from ..keychain import with_keychain from . import bitcoin, helpers, layout, progress @@ -16,9 +17,6 @@ if False: from typing import Type, Union -BITCOIN_NAMES = ("Bitcoin", "Regtest", "Testnet") - - @with_keychain async def sign_tx( ctx: wire.Context, msg: SignTx, keychain: seed.Keychain, coin: coininfo.CoinInfo