Skip to content

Commit 661f42d

Browse files
committed
fix: removed-unused-fingerprint
1 parent ea17f27 commit 661f42d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/utils/fingerprint.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type ProbabilisticFingerprint = {
1111
screenWidth: number;
1212
screenHeight: number;
1313
scale: number;
14-
locale: Localization.Locale[];
14+
locale: { languageTag: string }[];
1515
timezone: string | null | undefined;
1616
userAgent: string;
1717
timestamp: number;
@@ -35,6 +35,10 @@ export const getProbabilisticFingerprint = async (
3535
shouldUseClipboard: boolean
3636
): Promise<ProbabilisticFingerprint> => {
3737
const { width, height } = Dimensions.get('window');
38+
const locales = Localization.getLocales();
39+
const localeLanguageTags = locales.map((locale) => ({
40+
languageTag: locale.languageTag,
41+
}));
3842

3943
return {
4044
platform: Platform.OS,
@@ -44,7 +48,7 @@ export const getProbabilisticFingerprint = async (
4448
screenWidth: width,
4549
screenHeight: height,
4650
scale: PixelRatio.get(),
47-
locale: Localization.getLocales(),
51+
locale: localeLanguageTags,
4852
timezone: Localization.getCalendars()[0]?.timeZone,
4953
userAgent: await DeviceInfo.getUserAgent(),
5054
timestamp: Date.now(),

0 commit comments

Comments
 (0)