diff --git a/src/models/otp.ts b/src/models/otp.ts index cdfa38db..43f6dee2 100644 --- a/src/models/otp.ts +++ b/src/models/otp.ts @@ -3,7 +3,8 @@ import { UserSettings } from "./settings"; import { EntryStorage } from "./storage"; export enum OTPType { - totp = 1, + PLACEHOLDER_DO_NOT_USE, // https://github.com/Authenticator-Extension/Authenticator/pull/1283#issuecomment-2382842440 + totp, hotp, battle, steam, diff --git a/src/models/storage.ts b/src/models/storage.ts index 4b3699fb..84255a21 100644 --- a/src/models/storage.ts +++ b/src/models/storage.ts @@ -478,7 +478,7 @@ export class EntryStorage { algorithm: OTPAlgorithm; pinned: boolean; } = { - type: (parseInt(data[hash].type) as OTPType) || OTPType[OTPType.totp], + type: OTPType[data[hash].type as keyof typeof OTPType] || OTPType.totp, index: data[hash].index || 0, issuer: data[hash].issuer || "", account: data[hash].account || "",