fix new device
parent
c2f18e9439
commit
c25bf44dc7
|
@ -210,7 +210,13 @@ class JsonTokensRepository(AbstractTokensRepository):
|
|||
self, mnemonic_phrase: str, device_name: str
|
||||
) -> Token:
|
||||
"""Use the mnemonic new device key"""
|
||||
new_device_key = self.get_new_device_key()
|
||||
|
||||
with WriteUserData(UserDataFiles.TOKENS) as tokens_file:
|
||||
new_device_key = NewDeviceKey(
|
||||
key=tokens_file["new_device"]["token"],
|
||||
created_at=tokens_file["new_device"]["date"],
|
||||
expires_at=tokens_file["new_device"]["expiration"],
|
||||
)
|
||||
|
||||
if new_device_key is None:
|
||||
raise TokenNotFoundError("New device key not found!")
|
||||
|
|
Loading…
Reference in New Issue