mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-14 03:30:02 +00:00
Fixed load_device
This commit is contained in:
parent
0af7a672f0
commit
b120043fcc
@ -237,11 +237,11 @@ class BitkeyClient(object):
|
||||
self.init_device()
|
||||
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:
|
||||
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
|
||||
self.init_device()
|
||||
return True
|
@ -22,8 +22,8 @@ class DebugLink(object):
|
||||
self.transport.write(proto.DebugLinkGetState(otp=otp, pin=pin))
|
||||
return self.transport.read_blocking()
|
||||
|
||||
def load_device(self, seed, otp, pin, spv):
|
||||
self.transport.write(proto.LoadDevice(seed=seed, otp=otp, pin=pin, spv=spv))
|
||||
def load_device(self, algo, seed, otp, pin, spv):
|
||||
self.transport.write(proto.LoadDevice(algo=algo, seed=seed, otp=otp, pin=pin, spv=spv))
|
||||
resp = self.transport.read_blocking()
|
||||
return isinstance(resp, proto.Success)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user