From 0c9cc99bd7bebba37c5b796f2a40c46ac084c2ea Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Tue, 27 Feb 2018 00:09:02 +0100 Subject: [PATCH] src/trezor/messages: regenerate --- src/trezor/messages/CipherKeyValue.py | 4 ++-- src/trezor/messages/CosiCommit.py | 4 ++-- src/trezor/messages/CosiSign.py | 4 ++-- src/trezor/messages/DecryptMessage.py | 4 ++-- src/trezor/messages/EncryptMessage.py | 4 ++-- src/trezor/messages/EthereumGetAddress.py | 4 ++-- src/trezor/messages/EthereumSignMessage.py | 4 ++-- src/trezor/messages/EthereumSignTx.py | 4 ++-- src/trezor/messages/Features.py | 4 ++-- src/trezor/messages/GetAddress.py | 4 ++-- src/trezor/messages/GetPublicKey.py | 4 ++-- src/trezor/messages/HDNodePathType.py | 4 ++-- src/trezor/messages/MultisigRedeemScriptType.py | 8 ++++---- src/trezor/messages/NEMAggregateModification.py | 4 ++-- src/trezor/messages/NEMDecryptMessage.py | 4 ++-- src/trezor/messages/NEMGetAddress.py | 4 ++-- src/trezor/messages/NEMMosaicDefinition.py | 4 ++-- src/trezor/messages/NEMTransactionCommon.py | 4 ++-- src/trezor/messages/NEMTransfer.py | 4 ++-- src/trezor/messages/SignMessage.py | 4 ++-- src/trezor/messages/SimpleSignTx.py | 12 ++++++------ src/trezor/messages/TransactionType.py | 12 ++++++------ src/trezor/messages/TxInputType.py | 4 ++-- src/trezor/messages/TxOutputType.py | 4 ++-- 24 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/trezor/messages/CipherKeyValue.py b/src/trezor/messages/CipherKeyValue.py index 25d7f050b1..ee471f1d7d 100644 --- a/src/trezor/messages/CipherKeyValue.py +++ b/src/trezor/messages/CipherKeyValue.py @@ -16,7 +16,7 @@ class CipherKeyValue(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, key: str = None, value: bytes = None, encrypt: bool = None, @@ -25,7 +25,7 @@ class CipherKeyValue(p.MessageType): iv: bytes = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.key = key self.value = value self.encrypt = encrypt diff --git a/src/trezor/messages/CosiCommit.py b/src/trezor/messages/CosiCommit.py index a39c8cfc47..83c42720d6 100644 --- a/src/trezor/messages/CosiCommit.py +++ b/src/trezor/messages/CosiCommit.py @@ -11,10 +11,10 @@ class CosiCommit(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, data: bytes = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.data = data p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/CosiSign.py b/src/trezor/messages/CosiSign.py index d79596c33a..681ba896ee 100644 --- a/src/trezor/messages/CosiSign.py +++ b/src/trezor/messages/CosiSign.py @@ -13,13 +13,13 @@ class CosiSign(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, data: bytes = None, global_commitment: bytes = None, global_pubkey: bytes = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.data = data self.global_commitment = global_commitment self.global_pubkey = global_pubkey diff --git a/src/trezor/messages/DecryptMessage.py b/src/trezor/messages/DecryptMessage.py index 3636ab9878..b995e5b044 100644 --- a/src/trezor/messages/DecryptMessage.py +++ b/src/trezor/messages/DecryptMessage.py @@ -13,13 +13,13 @@ class DecryptMessage(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, nonce: bytes = None, message: bytes = None, hmac: bytes = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.nonce = nonce self.message = message self.hmac = hmac diff --git a/src/trezor/messages/EncryptMessage.py b/src/trezor/messages/EncryptMessage.py index dcd51e91f8..4f07edb759 100644 --- a/src/trezor/messages/EncryptMessage.py +++ b/src/trezor/messages/EncryptMessage.py @@ -17,13 +17,13 @@ class EncryptMessage(p.MessageType): pubkey: bytes = None, message: bytes = None, display_only: bool = None, - address_n: list = [], + address_n: list = None, coin_name: str = None, **kwargs, ): self.pubkey = pubkey self.message = message self.display_only = display_only - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.coin_name = coin_name p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/EthereumGetAddress.py b/src/trezor/messages/EthereumGetAddress.py index ce4030f809..a98a8e9f19 100644 --- a/src/trezor/messages/EthereumGetAddress.py +++ b/src/trezor/messages/EthereumGetAddress.py @@ -11,10 +11,10 @@ class EthereumGetAddress(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, show_display: bool = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.show_display = show_display p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/EthereumSignMessage.py b/src/trezor/messages/EthereumSignMessage.py index fe5eecf66e..d741bf9828 100644 --- a/src/trezor/messages/EthereumSignMessage.py +++ b/src/trezor/messages/EthereumSignMessage.py @@ -11,10 +11,10 @@ class EthereumSignMessage(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, message: bytes = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.message = message p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/EthereumSignTx.py b/src/trezor/messages/EthereumSignTx.py index 97377e6b09..452c83b157 100644 --- a/src/trezor/messages/EthereumSignTx.py +++ b/src/trezor/messages/EthereumSignTx.py @@ -18,7 +18,7 @@ class EthereumSignTx(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, nonce: bytes = None, gas_price: bytes = None, gas_limit: bytes = None, @@ -29,7 +29,7 @@ class EthereumSignTx(p.MessageType): chain_id: int = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.nonce = nonce self.gas_price = gas_price self.gas_limit = gas_limit diff --git a/src/trezor/messages/Features.py b/src/trezor/messages/Features.py index 2057ca97ae..af5d4ade36 100644 --- a/src/trezor/messages/Features.py +++ b/src/trezor/messages/Features.py @@ -47,7 +47,7 @@ class Features(p.MessageType): passphrase_protection: bool = None, language: str = None, label: str = None, - coins: list = [], + coins: list = None, initialized: bool = None, revision: bytes = None, bootloader_hash: bytes = None, @@ -76,7 +76,7 @@ class Features(p.MessageType): self.passphrase_protection = passphrase_protection self.language = language self.label = label - self.coins = coins + self.coins = [] if coins is None else coins self.initialized = initialized self.revision = revision self.bootloader_hash = bootloader_hash diff --git a/src/trezor/messages/GetAddress.py b/src/trezor/messages/GetAddress.py index 528b46811b..9870a391ba 100644 --- a/src/trezor/messages/GetAddress.py +++ b/src/trezor/messages/GetAddress.py @@ -15,14 +15,14 @@ class GetAddress(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, coin_name: str = None, show_display: bool = None, multisig: MultisigRedeemScriptType = None, script_type: int = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.coin_name = coin_name self.show_display = show_display self.multisig = multisig diff --git a/src/trezor/messages/GetPublicKey.py b/src/trezor/messages/GetPublicKey.py index a90021afb5..7d2f8fad6a 100644 --- a/src/trezor/messages/GetPublicKey.py +++ b/src/trezor/messages/GetPublicKey.py @@ -13,13 +13,13 @@ class GetPublicKey(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, ecdsa_curve_name: str = None, show_display: bool = None, coin_name: str = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.ecdsa_curve_name = ecdsa_curve_name self.show_display = show_display self.coin_name = coin_name diff --git a/src/trezor/messages/HDNodePathType.py b/src/trezor/messages/HDNodePathType.py index 49971d5ef9..41055d8355 100644 --- a/src/trezor/messages/HDNodePathType.py +++ b/src/trezor/messages/HDNodePathType.py @@ -12,9 +12,9 @@ class HDNodePathType(p.MessageType): def __init__( self, node: HDNodeType = None, - address_n: list = [], + address_n: list = None, **kwargs, ): self.node = node - self.address_n = address_n + self.address_n = [] if address_n is None else address_n p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/MultisigRedeemScriptType.py b/src/trezor/messages/MultisigRedeemScriptType.py index eab03693a8..5ffd534ef3 100644 --- a/src/trezor/messages/MultisigRedeemScriptType.py +++ b/src/trezor/messages/MultisigRedeemScriptType.py @@ -12,12 +12,12 @@ class MultisigRedeemScriptType(p.MessageType): def __init__( self, - pubkeys: list = [], - signatures: list = [], + pubkeys: list = None, + signatures: list = None, m: int = None, **kwargs, ): - self.pubkeys = pubkeys - self.signatures = signatures + self.pubkeys = [] if pubkeys is None else pubkeys + self.signatures = [] if signatures is None else signatures self.m = m p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/NEMAggregateModification.py b/src/trezor/messages/NEMAggregateModification.py index 6aaff97f34..b2ad1d0e9c 100644 --- a/src/trezor/messages/NEMAggregateModification.py +++ b/src/trezor/messages/NEMAggregateModification.py @@ -11,10 +11,10 @@ class NEMAggregateModification(p.MessageType): def __init__( self, - modifications: list = [], + modifications: list = None, relative_change: int = None, **kwargs, ): - self.modifications = modifications + self.modifications = [] if modifications is None else modifications self.relative_change = relative_change p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/NEMDecryptMessage.py b/src/trezor/messages/NEMDecryptMessage.py index 9ca8f339c4..e19cb2bfc6 100644 --- a/src/trezor/messages/NEMDecryptMessage.py +++ b/src/trezor/messages/NEMDecryptMessage.py @@ -13,13 +13,13 @@ class NEMDecryptMessage(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, network: int = None, public_key: bytes = None, payload: bytes = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.network = network self.public_key = public_key self.payload = payload diff --git a/src/trezor/messages/NEMGetAddress.py b/src/trezor/messages/NEMGetAddress.py index 612423a692..bd39bc063f 100644 --- a/src/trezor/messages/NEMGetAddress.py +++ b/src/trezor/messages/NEMGetAddress.py @@ -12,12 +12,12 @@ class NEMGetAddress(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, network: int = None, show_display: bool = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.network = network self.show_display = show_display p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/NEMMosaicDefinition.py b/src/trezor/messages/NEMMosaicDefinition.py index a02499e52c..1fdb9c60a7 100644 --- a/src/trezor/messages/NEMMosaicDefinition.py +++ b/src/trezor/messages/NEMMosaicDefinition.py @@ -37,7 +37,7 @@ class NEMMosaicDefinition(p.MessageType): mutable_supply: bool = None, transferable: bool = None, description: str = None, - networks: list = [], + networks: list = None, **kwargs, ): self.name = name @@ -54,5 +54,5 @@ class NEMMosaicDefinition(p.MessageType): self.mutable_supply = mutable_supply self.transferable = transferable self.description = description - self.networks = networks + self.networks = [] if networks is None else networks p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/NEMTransactionCommon.py b/src/trezor/messages/NEMTransactionCommon.py index 1d6622adfe..5357dbbd59 100644 --- a/src/trezor/messages/NEMTransactionCommon.py +++ b/src/trezor/messages/NEMTransactionCommon.py @@ -14,7 +14,7 @@ class NEMTransactionCommon(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, network: int = None, timestamp: int = None, fee: int = None, @@ -22,7 +22,7 @@ class NEMTransactionCommon(p.MessageType): signer: bytes = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.network = network self.timestamp = timestamp self.fee = fee diff --git a/src/trezor/messages/NEMTransfer.py b/src/trezor/messages/NEMTransfer.py index d019f9aecb..533191658c 100644 --- a/src/trezor/messages/NEMTransfer.py +++ b/src/trezor/messages/NEMTransfer.py @@ -18,12 +18,12 @@ class NEMTransfer(p.MessageType): amount: int = None, payload: bytes = None, public_key: bytes = None, - mosaics: list = [], + mosaics: list = None, **kwargs, ): self.recipient = recipient self.amount = amount self.payload = payload self.public_key = public_key - self.mosaics = mosaics + self.mosaics = [] if mosaics is None else mosaics p.MessageType.__init__(self, **kwargs) diff --git a/src/trezor/messages/SignMessage.py b/src/trezor/messages/SignMessage.py index 3856912587..3f26142493 100644 --- a/src/trezor/messages/SignMessage.py +++ b/src/trezor/messages/SignMessage.py @@ -13,13 +13,13 @@ class SignMessage(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, message: bytes = None, coin_name: str = None, script_type: int = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.message = message self.coin_name = coin_name self.script_type = script_type diff --git a/src/trezor/messages/SimpleSignTx.py b/src/trezor/messages/SimpleSignTx.py index 2bf7e6e3ff..27f0d7a02b 100644 --- a/src/trezor/messages/SimpleSignTx.py +++ b/src/trezor/messages/SimpleSignTx.py @@ -18,17 +18,17 @@ class SimpleSignTx(p.MessageType): def __init__( self, - inputs: list = [], - outputs: list = [], - transactions: list = [], + inputs: list = None, + outputs: list = None, + transactions: list = None, coin_name: str = None, version: int = None, lock_time: int = None, **kwargs, ): - self.inputs = inputs - self.outputs = outputs - self.transactions = transactions + self.inputs = [] if inputs is None else inputs + self.outputs = [] if outputs is None else outputs + self.transactions = [] if transactions is None else transactions self.coin_name = coin_name self.version = version self.lock_time = lock_time diff --git a/src/trezor/messages/TransactionType.py b/src/trezor/messages/TransactionType.py index 655c42cf4f..d2e49f9950 100644 --- a/src/trezor/messages/TransactionType.py +++ b/src/trezor/messages/TransactionType.py @@ -22,10 +22,10 @@ class TransactionType(p.MessageType): def __init__( self, version: int = None, - inputs: list = [], - bin_outputs: list = [], + inputs: list = None, + bin_outputs: list = None, lock_time: int = None, - outputs: list = [], + outputs: list = None, inputs_cnt: int = None, outputs_cnt: int = None, extra_data: bytes = None, @@ -34,10 +34,10 @@ class TransactionType(p.MessageType): **kwargs, ): self.version = version - self.inputs = inputs - self.bin_outputs = bin_outputs + self.inputs = [] if inputs is None else inputs + self.bin_outputs = [] if bin_outputs is None else bin_outputs self.lock_time = lock_time - self.outputs = outputs + self.outputs = [] if outputs is None else outputs self.inputs_cnt = inputs_cnt self.outputs_cnt = outputs_cnt self.extra_data = extra_data diff --git a/src/trezor/messages/TxInputType.py b/src/trezor/messages/TxInputType.py index 4dae303d0f..53304d0ac9 100644 --- a/src/trezor/messages/TxInputType.py +++ b/src/trezor/messages/TxInputType.py @@ -19,7 +19,7 @@ class TxInputType(p.MessageType): def __init__( self, - address_n: list = [], + address_n: list = None, prev_hash: bytes = None, prev_index: int = None, script_sig: bytes = None, @@ -31,7 +31,7 @@ class TxInputType(p.MessageType): decred_script_version: int = None, **kwargs, ): - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.prev_hash = prev_hash self.prev_index = prev_index self.script_sig = script_sig diff --git a/src/trezor/messages/TxOutputType.py b/src/trezor/messages/TxOutputType.py index f8e03a1f06..716920fa94 100644 --- a/src/trezor/messages/TxOutputType.py +++ b/src/trezor/messages/TxOutputType.py @@ -17,7 +17,7 @@ class TxOutputType(p.MessageType): def __init__( self, address: str = None, - address_n: list = [], + address_n: list = None, amount: int = None, script_type: int = None, multisig: MultisigRedeemScriptType = None, @@ -26,7 +26,7 @@ class TxOutputType(p.MessageType): **kwargs, ): self.address = address - self.address_n = address_n + self.address_n = [] if address_n is None else address_n self.amount = amount self.script_type = script_type self.multisig = multisig