1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-28 09:08:07 +00:00
trezor-firmware/src/apps/common/request_passphrase.py
2016-10-20 15:13:47 +02:00

16 lines
500 B
Python

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()
ack = await wire.reply_message(session_id, PassphraseRequest(), PassphraseAck)
return ack.passphrase