mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-03 13:08:17 +00:00
src/main: report device_id as usb serial number
This commit is contained in:
parent
a25af7d22a
commit
39576eb2a7
@ -16,10 +16,10 @@ _NEEDS_BACKUP = const(0x07) # 0x01 or empty
|
||||
|
||||
|
||||
def get_device_id() -> str:
|
||||
dev_id = config.get(_APP, _DEVICE_ID).decode()
|
||||
dev_id = config.get(_APP, _DEVICE_ID, True).decode() # public
|
||||
if not dev_id:
|
||||
dev_id = new_device_id()
|
||||
config.set(_APP, _DEVICE_ID, dev_id.encode())
|
||||
config.set(_APP, _DEVICE_ID, dev_id.encode(), True) # public
|
||||
return dev_id
|
||||
|
||||
|
||||
|
@ -6,6 +6,8 @@ from trezor import loop
|
||||
from trezor import wire
|
||||
from trezor import workflow
|
||||
|
||||
from apps.common.storage import get_device_id
|
||||
|
||||
log.level = log.DEBUG
|
||||
|
||||
# initialize the USB stack
|
||||
@ -60,7 +62,7 @@ usb = io.USB(
|
||||
release_num=0x0200,
|
||||
manufacturer="SatoshiLabs",
|
||||
product="TREZOR",
|
||||
serial_number="44DD6B2C788D760538A78ECA",
|
||||
serial_number=get_device_id(),
|
||||
interface="TREZOR Interface",
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user