mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 12:00:59 +00:00
core/sd_salt: check if sd_salt is enabled before asking for SD card
This commit is contained in:
parent
0c4fa03575
commit
c96d5ab1bc
@ -61,6 +61,9 @@ async def ensure_sd_card(ctx: wire.GenericContext) -> None:
|
|||||||
async def request_sd_salt(
|
async def request_sd_salt(
|
||||||
ctx: wire.GenericContext = wire.DUMMY_CONTEXT
|
ctx: wire.GenericContext = wire.DUMMY_CONTEXT
|
||||||
) -> Optional[bytearray]:
|
) -> Optional[bytearray]:
|
||||||
|
if not storage.sd_salt.is_enabled():
|
||||||
|
return None
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
await ensure_sd_card(ctx)
|
await ensure_sd_card(ctx)
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user