mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-15 21:38:46 +00:00
Merge pull request #661 from trezor/tsusanka/webauthn-move-iface
core/webauthn: set webauthn interface in its app not in main.py
This commit is contained in:
commit
1d1e9da1d3
@ -1,10 +1,10 @@
|
|||||||
from trezor import io, loop, wire
|
from trezor import loop, utils, wire
|
||||||
from trezor.messages import MessageType
|
from trezor.messages import MessageType
|
||||||
|
|
||||||
from apps.webauthn.fido2 import handle_reports
|
from apps.webauthn.fido2 import handle_reports
|
||||||
|
|
||||||
|
|
||||||
def boot(iface: io.HID) -> None:
|
def boot() -> None:
|
||||||
wire.add(
|
wire.add(
|
||||||
MessageType.WebAuthnListResidentCredentials,
|
MessageType.WebAuthnListResidentCredentials,
|
||||||
__name__,
|
__name__,
|
||||||
@ -18,4 +18,7 @@ def boot(iface: io.HID) -> None:
|
|||||||
__name__,
|
__name__,
|
||||||
"remove_resident_credential",
|
"remove_resident_credential",
|
||||||
)
|
)
|
||||||
loop.schedule(handle_reports(iface))
|
if not __debug__ or utils.EMULATOR:
|
||||||
|
import usb
|
||||||
|
|
||||||
|
loop.schedule(handle_reports(usb.iface_webauthn))
|
||||||
|
@ -46,12 +46,10 @@ def _boot_default() -> None:
|
|||||||
import apps.tezos
|
import apps.tezos
|
||||||
import apps.eos
|
import apps.eos
|
||||||
import apps.binance
|
import apps.binance
|
||||||
|
import apps.webauthn
|
||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
import apps.debug
|
import apps.debug
|
||||||
if not utils.BITCOIN_ONLY:
|
|
||||||
if not __debug__ or utils.EMULATOR:
|
|
||||||
import apps.webauthn
|
|
||||||
|
|
||||||
# boot applications
|
# boot applications
|
||||||
apps.homescreen.boot()
|
apps.homescreen.boot()
|
||||||
@ -68,11 +66,9 @@ def _boot_default() -> None:
|
|||||||
apps.tezos.boot()
|
apps.tezos.boot()
|
||||||
apps.eos.boot()
|
apps.eos.boot()
|
||||||
apps.binance.boot()
|
apps.binance.boot()
|
||||||
|
apps.webauthn.boot()
|
||||||
if __debug__:
|
if __debug__:
|
||||||
apps.debug.boot()
|
apps.debug.boot()
|
||||||
if not utils.BITCOIN_ONLY:
|
|
||||||
if not __debug__ or utils.EMULATOR:
|
|
||||||
apps.webauthn.boot(usb.iface_webauthn)
|
|
||||||
|
|
||||||
# run main event loop and specify which screen is the default
|
# run main event loop and specify which screen is the default
|
||||||
from apps.homescreen.homescreen import homescreen
|
from apps.homescreen.homescreen import homescreen
|
||||||
|
Loading…
Reference in New Issue
Block a user