diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..8eef1430 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +*.disabled \ No newline at end of file diff --git a/src/background.ts b/src/background.ts index bb59a2f9..888f0ae3 100644 --- a/src/background.ts +++ b/src/background.ts @@ -8,7 +8,7 @@ import { getCurrentTab, okToInjectContentScript, } from "./utils"; -import { CodeState } from "./models/otp"; +import { CodeState, OTPType } from "./models/otp"; import { getOTPAuthPerLineFromOPTAuthMigration } from "./models/migration"; import { isChrome, isFirefox } from "./browser"; @@ -193,15 +193,15 @@ async function getTotp(text: string, silent = false) { if ( !/^[2-7a-z]+=*$/i.test(secret) && /^[0-9a-f]+$/i.test(secret) && - type === "totp" + type === OTPType[OTPType.totp] ) { - type = "hex"; + type = OTPType[OTPType.hex]; } else if ( !/^[2-7a-z]+=*$/i.test(secret) && /^[0-9a-f]+$/i.test(secret) && - type === "hotp" + type === OTPType[OTPType.hotp] ) { - type = "hhex"; + type = OTPType[OTPType.hhex]; } const entryData: { [hash: string]: RawOTPStorage } = {}; entryData[hash] = { diff --git a/src/components/Popup/BackupPage.vue b/src/components/Popup/BackupPage.vue index 8e718b46..913526ad 100644 --- a/src/components/Popup/BackupPage.vue +++ b/src/components/Popup/BackupPage.vue @@ -71,6 +71,7 @@