Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@sentry/opentelemetry": "^10.34.0",
"@stripe/stripe-js": "^9.7.0",
"@types/jsdom": "^28.0.3",
"@types/node": "^25.3.5",
"@types/node": "^26.4.1",
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
"canvas-confetti": "^1.9.4",
Expand Down
3 changes: 1 addition & 2 deletions src/app/api/utils/mockUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

import { BinaryLike } from "crypto";
import { getSha1 } from "../../../utils/fxa";
import { logger } from "../../functions/server/logging";

export function emailHashPrefix(email: string) {
return getSha1(email as BinaryLike)
return getSha1(email)
.slice(0, 6)
.toUpperCase();
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/fxa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ async function getAttachedClients(

// TODO: Add unit test when changing this code:
/* c8 ignore next 3 */
function getSha1(email: crypto.BinaryLike) {
function getSha1(email: string) {
return crypto.createHash("sha1").update(email).digest("hex");
}

Expand Down
Loading