mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-24 06:11:06 +00:00
apps/debug: fix DebugLinkGetState
This commit is contained in:
parent
e92440dfc8
commit
db9ac661f9
@ -14,27 +14,15 @@ async def dispatch_DebugLinkDecision(ctx, msg):
|
|||||||
|
|
||||||
async def dispatch_DebugLinkGetState(ctx, msg):
|
async def dispatch_DebugLinkGetState(ctx, msg):
|
||||||
from trezor.messages.DebugLinkState import DebugLinkState
|
from trezor.messages.DebugLinkState import DebugLinkState
|
||||||
from apps.common import storage, request_pin
|
from apps.common import storage
|
||||||
from apps.management import reset_device
|
from apps.management import reset_device
|
||||||
|
|
||||||
if request_pin.matrix:
|
|
||||||
matrix = ''.join([str(d) for d in request_pin.matrix.digits])
|
|
||||||
else:
|
|
||||||
matrix = None
|
|
||||||
|
|
||||||
m = DebugLinkState()
|
m = DebugLinkState()
|
||||||
m.pin = storage.config_get(storage.PIN).decode()
|
m.mnemonic = storage.get_mnemonic()
|
||||||
m.mnemonic = storage.config_get(storage.MNEMONIC).decode()
|
m.passphrase_protection = storage.has_passphrase()
|
||||||
m.passphrase_protection = storage.is_protected_by_passphrase()
|
|
||||||
m.matrix = matrix
|
|
||||||
m.reset_entropy = reset_device.internal_entropy
|
m.reset_entropy = reset_device.internal_entropy
|
||||||
m.reset_word = reset_device.current_word
|
m.reset_word = reset_device.current_word
|
||||||
|
|
||||||
# TODO: handle other fields:
|
|
||||||
# f.recovery_fake_word = recovery_get_fake_word()
|
|
||||||
# f.recovery_word_pos = recovery_get_word_pos()
|
|
||||||
# f.node = storage.get_node()
|
|
||||||
|
|
||||||
return m
|
return m
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user