mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-29 19:08:12 +00:00
core/webauthn: set webauthn interface in its app not in main.py
This way the other messages (WebAuthnListResidentCredentials etc.) get registered in device debug build and can be tested. Updates #591
This commit is contained in:
parent
68a3094b0a
commit
809b30ddcf
@ -1,10 +1,10 @@
|
||||
from trezor import io, loop, wire
|
||||
from trezor import loop, utils, wire
|
||||
from trezor.messages import MessageType
|
||||
|
||||
from apps.webauthn.fido2 import handle_reports
|
||||
|
||||
|
||||
def boot(iface: io.HID) -> None:
|
||||
def boot() -> None:
|
||||
wire.add(
|
||||
MessageType.WebAuthnListResidentCredentials,
|
||||
__name__,
|
||||
@ -18,4 +18,7 @@ def boot(iface: io.HID) -> None:
|
||||
__name__,
|
||||
"remove_resident_credential",
|
||||
)
|
||||
loop.schedule(handle_reports(iface))
|
||||
if not __debug__ or utils.EMULATOR:
|
||||
import usb
|
||||
|
||||
loop.schedule(handle_reports(usb.iface_webauthn))
|
||||
|
@ -50,8 +50,7 @@ def _boot_default() -> None:
|
||||
if __debug__:
|
||||
import apps.debug
|
||||
if not utils.BITCOIN_ONLY:
|
||||
if not __debug__ or utils.EMULATOR:
|
||||
import apps.webauthn
|
||||
import apps.webauthn
|
||||
|
||||
# boot applications
|
||||
apps.homescreen.boot()
|
||||
@ -71,8 +70,7 @@ def _boot_default() -> None:
|
||||
if __debug__:
|
||||
apps.debug.boot()
|
||||
if not utils.BITCOIN_ONLY:
|
||||
if not __debug__ or utils.EMULATOR:
|
||||
apps.webauthn.boot(usb.iface_webauthn)
|
||||
apps.webauthn.boot()
|
||||
|
||||
# run main event loop and specify which screen is the default
|
||||
from apps.homescreen.homescreen import homescreen
|
||||
|
Loading…
Reference in New Issue
Block a user