mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-06-28 06:34:15 +00:00
fix: build errors
This commit is contained in:
parent
4a65994d35
commit
516923905d
15 changed files with 65 additions and 57 deletions
|
|
@ -6,7 +6,7 @@ const MIN_IMAGE_DIMENSIONS = 128;
|
|||
const MAX_IMAGE_DIMENSIONS = 1024;
|
||||
const MAX_IMAGE_SIZE = 1024 * 1024; // 1 MB
|
||||
|
||||
const THRESHOLD = 0.5;
|
||||
// const THRESHOLD = 0.5;
|
||||
|
||||
// tf.enableProdMode();
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export function convertQrCode(bytes: Uint8Array): { mii: Mii; tomodachiLifeMii:
|
|||
let decrypted: Uint8Array<ArrayBufferLike> = new Uint8Array();
|
||||
try {
|
||||
decrypted = AES_CCM.decrypt(content, MII_DECRYPTION_KEY, nonceWithZeros, undefined, 16);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
throw new Error("Failed to decrypt QR code. It may be invalid or corrupted");
|
||||
}
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ export function convertQrCode(bytes: Uint8Array): { mii: Mii; tomodachiLifeMii:
|
|||
}
|
||||
|
||||
return { mii, tomodachiLifeMii };
|
||||
} catch (error) {
|
||||
} catch {
|
||||
throw new Error("Mii data is not valid");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue