mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-15 09:02:02 +00:00
src/apps: remove unimport usage
This commit is contained in:
parent
55f3edebda
commit
9b9183c4f7
@ -1,28 +1,23 @@
|
|||||||
from trezor.wire import register, protobuf_workflow
|
from trezor.wire import register, protobuf_workflow
|
||||||
from trezor.utils import unimport
|
|
||||||
from trezor.messages.wire_types import EthereumGetAddress, EthereumSignTx
|
from trezor.messages.wire_types import EthereumGetAddress, EthereumSignTx
|
||||||
# from trezor.messages.wire_types import EthereumSignMessage, EthereumVerifyMessage
|
# from trezor.messages.wire_types import EthereumSignMessage, EthereumVerifyMessage
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_EthereumGetAddress(*args, **kwargs):
|
def dispatch_EthereumGetAddress(*args, **kwargs):
|
||||||
from .get_address import ethereum_get_address
|
from .get_address import ethereum_get_address
|
||||||
return ethereum_get_address(*args, **kwargs)
|
return ethereum_get_address(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_EthereumSignTx(*args, **kwargs):
|
def dispatch_EthereumSignTx(*args, **kwargs):
|
||||||
from .sign_tx import ethereum_sign_tx
|
from .sign_tx import ethereum_sign_tx
|
||||||
return ethereum_sign_tx(*args, **kwargs)
|
return ethereum_sign_tx(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_EthereumSignMessage(*args, **kwargs):
|
def dispatch_EthereumSignMessage(*args, **kwargs):
|
||||||
from .sign_message import ethereum_sign_message
|
from .sign_message import ethereum_sign_message
|
||||||
return ethereum_sign_message(*args, **kwargs)
|
return ethereum_sign_message(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_EthereumVerifyMessage(*args, **kwargs):
|
def dispatch_EthereumVerifyMessage(*args, **kwargs):
|
||||||
from .verify_message import ethereum_verify_message
|
from .verify_message import ethereum_verify_message
|
||||||
return ethereum_verify_message(*args, **kwargs)
|
return ethereum_verify_message(*args, **kwargs)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from trezor import config
|
from trezor import config
|
||||||
from trezor.utils import unimport, symbol, model
|
from trezor.utils import symbol, model
|
||||||
from trezor.wire import register, protobuf_workflow
|
from trezor.wire import register, protobuf_workflow
|
||||||
from trezor.messages import wire_types
|
from trezor.messages import wire_types
|
||||||
from trezor.messages.Features import Features
|
from trezor.messages.Features import Features
|
||||||
@ -43,7 +43,6 @@ async def respond_ClearSession(ctx, msg):
|
|||||||
return Success(message='Session cleared')
|
return Success(message='Session cleared')
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
async def respond_Pong(ctx, msg):
|
async def respond_Pong(ctx, msg):
|
||||||
|
|
||||||
if msg.button_protection:
|
if msg.button_protection:
|
||||||
|
@ -1,58 +1,48 @@
|
|||||||
from trezor.wire import register, protobuf_workflow
|
from trezor.wire import register, protobuf_workflow
|
||||||
from trezor.utils import unimport
|
|
||||||
from trezor.messages.wire_types import \
|
from trezor.messages.wire_types import \
|
||||||
LoadDevice, ResetDevice, BackupDevice, WipeDevice, RecoveryDevice, ApplySettings, ApplyFlags, ChangePin, SetU2FCounter
|
LoadDevice, ResetDevice, BackupDevice, WipeDevice, RecoveryDevice, ApplySettings, ApplyFlags, ChangePin, SetU2FCounter
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_LoadDevice(*args, **kwargs):
|
def dispatch_LoadDevice(*args, **kwargs):
|
||||||
from .load_device import load_device
|
from .load_device import load_device
|
||||||
return load_device(*args, **kwargs)
|
return load_device(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_ResetDevice(*args, **kwargs):
|
def dispatch_ResetDevice(*args, **kwargs):
|
||||||
from .reset_device import reset_device
|
from .reset_device import reset_device
|
||||||
return reset_device(*args, **kwargs)
|
return reset_device(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_BackupDevice(*args, **kwargs):
|
def dispatch_BackupDevice(*args, **kwargs):
|
||||||
from .backup_device import backup_device
|
from .backup_device import backup_device
|
||||||
return backup_device(*args, **kwargs)
|
return backup_device(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_WipeDevice(*args, **kwargs):
|
def dispatch_WipeDevice(*args, **kwargs):
|
||||||
from .wipe_device import wipe_device
|
from .wipe_device import wipe_device
|
||||||
return wipe_device(*args, **kwargs)
|
return wipe_device(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_RecoveryDevice(*args, **kwargs):
|
def dispatch_RecoveryDevice(*args, **kwargs):
|
||||||
from .recovery_device import recovery_device
|
from .recovery_device import recovery_device
|
||||||
return recovery_device(*args, **kwargs)
|
return recovery_device(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_ApplySettings(*args, **kwargs):
|
def dispatch_ApplySettings(*args, **kwargs):
|
||||||
from .apply_settings import apply_settings
|
from .apply_settings import apply_settings
|
||||||
return apply_settings(*args, **kwargs)
|
return apply_settings(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_ApplyFlags(*args, **kwargs):
|
def dispatch_ApplyFlags(*args, **kwargs):
|
||||||
from .apply_flags import apply_flags
|
from .apply_flags import apply_flags
|
||||||
return apply_flags(*args, **kwargs)
|
return apply_flags(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_ChangePin(*args, **kwargs):
|
def dispatch_ChangePin(*args, **kwargs):
|
||||||
from .change_pin import change_pin
|
from .change_pin import change_pin
|
||||||
return change_pin(*args, **kwargs)
|
return change_pin(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_SetU2FCounter(*args, **kwargs):
|
def dispatch_SetU2FCounter(*args, **kwargs):
|
||||||
from .set_u2f_counter import set_u2f_counter
|
from .set_u2f_counter import set_u2f_counter
|
||||||
return set_u2f_counter(*args, **kwargs)
|
return set_u2f_counter(*args, **kwargs)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
from trezor.wire import register, protobuf_workflow
|
from trezor.wire import register, protobuf_workflow
|
||||||
from trezor.utils import unimport
|
|
||||||
from trezor.messages.wire_types import \
|
from trezor.messages.wire_types import \
|
||||||
GetPublicKey, GetAddress, \
|
GetPublicKey, GetAddress, \
|
||||||
GetEntropy, \
|
GetEntropy, \
|
||||||
@ -10,55 +9,46 @@ from trezor.messages.wire_types import \
|
|||||||
CipherKeyValue
|
CipherKeyValue
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_GetPublicKey(*args, **kwargs):
|
def dispatch_GetPublicKey(*args, **kwargs):
|
||||||
from .get_public_key import get_public_key
|
from .get_public_key import get_public_key
|
||||||
return get_public_key(*args, **kwargs)
|
return get_public_key(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_GetAddress(*args, **kwargs):
|
def dispatch_GetAddress(*args, **kwargs):
|
||||||
from .get_address import get_address
|
from .get_address import get_address
|
||||||
return get_address(*args, **kwargs)
|
return get_address(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_GetEntropy(*args, **kwargs):
|
def dispatch_GetEntropy(*args, **kwargs):
|
||||||
from .get_entropy import get_entropy
|
from .get_entropy import get_entropy
|
||||||
return get_entropy(*args, **kwargs)
|
return get_entropy(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_SignTx(*args, **kwargs):
|
def dispatch_SignTx(*args, **kwargs):
|
||||||
from .sign_tx import sign_tx
|
from .sign_tx import sign_tx
|
||||||
return sign_tx(*args, **kwargs)
|
return sign_tx(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_SignMessage(*args, **kwargs):
|
def dispatch_SignMessage(*args, **kwargs):
|
||||||
from .sign_message import sign_message
|
from .sign_message import sign_message
|
||||||
return sign_message(*args, **kwargs)
|
return sign_message(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_VerifyMessage(*args, **kwargs):
|
def dispatch_VerifyMessage(*args, **kwargs):
|
||||||
from .verify_message import verify_message
|
from .verify_message import verify_message
|
||||||
return verify_message(*args, **kwargs)
|
return verify_message(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_SignIdentity(*args, **kwargs):
|
def dispatch_SignIdentity(*args, **kwargs):
|
||||||
from .sign_identity import sign_identity
|
from .sign_identity import sign_identity
|
||||||
return sign_identity(*args, **kwargs)
|
return sign_identity(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_GetECDHSessionKey(*args, **kwargs):
|
def dispatch_GetECDHSessionKey(*args, **kwargs):
|
||||||
from .ecdh import get_ecdh_session_key
|
from .ecdh import get_ecdh_session_key
|
||||||
return get_ecdh_session_key(*args, **kwargs)
|
return get_ecdh_session_key(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
@unimport
|
|
||||||
def dispatch_CipherKeyValue(*args, **kwargs):
|
def dispatch_CipherKeyValue(*args, **kwargs):
|
||||||
from .cipher_key_value import cipher_key_value
|
from .cipher_key_value import cipher_key_value
|
||||||
return cipher_key_value(*args, **kwargs)
|
return cipher_key_value(*args, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user