parent
852a950d66
commit
7195e1d12f
@ -1,11 +1,17 @@
|
||||
from trezor.dispatcher import register
|
||||
from trezor.messages.Initialize import Initialize
|
||||
from trezor.utils import unimport_func
|
||||
|
||||
|
||||
def dispatch(message):
|
||||
@unimport_func
|
||||
def dispatch_Initialize(mtype, mbuf):
|
||||
from trezor.messages.Initialize import Initialize
|
||||
|
||||
message = Initialize.loads(mbuf)
|
||||
|
||||
from .layout_homescreen import layout_homescreen
|
||||
return layout_homescreen(message)
|
||||
|
||||
|
||||
def boot():
|
||||
register(Initialize, dispatch)
|
||||
Initialize = 0
|
||||
register(Initialize, dispatch_Initialize)
|
||||
|
@ -1,12 +1,17 @@
|
||||
from trezor.dispatcher import register
|
||||
from trezor.messages.GetPublicKey import GetPublicKey
|
||||
from trezor.utils import unimport_func
|
||||
|
||||
|
||||
def dispatch(message):
|
||||
if message.message_type is GetPublicKey:
|
||||
from .layout_get_public_key import layout_get_public_key
|
||||
return layout_get_public_key(message)
|
||||
@unimport_func
|
||||
def dispatch_GetPublicKey(mtype, mbuf):
|
||||
from trezor.messages.GetPublicKey import GetPublicKey
|
||||
|
||||
message = GetPublicKey.loads(mbuf)
|
||||
|
||||
from .layout_get_public_key import layout_get_public_key
|
||||
return layout_get_public_key(message)
|
||||
|
||||
|
||||
def boot():
|
||||
register(GetPublicKey, dispatch)
|
||||
GetPublicKey = 11
|
||||
register(GetPublicKey, dispatch_GetPublicKey)
|
||||
|
Loading…
Reference in new issue