mirror of
https://github.com/kccleoc/seedpgp-web.git
synced 2026-03-07 09:57:50 +08:00
fix(blender): improve QR content detection
Fixes a bug where plain text mnemonics and Krux QR codes were being misidentified as encrypted SeedPGP frames. - The `detectEncryptionMode` function has been rewritten to be stricter and now correctly identifies 'text' as a type. - It no longer defaults to 'pgp', which was causing plain text to be treated as an encrypted format. - The `EncryptionMode` type in `types.ts` has been updated to include 'text'. - This resolves issues where the UI would incorrectly ask for a password for plain text mnemonics and use the wrong decryption logic for Krux QRs.
This commit is contained in:
@@ -20,7 +20,7 @@ export type KruxEncryptionParams = {
|
||||
version?: number;
|
||||
};
|
||||
|
||||
export type EncryptionMode = 'pgp' | 'krux';
|
||||
export type EncryptionMode = 'pgp' | 'krux' | 'text';
|
||||
|
||||
export type EncryptionParams = {
|
||||
plaintext: SeedPgpPlaintext | string;
|
||||
|
||||
Reference in New Issue
Block a user