diff --git a/src/apps/wallet/sign_tx/helpers.py b/src/apps/wallet/sign_tx/helpers.py index 62ce1e855e..0611acf780 100644 --- a/src/apps/wallet/sign_tx/helpers.py +++ b/src/apps/wallet/sign_tx/helpers.py @@ -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.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.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 @@ -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.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.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 diff --git a/src/trezor/messages/SignTx.py b/src/trezor/messages/SignTx.py index 6c91c19a12..9c6c787242 100644 --- a/src/trezor/messages/SignTx.py +++ b/src/trezor/messages/SignTx.py @@ -11,6 +11,7 @@ class SignTx(p.MessageType): 4: ('version', p.UVarintType, 0), # default=1 5: ('lock_time', p.UVarintType, 0), # default=0 6: ('decred_expiry', p.UVarintType, 0), + 7: ('overwintered', p.BoolType, 0), } def __init__( @@ -20,7 +21,8 @@ class SignTx(p.MessageType): coin_name: str = None, version: int = None, lock_time: int = None, - decred_expiry: int = None + decred_expiry: int = None, + overwintered: bool = None ) -> None: self.outputs_count = outputs_count self.inputs_count = inputs_count @@ -28,3 +30,4 @@ class SignTx(p.MessageType): self.version = version self.lock_time = lock_time self.decred_expiry = decred_expiry + self.overwintered = overwintered diff --git a/src/trezor/messages/SimpleSignTx.py b/src/trezor/messages/SimpleSignTx.py index 7f2a27a6a1..741a914343 100644 --- a/src/trezor/messages/SimpleSignTx.py +++ b/src/trezor/messages/SimpleSignTx.py @@ -19,6 +19,8 @@ class SimpleSignTx(p.MessageType): 4: ('coin_name', p.UnicodeType, 0), # default='Bitcoin' 5: ('version', p.UVarintType, 0), # default=1 6: ('lock_time', p.UVarintType, 0), # default=0 + 7: ('decred_expiry', p.UVarintType, 0), + 8: ('overwintered', p.BoolType, 0), } def __init__( @@ -28,7 +30,9 @@ class SimpleSignTx(p.MessageType): transactions: List[TransactionType] = None, coin_name: str = None, version: int = None, - lock_time: int = None + lock_time: int = None, + decred_expiry: int = None, + overwintered: bool = None ) -> None: self.inputs = inputs if inputs 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.version = version self.lock_time = lock_time + self.decred_expiry = decred_expiry + self.overwintered = overwintered diff --git a/vendor/trezor-common b/vendor/trezor-common index 5520e98f4a..0f7118bb3d 160000 --- a/vendor/trezor-common +++ b/vendor/trezor-common @@ -1 +1 @@ -Subproject commit 5520e98f4ab3ffb3ca347b1bfe417c5a380b9cbf +Subproject commit 0f7118bb3d27c3c51a89c776c1b083db91f50541