1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-05-29 04:08:46 +00:00

src/apps: remove layout_ from workflow functions

This commit is contained in:
Jan Pochyla 2018-02-27 14:50:34 +01:00
parent a4081bab72
commit 4ef79ca48b
13 changed files with 30 additions and 30 deletions

View File

@ -6,8 +6,8 @@ from trezor.messages.wire_types import EthereumGetAddress, EthereumSignTx
@unimport @unimport
def dispatch_EthereumGetAddress(*args, **kwargs): def dispatch_EthereumGetAddress(*args, **kwargs):
from .get_address import layout_ethereum_get_address from .get_address import ethereum_get_address
return layout_ethereum_get_address(*args, **kwargs) return ethereum_get_address(*args, **kwargs)
@unimport @unimport

View File

@ -1,7 +1,7 @@
from trezor import ui from trezor import ui
async def layout_ethereum_get_address(ctx, msg): async def ethereum_get_address(ctx, msg):
from trezor.messages.EthereumAddress import EthereumAddress from trezor.messages.EthereumAddress import EthereumAddress
from trezor.crypto.curve import secp256k1 from trezor.crypto.curve import secp256k1
from trezor.crypto.hashlib import sha3_256 from trezor.crypto.hashlib import sha3_256

View File

@ -6,8 +6,8 @@ from trezor.messages.wire_types import \
@unimport @unimport
def dispatch_LoadDevice(*args, **kwargs): def dispatch_LoadDevice(*args, **kwargs):
from .load_device import layout_load_device from .load_device import load_device
return layout_load_device(*args, **kwargs) return load_device(*args, **kwargs)
@unimport @unimport
@ -24,8 +24,8 @@ def dispatch_BackupDevice(*args, **kwargs):
@unimport @unimport
def dispatch_WipeDevice(*args, **kwargs): def dispatch_WipeDevice(*args, **kwargs):
from .wipe_device import layout_wipe_device from .wipe_device import wipe_device
return layout_wipe_device(*args, **kwargs) return wipe_device(*args, **kwargs)
@unimport @unimport
@ -36,20 +36,20 @@ def dispatch_RecoveryDevice(*args, **kwargs):
@unimport @unimport
def dispatch_ApplySettings(*args, **kwargs): def dispatch_ApplySettings(*args, **kwargs):
from .apply_settings import layout_apply_settings from .apply_settings import apply_settings
return layout_apply_settings(*args, **kwargs) return apply_settings(*args, **kwargs)
@unimport @unimport
def dispatch_ApplyFlags(*args, **kwargs): def dispatch_ApplyFlags(*args, **kwargs):
from .apply_flags import layout_apply_flags from .apply_flags import apply_flags
return layout_apply_flags(*args, **kwargs) return apply_flags(*args, **kwargs)
@unimport @unimport
def dispatch_ChangePin(*args, **kwargs): def dispatch_ChangePin(*args, **kwargs):
from .change_pin import layout_change_pin from .change_pin import change_pin
return layout_change_pin(*args, **kwargs) return change_pin(*args, **kwargs)
def boot(): def boot():

View File

@ -1,4 +1,4 @@
async def layout_apply_flags(ctx, msg): async def apply_flags(ctx, msg):
from trezor.messages.Success import Success from trezor.messages.Success import Success
from ..common import storage from ..common import storage

View File

@ -1,7 +1,7 @@
from trezor import ui, wire from trezor import ui, wire
async def layout_apply_settings(ctx, msg): async def apply_settings(ctx, msg):
from trezor.messages.Success import Success from trezor.messages.Success import Success
from trezor.messages import ButtonRequestType, FailureType from trezor.messages import ButtonRequestType, FailureType
from trezor.ui.text import Text from trezor.ui.text import Text

View File

@ -67,7 +67,7 @@ def confirm_change_pin(ctx, msg):
'set new PIN?')) 'set new PIN?'))
async def layout_change_pin(ctx, msg): async def change_pin(ctx, msg):
from trezor.messages.Success import Success from trezor.messages.Success import Success
from trezor.messages.Failure import Failure from trezor.messages.Failure import Failure
from trezor.messages import FailureType, PinMatrixRequestType from trezor.messages import FailureType, PinMatrixRequestType

View File

@ -2,7 +2,7 @@ from trezor import wire, ui, config
from trezor.pin import pin_to_int from trezor.pin import pin_to_int
async def layout_load_device(ctx, msg): async def load_device(ctx, msg):
from trezor.crypto import bip39 from trezor.crypto import bip39
from trezor.messages.Success import Success from trezor.messages.Success import Success
from trezor.messages.FailureType import UnexpectedMessage, ProcessError from trezor.messages.FailureType import UnexpectedMessage, ProcessError

View File

@ -6,7 +6,7 @@ from apps.common import storage
from apps.common.confirm import hold_to_confirm from apps.common.confirm import hold_to_confirm
async def layout_wipe_device(ctx, msg): async def wipe_device(ctx, msg):
await hold_to_confirm(ctx, Text( await hold_to_confirm(ctx, Text(
'Wipe device', 'Wipe device',

View File

@ -11,20 +11,20 @@ from trezor.messages.wire_types import \
@unimport @unimport
def dispatch_GetPublicKey(*args, **kwargs): def dispatch_GetPublicKey(*args, **kwargs):
from .get_public_key import layout_get_public_key from .get_public_key import get_public_key
return layout_get_public_key(*args, **kwargs) return get_public_key(*args, **kwargs)
@unimport @unimport
def dispatch_GetAddress(*args, **kwargs): def dispatch_GetAddress(*args, **kwargs):
from .get_address import layout_get_address from .get_address import get_address
return layout_get_address(*args, **kwargs) return get_address(*args, **kwargs)
@unimport @unimport
def dispatch_GetEntropy(*args, **kwargs): def dispatch_GetEntropy(*args, **kwargs):
from .get_entropy import layout_get_entropy from .get_entropy import get_entropy
return layout_get_entropy(*args, **kwargs) return get_entropy(*args, **kwargs)
@unimport @unimport
@ -47,8 +47,8 @@ def dispatch_VerifyMessage(*args, **kwargs):
@unimport @unimport
def dispatch_SignIdentity(*args, **kwargs): def dispatch_SignIdentity(*args, **kwargs):
from .sign_identity import layout_sign_identity from .sign_identity import sign_identity
return layout_sign_identity(*args, **kwargs) return sign_identity(*args, **kwargs)
@unimport @unimport

View File

@ -2,7 +2,7 @@ from micropython import const
from trezor import ui from trezor import ui
async def layout_get_address(ctx, msg): async def get_address(ctx, msg):
from trezor.messages.Address import Address from trezor.messages.Address import Address
from trezor.messages.InputScriptType import SPENDWITNESS from trezor.messages.InputScriptType import SPENDWITNESS
from ..common import coins from ..common import coins

View File

@ -1,7 +1,7 @@
from trezor import ui from trezor import ui
async def layout_get_entropy(ctx, msg): async def get_entropy(ctx, msg):
from trezor.messages.Entropy import Entropy from trezor.messages.Entropy import Entropy
from trezor.crypto import random from trezor.crypto import random

View File

@ -1,5 +1,5 @@
async def layout_get_public_key(ctx, msg): async def get_public_key(ctx, msg):
from trezor.messages.HDNodeType import HDNodeType from trezor.messages.HDNodeType import HDNodeType
from trezor.messages.PublicKey import PublicKey from trezor.messages.PublicKey import PublicKey
from ..common import coins from ..common import coins

View File

@ -79,7 +79,7 @@ def sign_challenge(seckey: bytes,
return signature return signature
async def layout_sign_identity(ctx, msg): async def sign_identity(ctx, msg):
from trezor.messages.SignedIdentity import SignedIdentity from trezor.messages.SignedIdentity import SignedIdentity
from ..common import coins from ..common import coins
from ..common import seed from ..common import seed