mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 17:42:02 +00:00
vendor: update trezor-common
This commit is contained in:
parent
d6717b59cc
commit
4d1b2f0ca5
@ -105,6 +105,8 @@ def sanitize_sign_tx(tx: SignTx) -> SignTx:
|
|||||||
tx.inputs_count = tx.inputs_count if tx.inputs_count is not None else 0
|
tx.inputs_count = tx.inputs_count if tx.inputs_count is not None else 0
|
||||||
tx.outputs_count = tx.outputs_count if tx.outputs_count is not None else 0
|
tx.outputs_count = tx.outputs_count if tx.outputs_count is not None else 0
|
||||||
tx.coin_name = tx.coin_name if tx.coin_name is not None else 'Bitcoin'
|
tx.coin_name = tx.coin_name if tx.coin_name is not None else 'Bitcoin'
|
||||||
|
tx.decred_expiry = tx.decred_expiry if tx.decred_expiry is not None else 0
|
||||||
|
tx.overwintered = tx.overwintered if tx.overwintered is not None else False
|
||||||
return tx
|
return tx
|
||||||
|
|
||||||
|
|
||||||
@ -114,6 +116,8 @@ def sanitize_tx_meta(tx: TransactionType) -> TransactionType:
|
|||||||
tx.inputs_cnt = tx.inputs_cnt if tx.inputs_cnt is not None else 0
|
tx.inputs_cnt = tx.inputs_cnt if tx.inputs_cnt is not None else 0
|
||||||
tx.outputs_cnt = tx.outputs_cnt if tx.outputs_cnt is not None else 0
|
tx.outputs_cnt = tx.outputs_cnt if tx.outputs_cnt is not None else 0
|
||||||
tx.extra_data_len = tx.extra_data_len if tx.extra_data_len is not None else 0
|
tx.extra_data_len = tx.extra_data_len if tx.extra_data_len is not None else 0
|
||||||
|
tx.decred_expiry = tx.decred_expiry if tx.decred_expiry is not None else 0
|
||||||
|
tx.overwintered = tx.overwintered if tx.overwintered is not None else False
|
||||||
return tx
|
return tx
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ class SignTx(p.MessageType):
|
|||||||
4: ('version', p.UVarintType, 0), # default=1
|
4: ('version', p.UVarintType, 0), # default=1
|
||||||
5: ('lock_time', p.UVarintType, 0), # default=0
|
5: ('lock_time', p.UVarintType, 0), # default=0
|
||||||
6: ('decred_expiry', p.UVarintType, 0),
|
6: ('decred_expiry', p.UVarintType, 0),
|
||||||
|
7: ('overwintered', p.BoolType, 0),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -20,7 +21,8 @@ class SignTx(p.MessageType):
|
|||||||
coin_name: str = None,
|
coin_name: str = None,
|
||||||
version: int = None,
|
version: int = None,
|
||||||
lock_time: int = None,
|
lock_time: int = None,
|
||||||
decred_expiry: int = None
|
decred_expiry: int = None,
|
||||||
|
overwintered: bool = None
|
||||||
) -> None:
|
) -> None:
|
||||||
self.outputs_count = outputs_count
|
self.outputs_count = outputs_count
|
||||||
self.inputs_count = inputs_count
|
self.inputs_count = inputs_count
|
||||||
@ -28,3 +30,4 @@ class SignTx(p.MessageType):
|
|||||||
self.version = version
|
self.version = version
|
||||||
self.lock_time = lock_time
|
self.lock_time = lock_time
|
||||||
self.decred_expiry = decred_expiry
|
self.decred_expiry = decred_expiry
|
||||||
|
self.overwintered = overwintered
|
||||||
|
@ -19,6 +19,8 @@ class SimpleSignTx(p.MessageType):
|
|||||||
4: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
|
4: ('coin_name', p.UnicodeType, 0), # default='Bitcoin'
|
||||||
5: ('version', p.UVarintType, 0), # default=1
|
5: ('version', p.UVarintType, 0), # default=1
|
||||||
6: ('lock_time', p.UVarintType, 0), # default=0
|
6: ('lock_time', p.UVarintType, 0), # default=0
|
||||||
|
7: ('decred_expiry', p.UVarintType, 0),
|
||||||
|
8: ('overwintered', p.BoolType, 0),
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -28,7 +30,9 @@ class SimpleSignTx(p.MessageType):
|
|||||||
transactions: List[TransactionType] = None,
|
transactions: List[TransactionType] = None,
|
||||||
coin_name: str = None,
|
coin_name: str = None,
|
||||||
version: int = None,
|
version: int = None,
|
||||||
lock_time: int = None
|
lock_time: int = None,
|
||||||
|
decred_expiry: int = None,
|
||||||
|
overwintered: bool = None
|
||||||
) -> None:
|
) -> None:
|
||||||
self.inputs = inputs if inputs is not None else []
|
self.inputs = inputs if inputs is not None else []
|
||||||
self.outputs = outputs if outputs is not None else []
|
self.outputs = outputs if outputs is not None else []
|
||||||
@ -36,3 +40,5 @@ class SimpleSignTx(p.MessageType):
|
|||||||
self.coin_name = coin_name
|
self.coin_name = coin_name
|
||||||
self.version = version
|
self.version = version
|
||||||
self.lock_time = lock_time
|
self.lock_time = lock_time
|
||||||
|
self.decred_expiry = decred_expiry
|
||||||
|
self.overwintered = overwintered
|
||||||
|
2
vendor/trezor-common
vendored
2
vendor/trezor-common
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 5520e98f4ab3ffb3ca347b1bfe417c5a380b9cbf
|
Subproject commit 0f7118bb3d27c3c51a89c776c1b083db91f50541
|
Loading…
Reference in New Issue
Block a user