1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-27 16:48:09 +00:00
trezor-firmware/src/apps/common/request_passphrase.py

16 lines
491 B
Python
Raw Normal View History

2016-10-20 13:04:54 +00:00
from trezor import ui, wire
async def request_passphrase(session_id):
from trezor.messages.PassphraseRequest import PassphraseRequest
from trezor.messages.wire_types import PassphraseAck
from trezor.ui.text import Text
ui.display.clear()
text = Text('Enter passphrase', ui.ICON_RESET,
'Please enter passphrase', 'on your computer.')
text.render()
2016-12-08 15:18:12 +00:00
ack = await wire.call(session_id, PassphraseRequest(), PassphraseAck)
2016-10-20 13:04:54 +00:00
return ack.passphrase