fix(tokens-repo): make json _get_stored_new_device_key return tz-aware keys

This commit is contained in:
Houkime 2023-01-13 11:37:41 +00:00 committed by Inex Code
parent da19cc8c0e
commit d0a17d7b7a

View file

@ -143,7 +143,11 @@ class JsonTokensRepository(AbstractTokensRepository):
new_device_key = NewDeviceKey(
key=tokens_file["new_device"]["token"],
created_at=tokens_file["new_device"]["date"],
expires_at=tokens_file["new_device"]["expiration"],
created_at=self.__date_from_tokens_file(
tokens_file, "new_device", "date"
),
expires_at=self.__date_from_tokens_file(
tokens_file, "new_device", "expiration"
),
)
return new_device_key