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