src/apps: remove layout_ from workflow functions

pull/25/head
Jan Pochyla 6 years ago
parent a4081bab72
commit 4ef79ca48b

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

@ -1,7 +1,7 @@
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.crypto.curve import secp256k1
from trezor.crypto.hashlib import sha3_256

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

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

@ -1,7 +1,7 @@
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 import ButtonRequestType, FailureType
from trezor.ui.text import Text

@ -67,7 +67,7 @@ def confirm_change_pin(ctx, msg):
'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.Failure import Failure
from trezor.messages import FailureType, PinMatrixRequestType

@ -2,7 +2,7 @@ from trezor import wire, ui, config
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.messages.Success import Success
from trezor.messages.FailureType import UnexpectedMessage, ProcessError

@ -6,7 +6,7 @@ from apps.common import storage
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(
'Wipe device',

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

@ -2,7 +2,7 @@ from micropython import const
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.InputScriptType import SPENDWITNESS
from ..common import coins

@ -1,7 +1,7 @@
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.crypto import random

@ -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.PublicKey import PublicKey
from ..common import coins

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

Loading…
Cancel
Save