mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-26 09:28:13 +00:00
apps.homescreen: cleanup
This commit is contained in:
parent
b89666fb87
commit
90d9687678
@ -3,7 +3,7 @@ from trezor.utils import unimport
|
|||||||
from trezor.messages.wire_types import Initialize, GetFeatures, Ping
|
from trezor.messages.wire_types import Initialize, GetFeatures, Ping
|
||||||
|
|
||||||
|
|
||||||
async def respond_Features(_, session_id):
|
async def respond_Features(msg, session_id):
|
||||||
from ..common import storage, coins
|
from ..common import storage, coins
|
||||||
from trezor.messages.Features import Features
|
from trezor.messages.Features import Features
|
||||||
|
|
||||||
@ -22,18 +22,18 @@ async def respond_Features(_, session_id):
|
|||||||
f.pin_protection = storage.is_protected_by_pin()
|
f.pin_protection = storage.is_protected_by_pin()
|
||||||
f.passphrase_protection = storage.is_protected_by_passphrase()
|
f.passphrase_protection = storage.is_protected_by_passphrase()
|
||||||
|
|
||||||
await write_message(session_id, f)
|
return f
|
||||||
|
|
||||||
|
|
||||||
async def respond_Pong(ping, session_id):
|
async def respond_Pong(msg, session_id):
|
||||||
from trezor.messages.Success import Success
|
from trezor.messages.Success import Success
|
||||||
|
s = Success()
|
||||||
# TODO: handle button_protection, passphrase_protection and pin_protection flags of Ping message
|
s.message = msg.message
|
||||||
|
# TODO: handle other fields:
|
||||||
f = Success()
|
# button_protection
|
||||||
f.message = ping.message
|
# passphrase_protection
|
||||||
|
# pin_protection
|
||||||
await write_message(session_id, f)
|
return s
|
||||||
|
|
||||||
|
|
||||||
def boot():
|
def boot():
|
||||||
|
Loading…
Reference in New Issue
Block a user