mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 14:28:07 +00:00
apps.debug: support DebugLinkState.matrix
This commit is contained in:
parent
722cc2d63b
commit
7378d763f0
@ -12,14 +12,20 @@ async def dispatch_DebugLinkDecision(msg, session_id):
|
||||
|
||||
async def dispatch_DebugLinkGetState(msg, session_id):
|
||||
from trezor.messages.DebugLinkState import DebugLinkState
|
||||
from ..common import storage
|
||||
from ..common import storage, request_pin
|
||||
|
||||
if request_pin.matrix:
|
||||
matrix = ''.join([str(d) for d in request_pin.matrix.digits])
|
||||
else:
|
||||
matrix = None
|
||||
|
||||
m = DebugLinkState()
|
||||
m.pin = storage.get_pin()
|
||||
m.mnemonic = storage.get_mnemonic()
|
||||
m.passphrase_protection = storage.is_protected_by_passphrase()
|
||||
m.matrix = matrix
|
||||
|
||||
# TODO: handle other fields:
|
||||
# f.matrix = pinmatrix_get()
|
||||
# f.reset_entropy = reset_get_internal_entropy()
|
||||
# f.reset_word = reset_get_word()
|
||||
# f.recovery_fake_word = recovery_get_fake_word()
|
||||
|
Loading…
Reference in New Issue
Block a user