mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-20 06:58:45 +00:00
chore(core): delete unused variables
This commit is contained in:
parent
756a97a95d
commit
d1732ae9bc
@ -37,6 +37,8 @@ class SigHashType(IntEnum):
|
|||||||
|
|
||||||
# Signature hash type with the same semantics as SIGHASH_ALL. Used in some
|
# Signature hash type with the same semantics as SIGHASH_ALL. Used in some
|
||||||
# Bitcoin-like altcoins for replay protection.
|
# Bitcoin-like altcoins for replay protection.
|
||||||
|
# NOTE: this seems to be unused, but when deleted, it breaks some tests
|
||||||
|
# (test_send_bch_external_presigned and test_send_btg_external_presigned)
|
||||||
SIGHASH_ALL_FORKID = 0x41
|
SIGHASH_ALL_FORKID = 0x41
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -16,9 +16,6 @@ if TYPE_CHECKING:
|
|||||||
from apps.common.keychain import Keychain
|
from apps.common.keychain import Keychain
|
||||||
from .authorization import CoinJoinAuthorization
|
from .authorization import CoinJoinAuthorization
|
||||||
|
|
||||||
# Maximum number of characters per line in monospace font.
|
|
||||||
_MAX_MONO_LINE = 18
|
|
||||||
|
|
||||||
|
|
||||||
@with_keychain
|
@with_keychain
|
||||||
async def get_ownership_proof(
|
async def get_ownership_proof(
|
||||||
|
@ -12,7 +12,6 @@ HRP_SCRIPT_HASH = "script"
|
|||||||
HRP_KEY_HASH = "addr_vkh"
|
HRP_KEY_HASH = "addr_vkh"
|
||||||
HRP_SHARED_KEY_HASH = "addr_shared_vkh"
|
HRP_SHARED_KEY_HASH = "addr_shared_vkh"
|
||||||
HRP_STAKE_KEY_HASH = "stake_vkh"
|
HRP_STAKE_KEY_HASH = "stake_vkh"
|
||||||
HRP_STAKE_SHARED_KEY_HASH = "stake_shared_vkh"
|
|
||||||
HRP_REQUIRED_SIGNER_KEY_HASH = "req_signer_vkh"
|
HRP_REQUIRED_SIGNER_KEY_HASH = "req_signer_vkh"
|
||||||
HRP_OUTPUT_DATUM_HASH = "datum"
|
HRP_OUTPUT_DATUM_HASH = "datum"
|
||||||
HRP_SCRIPT_DATA_HASH = "script_data"
|
HRP_SCRIPT_DATA_HASH = "script_data"
|
||||||
|
@ -79,7 +79,7 @@ async def set_input(
|
|||||||
if src_entr.rct:
|
if src_entr.rct:
|
||||||
vini.amount = 0
|
vini.amount = 0
|
||||||
|
|
||||||
# Serialize `vini` with variant code for TxinToKey (prefix = TxinToKey.VARIANT_CODE).
|
# Serialize `vini` with variant code for TxinToKey (prefix = 2).
|
||||||
# The binary `vini_bin` is later sent to step 4 and 9 with its hmac,
|
# The binary `vini_bin` is later sent to step 4 and 9 with its hmac,
|
||||||
# where it is checked and directly used.
|
# where it is checked and directly used.
|
||||||
vini_bin = serialize.dump_msg(vini, preallocate=64, prefix=b"\x02")
|
vini_bin = serialize.dump_msg(vini, preallocate=64, prefix=b"\x02")
|
||||||
|
@ -13,14 +13,12 @@ _c32 = const(32)
|
|||||||
|
|
||||||
class Hash(BlobType):
|
class Hash(BlobType):
|
||||||
__slots__ = ("data",)
|
__slots__ = ("data",)
|
||||||
DATA_ATTR = "data"
|
|
||||||
FIX_SIZE = _c1
|
FIX_SIZE = _c1
|
||||||
SIZE = _c32
|
SIZE = _c32
|
||||||
|
|
||||||
|
|
||||||
class ECKey(BlobType):
|
class ECKey(BlobType):
|
||||||
__slots__ = ("bytes",)
|
__slots__ = ("bytes",)
|
||||||
DATA_ATTR = "bytes"
|
|
||||||
FIX_SIZE = _c1
|
FIX_SIZE = _c1
|
||||||
SIZE = _c32
|
SIZE = _c32
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
from micropython import const
|
|
||||||
|
|
||||||
from apps.monero.xmr.serialize.base_types import UVarintType
|
from apps.monero.xmr.serialize.base_types import UVarintType
|
||||||
from apps.monero.xmr.serialize.message_types import ContainerType, MessageType
|
from apps.monero.xmr.serialize.message_types import ContainerType, MessageType
|
||||||
from apps.monero.xmr.serialize_messages.base import KeyImage
|
from apps.monero.xmr.serialize_messages.base import KeyImage
|
||||||
@ -7,7 +5,6 @@ from apps.monero.xmr.serialize_messages.base import KeyImage
|
|||||||
|
|
||||||
class TxinToKey(MessageType):
|
class TxinToKey(MessageType):
|
||||||
__slots__ = ("amount", "key_offsets", "k_image")
|
__slots__ = ("amount", "key_offsets", "k_image")
|
||||||
VARIANT_CODE = const(0x2)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def f_specs(cls) -> tuple:
|
def f_specs(cls) -> tuple:
|
||||||
|
@ -75,11 +75,6 @@ op_wire_types = [
|
|||||||
MessageType.StellarSetOptionsOp,
|
MessageType.StellarSetOptionsOp,
|
||||||
]
|
]
|
||||||
|
|
||||||
# https://github.com/stellar/go/blob/e0ffe19f58879d3c31e2976b97a5bf10e13a337b/xdr/xdr_generated.go#L584
|
|
||||||
ASSET_TYPE_NATIVE = const(0)
|
|
||||||
ASSET_TYPE_ALPHANUM4 = const(1)
|
|
||||||
ASSET_TYPE_ALPHANUM12 = const(2)
|
|
||||||
|
|
||||||
# https://www.stellar.org/developers/guides/concepts/accounts.html#balance
|
# https://www.stellar.org/developers/guides/concepts/accounts.html#balance
|
||||||
# https://github.com/stellar/go/blob/3d2c1defe73dbfed00146ebe0e8d7e07ce4bb1b6/amount/main.go#L23
|
# https://github.com/stellar/go/blob/3d2c1defe73dbfed00146ebe0e8d7e07ce4bb1b6/amount/main.go#L23
|
||||||
AMOUNT_DECIMALS = const(7)
|
AMOUNT_DECIMALS = const(7)
|
||||||
|
@ -72,11 +72,6 @@ PUBLIC_KEY_TAG_TO_SIZE = {
|
|||||||
2: _P256_PUBLIC_KEY_SIZE,
|
2: _P256_PUBLIC_KEY_SIZE,
|
||||||
}
|
}
|
||||||
|
|
||||||
OP_TAG_ENDORSEMENT = const(0)
|
|
||||||
OP_TAG_SEED_NONCE_REVELATION = const(1)
|
|
||||||
OP_TAG_DOUBLE_ENDORSEMENT_EVIDENCE = const(2)
|
|
||||||
OP_TAG_DOUBLE_BAKING_EVIDENCE = const(3)
|
|
||||||
OP_TAG_ACTIVATE_ACCOUNT = const(4)
|
|
||||||
OP_TAG_PROPOSALS = const(5)
|
OP_TAG_PROPOSALS = const(5)
|
||||||
OP_TAG_BALLOT = const(6)
|
OP_TAG_BALLOT = const(6)
|
||||||
OP_TAG_REVEAL = const(107)
|
OP_TAG_REVEAL = const(107)
|
||||||
|
@ -16,7 +16,6 @@ _REP_INIT_DATA = const(9) # offset of data in the initial report
|
|||||||
_REP_CONT_DATA = const(1) # offset of data in the continuation report
|
_REP_CONT_DATA = const(1) # offset of data in the continuation report
|
||||||
|
|
||||||
SESSION_ID = const(0)
|
SESSION_ID = const(0)
|
||||||
INVALID_TYPE = const(-1)
|
|
||||||
|
|
||||||
|
|
||||||
class CodecError(Exception):
|
class CodecError(Exception):
|
||||||
|
Loading…
Reference in New Issue
Block a user