1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

vendor: update trezor-common

This commit is contained in:
Pavol Rusnak 2018-06-05 13:37:17 +02:00
parent d6717b59cc
commit 4d1b2f0ca5
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
4 changed files with 16 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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

@ -1 +1 @@
Subproject commit 5520e98f4ab3ffb3ca347b1bfe417c5a380b9cbf
Subproject commit 0f7118bb3d27c3c51a89c776c1b083db91f50541