mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-03 12:00:59 +00:00
Fixed load_device
This commit is contained in:
parent
0af7a672f0
commit
b120043fcc
@ -237,11 +237,11 @@ class BitkeyClient(object):
|
|||||||
self.init_device()
|
self.init_device()
|
||||||
return isinstance(resp, proto.Success)
|
return isinstance(resp, proto.Success)
|
||||||
|
|
||||||
def load_device(self, seed, otp, pin, spv):
|
def load_device(self, algo, seed, otp, pin, spv):
|
||||||
if not self.debuglink:
|
if not self.debuglink:
|
||||||
raise Exception("DebugLink not available")
|
raise Exception("DebugLink not available")
|
||||||
|
|
||||||
if not self.debuglink.load_device(seed, otp, pin, spv):
|
if not self.debuglink.load_device(algo, seed, otp, pin, spv):
|
||||||
return False
|
return False
|
||||||
self.init_device()
|
self.init_device()
|
||||||
return True
|
return True
|
@ -22,8 +22,8 @@ class DebugLink(object):
|
|||||||
self.transport.write(proto.DebugLinkGetState(otp=otp, pin=pin))
|
self.transport.write(proto.DebugLinkGetState(otp=otp, pin=pin))
|
||||||
return self.transport.read_blocking()
|
return self.transport.read_blocking()
|
||||||
|
|
||||||
def load_device(self, seed, otp, pin, spv):
|
def load_device(self, algo, seed, otp, pin, spv):
|
||||||
self.transport.write(proto.LoadDevice(seed=seed, otp=otp, pin=pin, spv=spv))
|
self.transport.write(proto.LoadDevice(algo=algo, seed=seed, otp=otp, pin=pin, spv=spv))
|
||||||
resp = self.transport.read_blocking()
|
resp = self.transport.read_blocking()
|
||||||
return isinstance(resp, proto.Success)
|
return isinstance(resp, proto.Success)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user