Skip to content

Commit 908156c

Browse files
committed
fix: adapted code that uses uuid package to new version
1 parent f575909 commit 908156c

5 files changed

Lines changed: 24 additions & 8 deletions

File tree

app/util/analytics/analyticsId.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jest.mock('uuid', () => {
2121
const mockedStorageWrapper = storageWrapper as jest.Mocked<
2222
typeof storageWrapper
2323
>;
24-
const mockedV4 = v4 as jest.MockedFunction<typeof v4>;
24+
const mockedV4 = v4 as jest.MockedFunction<() => string>;
2525

2626
describe('getAnalyticsId', () => {
2727
beforeEach(() => {

app/util/test/accountsControllerTestUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import {
3636
} from './keyringControllerTestUtils';
3737

3838
export function createMockUuidFromAddress(address: string): AccountId {
39-
const fakeShaFromAddress = Array.from(
39+
const fakeShaFromAddress = Uint8Array.from(
4040
{ length: 16 },
4141
(_, i) => address.charCodeAt(i) || 0,
4242
);

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const config = {
2929
setupFilesAfterEnv: ['<rootDir>/app/util/test/testSetup.js'],
3030
testEnvironment: 'jest-environment-node',
3131
transformIgnorePatterns: [
32-
'node_modules/(?!((@metamask/)?(@react-native|react-native|redux-persist-filesystem|@react-navigation|@react-native-community|@react-native-masked-view|react-navigation|react-navigation-redux-helpers|@sentry|d3-color|d3-shape|d3-path|d3-scale|d3-array|d3-time|d3-format|d3-interpolate|d3-selection|d3-axis|d3-transition|internmap|react-native-wagmi-charts|react-native-nitro-modules|@notifee|expo-file-system|expo-modules-core|expo(nent)?|@expo(nent)?/.*)|@noble/.*|@nktkas/hyperliquid|@metamask/design-system-twrnc-preset|@metamask/design-system-react-native|@metamask/native-utils|@metamask/smart-transactions-controller|@tommasini/react-native-scrollable-tab-view|@veriff/react-native-sdk|@braze/react-native-sdk))',
32+
'node_modules/(?!((@metamask/)?(@react-native|react-native|redux-persist-filesystem|@react-navigation|@react-native-community|@react-native-masked-view|react-navigation|react-navigation-redux-helpers|@sentry|d3-color|d3-shape|d3-path|d3-scale|d3-array|d3-time|d3-format|d3-interpolate|d3-selection|d3-axis|d3-transition|internmap|react-native-wagmi-charts|react-native-nitro-modules|@notifee|expo-file-system|expo-modules-core|expo(nent)?|@expo(nent)?/.*)|@noble/.*|@nktkas/hyperliquid|@metamask/design-system-twrnc-preset|@metamask/design-system-react-native|@metamask/native-utils|@metamask/smart-transactions-controller|@tommasini/react-native-scrollable-tab-view|@veriff/react-native-sdk|@braze/react-native-sdk|uuid))',
3333
],
3434
transform: {
3535
'^.+\\.[jt]sx?$': ['babel-jest', { configFile: './babel.config.tests.js' }],

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@
378378
"@walletconnect/core": "^2.23.0",
379379
"@walletconnect/react-native-compat": "^2.23.0",
380380
"@walletconnect/utils": "^2.23.0",
381-
"@xmldom/xmldom": "^0.8.12",
381+
"@xmldom/xmldom": "^0.8.13",
382382
"asyncstorage-down": "4.2.0",
383383
"axios": "^1.15.0",
384384
"bignumber.js": "^9.0.1",
@@ -523,7 +523,7 @@
523523
"uri-js": "^4.4.1",
524524
"url": "0.11.0",
525525
"url-parse": "1.5.9",
526-
"uuid": "^8.3.2",
526+
"uuid": "^14.0.0",
527527
"valid-url": "1.0.9",
528528
"viem": "^2.28.0",
529529
"vm-browserify": "1.1.2"

yarn.lock

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21031,7 +21031,14 @@ __metadata:
2103121031
languageName: node
2103221032
linkType: hard
2103321033

21034-
"@xmldom/xmldom@npm:^0.8.12, @xmldom/xmldom@npm:^0.8.8, @xmldom/xmldom@npm:^0.x":
21034+
"@xmldom/xmldom@npm:^0.8.13":
21035+
version: 0.8.13
21036+
resolution: "@xmldom/xmldom@npm:0.8.13"
21037+
checksum: 10/f8f3d56fa91d5026885c0c5c00b07eae47647bda0d742ecbf8e51e06bb287ab30222977b20529ee15c364031606225ebca58907a8ecc76a3add6b3f10e6ddfc6
21038+
languageName: node
21039+
linkType: hard
21040+
21041+
"@xmldom/xmldom@npm:^0.8.8, @xmldom/xmldom@npm:^0.x":
2103521042
version: 0.8.12
2103621043
resolution: "@xmldom/xmldom@npm:0.8.12"
2103721044
checksum: 10/0fc20bc72a057a939ed17afc3fb35d6be2eb19e42aa9ba3c78aa8bdf471da0b4b17c2710581ce6a2cd68ce3995c2ee7d689593a70a26df1273c0c9c29dfca257
@@ -36086,7 +36093,7 @@ __metadata:
3608636093
"@walletconnect/utils": "npm:^2.23.0"
3608736094
"@wdio/protocols": "npm:^9.27.0"
3608836095
"@welldone-software/why-did-you-render": "npm:^8.0.1"
36089-
"@xmldom/xmldom": "npm:^0.8.12"
36096+
"@xmldom/xmldom": "npm:^0.8.13"
3609036097
appium: "npm:^2.12.1"
3609136098
appium-adb: "npm:^9.11.4"
3609236099
appium-chromium-driver: "npm:^2.0.2"
@@ -36310,7 +36317,7 @@ __metadata:
3631036317
uri-js: "npm:^4.4.1"
3631136318
url: "npm:0.11.0"
3631236319
url-parse: "npm:1.5.9"
36313-
uuid: "npm:^8.3.2"
36320+
uuid: "npm:^14.0.0"
3631436321
valid-url: "npm:1.0.9"
3631536322
viem: "npm:^2.28.0"
3631636323
vm-browserify: "npm:1.1.2"
@@ -46999,6 +47006,15 @@ __metadata:
4699947006
languageName: node
4700047007
linkType: hard
4700147008

47009+
"uuid@npm:^14.0.0":
47010+
version: 14.0.0
47011+
resolution: "uuid@npm:14.0.0"
47012+
bin:
47013+
uuid: dist-node/bin/uuid
47014+
checksum: 10/8ee9b98f9650e25555515f7a28d3c3ae9364e72f7bb19b9e08b681bc135338beba5509b2830f6ae1cfaba4d45401da0d16d4d109b977097bc3d6ba0c5583341b
47015+
languageName: node
47016+
linkType: hard
47017+
4700247018
"uuid@npm:^3.0.1":
4700347019
version: 3.4.0
4700447020
resolution: "uuid@npm:3.4.0"

0 commit comments

Comments
 (0)