@metamask/profile-sync-controller 8.1.1 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -1
- package/README.md +32 -0
- package/auth/mocks/package.json +2 -2
- package/dist/controllers/authentication/AuthenticationController.cjs +53 -86
- package/dist/controllers/authentication/AuthenticationController.cjs.map +1 -1
- package/dist/controllers/authentication/AuthenticationController.d.cts +11 -23
- package/dist/controllers/authentication/AuthenticationController.d.cts.map +1 -1
- package/dist/controllers/authentication/AuthenticationController.d.mts +11 -23
- package/dist/controllers/authentication/AuthenticationController.d.mts.map +1 -1
- package/dist/controllers/authentication/AuthenticationController.mjs +53 -86
- package/dist/controllers/authentication/AuthenticationController.mjs.map +1 -1
- package/dist/controllers/authentication/index.cjs +1 -1
- package/dist/controllers/authentication/index.cjs.map +1 -1
- package/dist/controllers/authentication/index.d.cts +1 -1
- package/dist/controllers/authentication/index.d.cts.map +1 -1
- package/dist/controllers/authentication/index.d.mts +1 -1
- package/dist/controllers/authentication/index.d.mts.map +1 -1
- package/dist/controllers/authentication/index.mjs +1 -1
- package/dist/controllers/authentication/index.mjs.map +1 -1
- package/dist/controllers/authentication/mocks/index.cjs.map +1 -0
- package/dist/controllers/authentication/mocks/index.d.cts.map +1 -0
- package/dist/controllers/authentication/mocks/index.d.mts.map +1 -0
- package/dist/controllers/authentication/mocks/index.mjs.map +1 -0
- package/dist/controllers/authentication/mocks/mockResponses.cjs +34 -0
- package/dist/controllers/authentication/mocks/mockResponses.cjs.map +1 -0
- package/dist/controllers/authentication/mocks/mockResponses.d.cts +55 -0
- package/dist/controllers/authentication/mocks/mockResponses.d.cts.map +1 -0
- package/dist/controllers/authentication/mocks/mockResponses.d.mts +55 -0
- package/dist/controllers/authentication/mocks/mockResponses.d.mts.map +1 -0
- package/dist/controllers/authentication/mocks/mockResponses.mjs +28 -0
- package/dist/controllers/authentication/mocks/mockResponses.mjs.map +1 -0
- package/dist/controllers/user-storage/UserStorageController.cjs +71 -127
- package/dist/controllers/user-storage/UserStorageController.cjs.map +1 -1
- package/dist/controllers/user-storage/UserStorageController.d.cts +5 -4
- package/dist/controllers/user-storage/UserStorageController.d.cts.map +1 -1
- package/dist/controllers/user-storage/UserStorageController.d.mts +5 -4
- package/dist/controllers/user-storage/UserStorageController.d.mts.map +1 -1
- package/dist/controllers/user-storage/UserStorageController.mjs +71 -127
- package/dist/controllers/user-storage/UserStorageController.mjs.map +1 -1
- package/dist/controllers/user-storage/account-syncing/controller-integration.cjs +2 -2
- package/dist/controllers/user-storage/account-syncing/controller-integration.cjs.map +1 -1
- package/dist/controllers/user-storage/account-syncing/controller-integration.mjs +2 -2
- package/dist/controllers/user-storage/account-syncing/controller-integration.mjs.map +1 -1
- package/dist/controllers/user-storage/account-syncing/sync-utils.cjs +1 -0
- package/dist/controllers/user-storage/account-syncing/sync-utils.cjs.map +1 -1
- package/dist/controllers/user-storage/account-syncing/sync-utils.d.cts.map +1 -1
- package/dist/controllers/user-storage/account-syncing/sync-utils.d.mts.map +1 -1
- package/dist/controllers/user-storage/account-syncing/sync-utils.mjs +1 -0
- package/dist/controllers/user-storage/account-syncing/sync-utils.mjs.map +1 -1
- package/dist/controllers/user-storage/account-syncing/utils.cjs +2 -2
- package/dist/controllers/user-storage/account-syncing/utils.cjs.map +1 -1
- package/dist/controllers/user-storage/account-syncing/utils.mjs +2 -2
- package/dist/controllers/user-storage/account-syncing/utils.mjs.map +1 -1
- package/dist/controllers/user-storage/index.cjs +1 -1
- package/dist/controllers/user-storage/index.cjs.map +1 -1
- package/dist/controllers/user-storage/index.d.cts +1 -1
- package/dist/controllers/user-storage/index.d.cts.map +1 -1
- package/dist/controllers/user-storage/index.d.mts +1 -1
- package/dist/controllers/user-storage/index.d.mts.map +1 -1
- package/dist/controllers/user-storage/index.mjs +1 -1
- package/dist/controllers/user-storage/index.mjs.map +1 -1
- package/dist/controllers/user-storage/mocks/index.cjs.map +1 -0
- package/dist/controllers/user-storage/mocks/index.d.cts.map +1 -0
- package/dist/controllers/user-storage/mocks/index.d.mts.map +1 -0
- package/dist/controllers/user-storage/mocks/index.mjs.map +1 -0
- package/dist/controllers/user-storage/{__fixtures__ → mocks}/mockResponses.cjs +3 -3
- package/dist/controllers/user-storage/mocks/mockResponses.cjs.map +1 -0
- package/dist/controllers/user-storage/{__fixtures__ → mocks}/mockResponses.d.cts +1 -1
- package/dist/controllers/user-storage/mocks/mockResponses.d.cts.map +1 -0
- package/dist/controllers/user-storage/{__fixtures__ → mocks}/mockResponses.d.mts +1 -1
- package/dist/controllers/user-storage/mocks/mockResponses.d.mts.map +1 -0
- package/dist/controllers/user-storage/{__fixtures__ → mocks}/mockResponses.mjs +3 -3
- package/dist/controllers/user-storage/mocks/mockResponses.mjs.map +1 -0
- package/dist/controllers/user-storage/mocks/mockStorage.cjs.map +1 -0
- package/dist/controllers/user-storage/mocks/mockStorage.d.cts.map +1 -0
- package/dist/controllers/user-storage/mocks/mockStorage.d.mts.map +1 -0
- package/dist/controllers/user-storage/mocks/mockStorage.mjs.map +1 -0
- package/dist/controllers/user-storage/network-syncing/controller-integration.cjs +14 -14
- package/dist/controllers/user-storage/network-syncing/controller-integration.cjs.map +1 -1
- package/dist/controllers/user-storage/network-syncing/controller-integration.d.cts +3 -3
- package/dist/controllers/user-storage/network-syncing/controller-integration.d.cts.map +1 -1
- package/dist/controllers/user-storage/network-syncing/controller-integration.d.mts +3 -3
- package/dist/controllers/user-storage/network-syncing/controller-integration.d.mts.map +1 -1
- package/dist/controllers/user-storage/network-syncing/controller-integration.mjs +14 -14
- package/dist/controllers/user-storage/network-syncing/controller-integration.mjs.map +1 -1
- package/dist/controllers/user-storage/network-syncing/services.cjs +27 -23
- package/dist/controllers/user-storage/network-syncing/services.cjs.map +1 -1
- package/dist/controllers/user-storage/network-syncing/services.d.cts +16 -7
- package/dist/controllers/user-storage/network-syncing/services.d.cts.map +1 -1
- package/dist/controllers/user-storage/network-syncing/services.d.mts +16 -7
- package/dist/controllers/user-storage/network-syncing/services.d.mts.map +1 -1
- package/dist/controllers/user-storage/network-syncing/services.mjs +27 -23
- package/dist/controllers/user-storage/network-syncing/services.mjs.map +1 -1
- package/dist/controllers/user-storage/network-syncing/sync-mutations.cjs.map +1 -1
- package/dist/controllers/user-storage/network-syncing/sync-mutations.d.cts +13 -5
- package/dist/controllers/user-storage/network-syncing/sync-mutations.d.cts.map +1 -1
- package/dist/controllers/user-storage/network-syncing/sync-mutations.d.mts +13 -5
- package/dist/controllers/user-storage/network-syncing/sync-mutations.d.mts.map +1 -1
- package/dist/controllers/user-storage/network-syncing/sync-mutations.mjs.map +1 -1
- package/dist/controllers/user-storage/types.cjs +3 -0
- package/dist/controllers/user-storage/types.cjs.map +1 -0
- package/dist/controllers/user-storage/types.d.cts +23 -0
- package/dist/controllers/user-storage/types.d.cts.map +1 -0
- package/dist/controllers/user-storage/types.d.mts +23 -0
- package/dist/controllers/user-storage/types.d.mts.map +1 -0
- package/dist/controllers/user-storage/types.mjs +2 -0
- package/dist/controllers/user-storage/types.mjs.map +1 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs +7 -8
- package/dist/sdk/authentication-jwt-bearer/flow-srp.cjs.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.cts +2 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.cts.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts +2 -0
- package/dist/sdk/authentication-jwt-bearer/flow-srp.d.mts.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs +8 -9
- package/dist/sdk/authentication-jwt-bearer/flow-srp.mjs.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/services.cjs +10 -2
- package/dist/sdk/authentication-jwt-bearer/services.cjs.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/services.d.cts +3 -1
- package/dist/sdk/authentication-jwt-bearer/services.d.cts.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/services.d.mts +3 -1
- package/dist/sdk/authentication-jwt-bearer/services.d.mts.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/services.mjs +10 -2
- package/dist/sdk/authentication-jwt-bearer/services.mjs.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/types.cjs.map +1 -1
- package/dist/sdk/authentication-jwt-bearer/types.mjs.map +1 -1
- package/dist/sdk/authentication.cjs.map +1 -1
- package/dist/sdk/authentication.d.cts +1 -1
- package/dist/sdk/authentication.d.cts.map +1 -1
- package/dist/sdk/authentication.d.mts +1 -1
- package/dist/sdk/authentication.d.mts.map +1 -1
- package/dist/sdk/authentication.mjs.map +1 -1
- package/dist/sdk/mocks/auth.cjs +44 -0
- package/dist/sdk/mocks/auth.cjs.map +1 -0
- package/dist/sdk/{__fixtures__/mock-auth.d.cts → mocks/auth.d.cts} +22 -25
- package/dist/sdk/mocks/auth.d.cts.map +1 -0
- package/dist/sdk/{__fixtures__/mock-auth.d.mts → mocks/auth.d.mts} +22 -25
- package/dist/sdk/mocks/auth.d.mts.map +1 -0
- package/dist/sdk/mocks/auth.mjs +41 -0
- package/dist/sdk/mocks/auth.mjs.map +1 -0
- package/dist/sdk/mocks/userstorage.cjs +43 -0
- package/dist/sdk/mocks/userstorage.cjs.map +1 -0
- package/dist/sdk/mocks/userstorage.d.cts +10 -0
- package/dist/sdk/mocks/userstorage.d.cts.map +1 -0
- package/dist/sdk/mocks/userstorage.d.mts +10 -0
- package/dist/sdk/mocks/userstorage.d.mts.map +1 -0
- package/dist/sdk/mocks/userstorage.mjs +15 -0
- package/dist/sdk/mocks/userstorage.mjs.map +1 -0
- package/dist/sdk/user-storage.cjs +34 -39
- package/dist/sdk/user-storage.cjs.map +1 -1
- package/dist/sdk/user-storage.d.cts +11 -6
- package/dist/sdk/user-storage.d.cts.map +1 -1
- package/dist/sdk/user-storage.d.mts +11 -6
- package/dist/sdk/user-storage.d.mts.map +1 -1
- package/dist/sdk/user-storage.mjs +34 -39
- package/dist/sdk/user-storage.mjs.map +1 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.cjs +12 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.cjs.map +1 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.d.cts +6 -0
- package/dist/sdk/utils/messaging-signing-snap-requests.d.cts.map +1 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.d.mts +6 -0
- package/dist/sdk/utils/messaging-signing-snap-requests.d.mts.map +1 -1
- package/dist/sdk/utils/messaging-signing-snap-requests.mjs +10 -0
- package/dist/sdk/utils/messaging-signing-snap-requests.mjs.map +1 -1
- package/dist/shared/types/services.cjs +3 -0
- package/dist/shared/types/services.cjs.map +1 -0
- package/dist/shared/types/services.d.cts +10 -0
- package/dist/shared/types/services.d.cts.map +1 -0
- package/dist/shared/types/services.d.mts +10 -0
- package/dist/shared/types/services.d.mts.map +1 -0
- package/dist/shared/types/services.mjs +2 -0
- package/dist/shared/types/services.mjs.map +1 -0
- package/package.json +14 -14
- package/user-storage/mocks/package.json +2 -2
- package/dist/controllers/authentication/__fixtures__/index.cjs.map +0 -1
- package/dist/controllers/authentication/__fixtures__/index.d.cts.map +0 -1
- package/dist/controllers/authentication/__fixtures__/index.d.mts.map +0 -1
- package/dist/controllers/authentication/__fixtures__/index.mjs.map +0 -1
- package/dist/controllers/authentication/__fixtures__/mockResponses.cjs +0 -47
- package/dist/controllers/authentication/__fixtures__/mockResponses.cjs.map +0 -1
- package/dist/controllers/authentication/__fixtures__/mockResponses.d.cts +0 -23
- package/dist/controllers/authentication/__fixtures__/mockResponses.d.cts.map +0 -1
- package/dist/controllers/authentication/__fixtures__/mockResponses.d.mts +0 -23
- package/dist/controllers/authentication/__fixtures__/mockResponses.d.mts.map +0 -1
- package/dist/controllers/authentication/__fixtures__/mockResponses.mjs +0 -41
- package/dist/controllers/authentication/__fixtures__/mockResponses.mjs.map +0 -1
- package/dist/controllers/authentication/__fixtures__/mockServices.cjs +0 -37
- package/dist/controllers/authentication/__fixtures__/mockServices.cjs.map +0 -1
- package/dist/controllers/authentication/__fixtures__/mockServices.d.cts +0 -10
- package/dist/controllers/authentication/__fixtures__/mockServices.d.cts.map +0 -1
- package/dist/controllers/authentication/__fixtures__/mockServices.d.mts +0 -10
- package/dist/controllers/authentication/__fixtures__/mockServices.d.mts.map +0 -1
- package/dist/controllers/authentication/__fixtures__/mockServices.mjs +0 -35
- package/dist/controllers/authentication/__fixtures__/mockServices.mjs.map +0 -1
- package/dist/controllers/authentication/services.cjs +0 -132
- package/dist/controllers/authentication/services.cjs.map +0 -1
- package/dist/controllers/authentication/services.d.cts +0 -72
- package/dist/controllers/authentication/services.d.cts.map +0 -1
- package/dist/controllers/authentication/services.d.mts +0 -72
- package/dist/controllers/authentication/services.d.mts.map +0 -1
- package/dist/controllers/authentication/services.mjs +0 -129
- package/dist/controllers/authentication/services.mjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/index.cjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/index.d.cts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/index.d.mts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/index.mjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockMessenger.cjs +0 -167
- package/dist/controllers/user-storage/__fixtures__/mockMessenger.cjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockMessenger.d.cts +0 -105
- package/dist/controllers/user-storage/__fixtures__/mockMessenger.d.cts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockMessenger.d.mts +0 -105
- package/dist/controllers/user-storage/__fixtures__/mockMessenger.d.mts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockMessenger.mjs +0 -162
- package/dist/controllers/user-storage/__fixtures__/mockMessenger.mjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockResponses.cjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockResponses.d.cts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockResponses.d.mts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockResponses.mjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockServices.cjs +0 -82
- package/dist/controllers/user-storage/__fixtures__/mockServices.cjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockServices.d.cts +0 -15
- package/dist/controllers/user-storage/__fixtures__/mockServices.d.cts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockServices.d.mts +0 -15
- package/dist/controllers/user-storage/__fixtures__/mockServices.d.mts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockServices.mjs +0 -76
- package/dist/controllers/user-storage/__fixtures__/mockServices.mjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockStorage.cjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockStorage.d.cts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockStorage.d.mts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/mockStorage.mjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/test-utils.cjs +0 -78
- package/dist/controllers/user-storage/__fixtures__/test-utils.cjs.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/test-utils.d.cts +0 -38
- package/dist/controllers/user-storage/__fixtures__/test-utils.d.cts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/test-utils.d.mts +0 -38
- package/dist/controllers/user-storage/__fixtures__/test-utils.d.mts.map +0 -1
- package/dist/controllers/user-storage/__fixtures__/test-utils.mjs +0 -68
- package/dist/controllers/user-storage/__fixtures__/test-utils.mjs.map +0 -1
- package/dist/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.cjs +0 -178
- package/dist/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.cjs.map +0 -1
- package/dist/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.d.cts +0 -91
- package/dist/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.d.cts.map +0 -1
- package/dist/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.d.mts +0 -91
- package/dist/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.d.mts.map +0 -1
- package/dist/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.mjs +0 -174
- package/dist/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.mjs.map +0 -1
- package/dist/controllers/user-storage/account-syncing/__fixtures__/test-utils.cjs +0 -58
- package/dist/controllers/user-storage/account-syncing/__fixtures__/test-utils.cjs.map +0 -1
- package/dist/controllers/user-storage/account-syncing/__fixtures__/test-utils.d.cts +0 -87
- package/dist/controllers/user-storage/account-syncing/__fixtures__/test-utils.d.cts.map +0 -1
- package/dist/controllers/user-storage/account-syncing/__fixtures__/test-utils.d.mts +0 -87
- package/dist/controllers/user-storage/account-syncing/__fixtures__/test-utils.d.mts.map +0 -1
- package/dist/controllers/user-storage/account-syncing/__fixtures__/test-utils.mjs +0 -52
- package/dist/controllers/user-storage/account-syncing/__fixtures__/test-utils.mjs.map +0 -1
- package/dist/controllers/user-storage/network-syncing/__fixtures__/mockNetwork.cjs +0 -43
- package/dist/controllers/user-storage/network-syncing/__fixtures__/mockNetwork.cjs.map +0 -1
- package/dist/controllers/user-storage/network-syncing/__fixtures__/mockNetwork.d.cts +0 -11
- package/dist/controllers/user-storage/network-syncing/__fixtures__/mockNetwork.d.cts.map +0 -1
- package/dist/controllers/user-storage/network-syncing/__fixtures__/mockNetwork.d.mts +0 -11
- package/dist/controllers/user-storage/network-syncing/__fixtures__/mockNetwork.d.mts.map +0 -1
- package/dist/controllers/user-storage/network-syncing/__fixtures__/mockNetwork.mjs +0 -36
- package/dist/controllers/user-storage/network-syncing/__fixtures__/mockNetwork.mjs.map +0 -1
- package/dist/controllers/user-storage/services.cjs +0 -306
- package/dist/controllers/user-storage/services.cjs.map +0 -1
- package/dist/controllers/user-storage/services.d.cts +0 -85
- package/dist/controllers/user-storage/services.d.cts.map +0 -1
- package/dist/controllers/user-storage/services.d.mts +0 -85
- package/dist/controllers/user-storage/services.d.mts.map +0 -1
- package/dist/controllers/user-storage/services.mjs +0 -276
- package/dist/controllers/user-storage/services.mjs.map +0 -1
- package/dist/sdk/__fixtures__/mock-auth.cjs +0 -124
- package/dist/sdk/__fixtures__/mock-auth.cjs.map +0 -1
- package/dist/sdk/__fixtures__/mock-auth.d.cts.map +0 -1
- package/dist/sdk/__fixtures__/mock-auth.d.mts.map +0 -1
- package/dist/sdk/__fixtures__/mock-auth.mjs +0 -119
- package/dist/sdk/__fixtures__/mock-auth.mjs.map +0 -1
- package/dist/sdk/__fixtures__/mock-userstorage.cjs +0 -111
- package/dist/sdk/__fixtures__/mock-userstorage.cjs.map +0 -1
- package/dist/sdk/__fixtures__/mock-userstorage.d.cts +0 -20
- package/dist/sdk/__fixtures__/mock-userstorage.d.cts.map +0 -1
- package/dist/sdk/__fixtures__/mock-userstorage.d.mts +0 -20
- package/dist/sdk/__fixtures__/mock-userstorage.d.mts.map +0 -1
- package/dist/sdk/__fixtures__/mock-userstorage.mjs +0 -81
- package/dist/sdk/__fixtures__/mock-userstorage.mjs.map +0 -1
- package/dist/sdk/__fixtures__/test-utils.cjs +0 -90
- package/dist/sdk/__fixtures__/test-utils.cjs.map +0 -1
- package/dist/sdk/__fixtures__/test-utils.d.cts +0 -37
- package/dist/sdk/__fixtures__/test-utils.d.cts.map +0 -1
- package/dist/sdk/__fixtures__/test-utils.d.mts +0 -37
- package/dist/sdk/__fixtures__/test-utils.d.mts.map +0 -1
- package/dist/sdk/__fixtures__/test-utils.mjs +0 -84
- package/dist/sdk/__fixtures__/test-utils.mjs.map +0 -1
- /package/dist/controllers/authentication/{__fixtures__ → mocks}/index.cjs +0 -0
- /package/dist/controllers/authentication/{__fixtures__ → mocks}/index.d.cts +0 -0
- /package/dist/controllers/authentication/{__fixtures__ → mocks}/index.d.mts +0 -0
- /package/dist/controllers/authentication/{__fixtures__ → mocks}/index.mjs +0 -0
- /package/dist/controllers/user-storage/{__fixtures__ → mocks}/index.cjs +0 -0
- /package/dist/controllers/user-storage/{__fixtures__ → mocks}/index.d.cts +0 -0
- /package/dist/controllers/user-storage/{__fixtures__ → mocks}/index.d.mts +0 -0
- /package/dist/controllers/user-storage/{__fixtures__ → mocks}/index.mjs +0 -0
- /package/dist/controllers/user-storage/{__fixtures__ → mocks}/mockStorage.cjs +0 -0
- /package/dist/controllers/user-storage/{__fixtures__ → mocks}/mockStorage.d.cts +0 -0
- /package/dist/controllers/user-storage/{__fixtures__ → mocks}/mockStorage.d.mts +0 -0
- /package/dist/controllers/user-storage/{__fixtures__ → mocks}/mockStorage.mjs +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.cts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/__fixtures__/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,aAAa;AAI7B,OAAO,KAAK,EACV,uCAAuC,EACvC,sBAAsB,EACvB,wBAAoB;AAErB;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,sBAAsB,CAAC,CAQjC;AAED;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,OAAO,EAAE,GACd,OAAO,CAAC,uCAAuC,CAAC,CAElD;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,IAAI,CAAC,IAAI,EACtB,UAAU,EAAE,MAAM,gCAenB;AAED,KAAK,cAAc,GAAG;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,gBACL,MAAM,IAAI,YACd,cAAc,KACtB,QAAQ,IAAI,CAmBd,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type nock from "nock";
|
|
2
|
-
import type { GetUserStorageAllFeatureEntriesResponse, GetUserStorageResponse } from "../services.mjs";
|
|
3
|
-
/**
|
|
4
|
-
* Test Utility - creates a realistic mock user-storage entry
|
|
5
|
-
*
|
|
6
|
-
* @param data - data to encrypt
|
|
7
|
-
* @returns user storage entry
|
|
8
|
-
*/
|
|
9
|
-
export declare function createMockUserStorageEntry(data: unknown): Promise<GetUserStorageResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Test Utility - creates a realistic mock user-storage get-all entry
|
|
12
|
-
*
|
|
13
|
-
* @param data - data array to encrypt
|
|
14
|
-
* @returns user storage entry
|
|
15
|
-
*/
|
|
16
|
-
export declare function createMockUserStorageEntries(data: unknown[]): Promise<GetUserStorageAllFeatureEntriesResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Test Utility - decrypts a realistic batch upsert payload
|
|
19
|
-
*
|
|
20
|
-
* @param requestBody - nock body
|
|
21
|
-
* @param storageKey - storage key
|
|
22
|
-
* @returns decrypted body
|
|
23
|
-
*/
|
|
24
|
-
export declare function decryptBatchUpsertBody(requestBody: nock.Body, storageKey: string): Promise<string | string[][]>;
|
|
25
|
-
type WaitForOptions = {
|
|
26
|
-
intervalMs?: number;
|
|
27
|
-
timeoutMs?: number;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Testing Utility - waitFor. Waits for and checks (at an interval) if assertion is reached.
|
|
31
|
-
*
|
|
32
|
-
* @param assertionFn - assertion function
|
|
33
|
-
* @param options - set wait for options
|
|
34
|
-
* @returns promise that you need to await in tests
|
|
35
|
-
*/
|
|
36
|
-
export declare const waitFor: (assertionFn: () => void, options?: WaitForOptions) => Promise<void>;
|
|
37
|
-
export {};
|
|
38
|
-
//# sourceMappingURL=test-utils.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.d.mts","sourceRoot":"","sources":["../../../../src/controllers/user-storage/__fixtures__/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,aAAa;AAI7B,OAAO,KAAK,EACV,uCAAuC,EACvC,sBAAsB,EACvB,wBAAoB;AAErB;;;;;GAKG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,sBAAsB,CAAC,CAQjC;AAED;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,OAAO,EAAE,GACd,OAAO,CAAC,uCAAuC,CAAC,CAElD;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,IAAI,CAAC,IAAI,EACtB,UAAU,EAAE,MAAM,gCAenB;AAED,KAAK,cAAc,GAAG;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,gBACL,MAAM,IAAI,YACd,cAAc,KACtB,QAAQ,IAAI,CAmBd,CAAC"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { MOCK_STORAGE_KEY } from "./mockStorage.mjs";
|
|
2
|
-
import encryption from "../../../shared/encryption/encryption.mjs";
|
|
3
|
-
/**
|
|
4
|
-
* Test Utility - creates a realistic mock user-storage entry
|
|
5
|
-
*
|
|
6
|
-
* @param data - data to encrypt
|
|
7
|
-
* @returns user storage entry
|
|
8
|
-
*/
|
|
9
|
-
export async function createMockUserStorageEntry(data) {
|
|
10
|
-
return {
|
|
11
|
-
HashedKey: 'HASHED_KEY',
|
|
12
|
-
Data: await encryption.encryptString(JSON.stringify(data), MOCK_STORAGE_KEY),
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Test Utility - creates a realistic mock user-storage get-all entry
|
|
17
|
-
*
|
|
18
|
-
* @param data - data array to encrypt
|
|
19
|
-
* @returns user storage entry
|
|
20
|
-
*/
|
|
21
|
-
export async function createMockUserStorageEntries(data) {
|
|
22
|
-
return await Promise.all(data.map((d) => createMockUserStorageEntry(d)));
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Test Utility - decrypts a realistic batch upsert payload
|
|
26
|
-
*
|
|
27
|
-
* @param requestBody - nock body
|
|
28
|
-
* @param storageKey - storage key
|
|
29
|
-
* @returns decrypted body
|
|
30
|
-
*/
|
|
31
|
-
export async function decryptBatchUpsertBody(requestBody, storageKey) {
|
|
32
|
-
if (typeof requestBody === 'string') {
|
|
33
|
-
return requestBody;
|
|
34
|
-
}
|
|
35
|
-
return await Promise.all(Object.entries(requestBody.data).map(async ([entryKey, entryValue]) => {
|
|
36
|
-
return [
|
|
37
|
-
entryKey,
|
|
38
|
-
await encryption.decryptString(entryValue, storageKey),
|
|
39
|
-
];
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Testing Utility - waitFor. Waits for and checks (at an interval) if assertion is reached.
|
|
44
|
-
*
|
|
45
|
-
* @param assertionFn - assertion function
|
|
46
|
-
* @param options - set wait for options
|
|
47
|
-
* @returns promise that you need to await in tests
|
|
48
|
-
*/
|
|
49
|
-
export const waitFor = async (assertionFn, options = {}) => {
|
|
50
|
-
const { intervalMs = 50, timeoutMs = 2000 } = options;
|
|
51
|
-
const startTime = Date.now();
|
|
52
|
-
return new Promise((resolve, reject) => {
|
|
53
|
-
const intervalId = setInterval(() => {
|
|
54
|
-
try {
|
|
55
|
-
assertionFn();
|
|
56
|
-
clearInterval(intervalId);
|
|
57
|
-
resolve();
|
|
58
|
-
}
|
|
59
|
-
catch {
|
|
60
|
-
if (Date.now() - startTime >= timeoutMs) {
|
|
61
|
-
clearInterval(intervalId);
|
|
62
|
-
reject(new Error(`waitFor: timeout reached after ${timeoutMs}ms`));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}, intervalMs);
|
|
66
|
-
});
|
|
67
|
-
};
|
|
68
|
-
//# sourceMappingURL=test-utils.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-utils.mjs","sourceRoot":"","sources":["../../../../src/controllers/user-storage/__fixtures__/test-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,0BAAsB;AACjD,OAAO,UAAU,kDAA8C;AAM/D;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,IAAa;IAEb,OAAO;QACL,SAAS,EAAE,YAAY;QACvB,IAAI,EAAE,MAAM,UAAU,CAAC,aAAa,CAClC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EACpB,gBAAgB,CACjB;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,IAAe;IAEf,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,WAAsB,EACtB,UAAkB;IAElB,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE;QACnC,OAAO,WAAW,CAAC;KACpB;IACD,OAAO,MAAM,OAAO,CAAC,GAAG,CACtB,MAAM,CAAC,OAAO,CAAS,WAAW,CAAC,IAAI,CAAC,CAAC,GAAG,CAC1C,KAAK,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE;QAC/B,OAAO;YACL,QAAQ;YACR,MAAM,UAAU,CAAC,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC;SACvD,CAAC;IACJ,CAAC,CACF,CACF,CAAC;AACJ,CAAC;AAOD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAC1B,WAAuB,EACvB,UAA0B,EAAE,EACb,EAAE;IACjB,MAAM,EAAE,UAAU,GAAG,EAAE,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAEtD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC3C,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE;YAClC,IAAI;gBACF,WAAW,EAAE,CAAC;gBACd,aAAa,CAAC,UAAU,CAAC,CAAC;gBAC1B,OAAO,EAAE,CAAC;aACX;YAAC,MAAM;gBACN,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,IAAI,SAAS,EAAE;oBACvC,aAAa,CAAC,UAAU,CAAC,CAAC;oBAC1B,MAAM,CAAC,IAAI,KAAK,CAAC,kCAAkC,SAAS,IAAI,CAAC,CAAC,CAAC;iBACpE;aACF;QACH,CAAC,EAAE,UAAU,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["import type nock from 'nock';\n\nimport { MOCK_STORAGE_KEY } from './mockStorage';\nimport encryption from '../../../shared/encryption/encryption';\nimport type {\n GetUserStorageAllFeatureEntriesResponse,\n GetUserStorageResponse,\n} from '../services';\n\n/**\n * Test Utility - creates a realistic mock user-storage entry\n *\n * @param data - data to encrypt\n * @returns user storage entry\n */\nexport async function createMockUserStorageEntry(\n data: unknown,\n): Promise<GetUserStorageResponse> {\n return {\n HashedKey: 'HASHED_KEY',\n Data: await encryption.encryptString(\n JSON.stringify(data),\n MOCK_STORAGE_KEY,\n ),\n };\n}\n\n/**\n * Test Utility - creates a realistic mock user-storage get-all entry\n *\n * @param data - data array to encrypt\n * @returns user storage entry\n */\nexport async function createMockUserStorageEntries(\n data: unknown[],\n): Promise<GetUserStorageAllFeatureEntriesResponse> {\n return await Promise.all(data.map((d) => createMockUserStorageEntry(d)));\n}\n\n/**\n * Test Utility - decrypts a realistic batch upsert payload\n *\n * @param requestBody - nock body\n * @param storageKey - storage key\n * @returns decrypted body\n */\nexport async function decryptBatchUpsertBody(\n requestBody: nock.Body,\n storageKey: string,\n) {\n if (typeof requestBody === 'string') {\n return requestBody;\n }\n return await Promise.all(\n Object.entries<string>(requestBody.data).map(\n async ([entryKey, entryValue]) => {\n return [\n entryKey,\n await encryption.decryptString(entryValue, storageKey),\n ];\n },\n ),\n );\n}\n\ntype WaitForOptions = {\n intervalMs?: number;\n timeoutMs?: number;\n};\n\n/**\n * Testing Utility - waitFor. Waits for and checks (at an interval) if assertion is reached.\n *\n * @param assertionFn - assertion function\n * @param options - set wait for options\n * @returns promise that you need to await in tests\n */\nexport const waitFor = async (\n assertionFn: () => void,\n options: WaitForOptions = {},\n): Promise<void> => {\n const { intervalMs = 50, timeoutMs = 2000 } = options;\n\n const startTime = Date.now();\n\n return new Promise<void>((resolve, reject) => {\n const intervalId = setInterval(() => {\n try {\n assertionFn();\n clearInterval(intervalId);\n resolve();\n } catch {\n if (Date.now() - startTime >= timeoutMs) {\n clearInterval(intervalId);\n reject(new Error(`waitFor: timeout reached after ${timeoutMs}ms`));\n }\n }\n }, intervalMs);\n });\n};\n"]}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MOCK_USER_STORAGE_ACCOUNTS = exports.MOCK_INTERNAL_ACCOUNTS = exports.getMockRandomDefaultAccountName = void 0;
|
|
4
|
-
const keyring_api_1 = require("@metamask/keyring-api");
|
|
5
|
-
const keyring_controller_1 = require("@metamask/keyring-controller");
|
|
6
|
-
const constants_1 = require("../constants.cjs");
|
|
7
|
-
const utils_1 = require("../utils.cjs");
|
|
8
|
-
/**
|
|
9
|
-
* Map an array of internal accounts to an array of user storage accounts
|
|
10
|
-
* Only used for testing purposes
|
|
11
|
-
*
|
|
12
|
-
* @param internalAccounts - An array of internal accounts
|
|
13
|
-
* @returns An array of user storage accounts
|
|
14
|
-
*/
|
|
15
|
-
const mapInternalAccountsListToUserStorageAccountsList = (internalAccounts) => internalAccounts.map(utils_1.mapInternalAccountToUserStorageAccount);
|
|
16
|
-
/**
|
|
17
|
-
* Get a random default account name from the list of localized default account names
|
|
18
|
-
*
|
|
19
|
-
* @returns A random default account name
|
|
20
|
-
*/
|
|
21
|
-
const getMockRandomDefaultAccountName = () => constants_1.LOCALIZED_DEFAULT_ACCOUNT_NAMES[Math.floor(Math.random() * constants_1.LOCALIZED_DEFAULT_ACCOUNT_NAMES.length)];
|
|
22
|
-
exports.getMockRandomDefaultAccountName = getMockRandomDefaultAccountName;
|
|
23
|
-
exports.MOCK_INTERNAL_ACCOUNTS = {
|
|
24
|
-
EMPTY: [],
|
|
25
|
-
ONE: [
|
|
26
|
-
{
|
|
27
|
-
address: '0x123',
|
|
28
|
-
id: '1',
|
|
29
|
-
type: keyring_api_1.EthAccountType.Eoa,
|
|
30
|
-
metadata: {
|
|
31
|
-
name: 'test',
|
|
32
|
-
nameLastUpdatedAt: 1,
|
|
33
|
-
keyring: {
|
|
34
|
-
type: keyring_controller_1.KeyringTypes.hd,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
ONE_DEFAULT_NAME: [
|
|
40
|
-
{
|
|
41
|
-
address: '0x123',
|
|
42
|
-
id: '1',
|
|
43
|
-
type: keyring_api_1.EthAccountType.Eoa,
|
|
44
|
-
metadata: {
|
|
45
|
-
name: `${(0, exports.getMockRandomDefaultAccountName)()} 1`,
|
|
46
|
-
nameLastUpdatedAt: 1,
|
|
47
|
-
keyring: {
|
|
48
|
-
type: keyring_controller_1.KeyringTypes.hd,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED: [
|
|
54
|
-
{
|
|
55
|
-
address: '0x123',
|
|
56
|
-
id: '1',
|
|
57
|
-
type: keyring_api_1.EthAccountType.Eoa,
|
|
58
|
-
metadata: {
|
|
59
|
-
name: 'Internal account custom name without nameLastUpdatedAt',
|
|
60
|
-
keyring: {
|
|
61
|
-
type: keyring_controller_1.KeyringTypes.hd,
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
ONE_CUSTOM_NAME_WITH_LAST_UPDATED: [
|
|
67
|
-
{
|
|
68
|
-
address: '0x123',
|
|
69
|
-
id: '1',
|
|
70
|
-
type: keyring_api_1.EthAccountType.Eoa,
|
|
71
|
-
metadata: {
|
|
72
|
-
name: 'Internal account custom name with nameLastUpdatedAt',
|
|
73
|
-
nameLastUpdatedAt: 1,
|
|
74
|
-
keyring: {
|
|
75
|
-
type: keyring_controller_1.KeyringTypes.hd,
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
ONE_CUSTOM_NAME_WITH_LAST_UPDATED_MOST_RECENT: [
|
|
81
|
-
{
|
|
82
|
-
address: '0x123',
|
|
83
|
-
id: '1',
|
|
84
|
-
type: keyring_api_1.EthAccountType.Eoa,
|
|
85
|
-
metadata: {
|
|
86
|
-
name: 'Internal account custom name with nameLastUpdatedAt',
|
|
87
|
-
nameLastUpdatedAt: 9999,
|
|
88
|
-
keyring: {
|
|
89
|
-
type: keyring_controller_1.KeyringTypes.hd,
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
ALL: [
|
|
95
|
-
{
|
|
96
|
-
address: '0x123',
|
|
97
|
-
id: '1',
|
|
98
|
-
type: keyring_api_1.EthAccountType.Eoa,
|
|
99
|
-
metadata: {
|
|
100
|
-
name: 'test',
|
|
101
|
-
nameLastUpdatedAt: 1,
|
|
102
|
-
keyring: {
|
|
103
|
-
type: keyring_controller_1.KeyringTypes.hd,
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
address: '0x456',
|
|
109
|
-
id: '2',
|
|
110
|
-
type: keyring_api_1.EthAccountType.Eoa,
|
|
111
|
-
metadata: {
|
|
112
|
-
name: 'Account 2',
|
|
113
|
-
nameLastUpdatedAt: 2,
|
|
114
|
-
keyring: {
|
|
115
|
-
type: keyring_controller_1.KeyringTypes.hd,
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
address: '0x789',
|
|
121
|
-
id: '3',
|
|
122
|
-
type: keyring_api_1.EthAccountType.Eoa,
|
|
123
|
-
metadata: {
|
|
124
|
-
name: 'Účet 2',
|
|
125
|
-
nameLastUpdatedAt: 3,
|
|
126
|
-
keyring: {
|
|
127
|
-
type: keyring_controller_1.KeyringTypes.hd,
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
address: '0xabc',
|
|
133
|
-
id: '4',
|
|
134
|
-
type: keyring_api_1.EthAccountType.Eoa,
|
|
135
|
-
metadata: {
|
|
136
|
-
name: 'My Account 4',
|
|
137
|
-
nameLastUpdatedAt: 4,
|
|
138
|
-
keyring: {
|
|
139
|
-
type: keyring_controller_1.KeyringTypes.hd,
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
],
|
|
144
|
-
};
|
|
145
|
-
exports.MOCK_USER_STORAGE_ACCOUNTS = {
|
|
146
|
-
SAME_AS_INTERNAL_ALL: mapInternalAccountsListToUserStorageAccountsList(exports.MOCK_INTERNAL_ACCOUNTS.ALL),
|
|
147
|
-
ONE: mapInternalAccountsListToUserStorageAccountsList(exports.MOCK_INTERNAL_ACCOUNTS.ONE),
|
|
148
|
-
TWO_DEFAULT_NAMES_WITH_ONE_BOGUS: mapInternalAccountsListToUserStorageAccountsList([
|
|
149
|
-
...exports.MOCK_INTERNAL_ACCOUNTS.ONE_DEFAULT_NAME,
|
|
150
|
-
{
|
|
151
|
-
...exports.MOCK_INTERNAL_ACCOUNTS.ONE_DEFAULT_NAME[0],
|
|
152
|
-
address: '0x000000',
|
|
153
|
-
metadata: {
|
|
154
|
-
name: `${(0, exports.getMockRandomDefaultAccountName)()} 1`,
|
|
155
|
-
nameLastUpdatedAt: 2,
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
]),
|
|
159
|
-
ONE_DEFAULT_NAME: mapInternalAccountsListToUserStorageAccountsList(exports.MOCK_INTERNAL_ACCOUNTS.ONE_DEFAULT_NAME),
|
|
160
|
-
ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED: mapInternalAccountsListToUserStorageAccountsList([
|
|
161
|
-
{
|
|
162
|
-
...exports.MOCK_INTERNAL_ACCOUNTS.ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED[0],
|
|
163
|
-
metadata: {
|
|
164
|
-
name: 'User storage account custom name without nameLastUpdatedAt',
|
|
165
|
-
},
|
|
166
|
-
},
|
|
167
|
-
]),
|
|
168
|
-
ONE_CUSTOM_NAME_WITH_LAST_UPDATED: mapInternalAccountsListToUserStorageAccountsList([
|
|
169
|
-
{
|
|
170
|
-
...exports.MOCK_INTERNAL_ACCOUNTS.ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED[0],
|
|
171
|
-
metadata: {
|
|
172
|
-
name: 'User storage account custom name with nameLastUpdatedAt',
|
|
173
|
-
nameLastUpdatedAt: 3,
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
]),
|
|
177
|
-
};
|
|
178
|
-
//# sourceMappingURL=mockAccounts.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mockAccounts.cjs","sourceRoot":"","sources":["../../../../../src/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.ts"],"names":[],"mappings":"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","sourcesContent":["import { EthAccountType } from '@metamask/keyring-api';\nimport { KeyringTypes } from '@metamask/keyring-controller';\nimport type { InternalAccount } from '@metamask/keyring-internal-api';\n\nimport { LOCALIZED_DEFAULT_ACCOUNT_NAMES } from '../constants';\nimport { mapInternalAccountToUserStorageAccount } from '../utils';\n\n/**\n * Map an array of internal accounts to an array of user storage accounts\n * Only used for testing purposes\n *\n * @param internalAccounts - An array of internal accounts\n * @returns An array of user storage accounts\n */\nconst mapInternalAccountsListToUserStorageAccountsList = (\n internalAccounts: InternalAccount[],\n) => internalAccounts.map(mapInternalAccountToUserStorageAccount);\n\n/**\n * Get a random default account name from the list of localized default account names\n *\n * @returns A random default account name\n */\nexport const getMockRandomDefaultAccountName = () =>\n LOCALIZED_DEFAULT_ACCOUNT_NAMES[\n Math.floor(Math.random() * LOCALIZED_DEFAULT_ACCOUNT_NAMES.length)\n ];\n\nexport const MOCK_INTERNAL_ACCOUNTS = {\n EMPTY: [],\n ONE: [\n {\n address: '0x123',\n id: '1',\n type: EthAccountType.Eoa,\n metadata: {\n name: 'test',\n nameLastUpdatedAt: 1,\n keyring: {\n type: KeyringTypes.hd,\n },\n },\n },\n ],\n ONE_DEFAULT_NAME: [\n {\n address: '0x123',\n id: '1',\n type: EthAccountType.Eoa,\n metadata: {\n name: `${getMockRandomDefaultAccountName()} 1`,\n nameLastUpdatedAt: 1,\n keyring: {\n type: KeyringTypes.hd,\n },\n },\n },\n ],\n ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED: [\n {\n address: '0x123',\n id: '1',\n type: EthAccountType.Eoa,\n metadata: {\n name: 'Internal account custom name without nameLastUpdatedAt',\n keyring: {\n type: KeyringTypes.hd,\n },\n },\n },\n ],\n ONE_CUSTOM_NAME_WITH_LAST_UPDATED: [\n {\n address: '0x123',\n id: '1',\n type: EthAccountType.Eoa,\n metadata: {\n name: 'Internal account custom name with nameLastUpdatedAt',\n nameLastUpdatedAt: 1,\n keyring: {\n type: KeyringTypes.hd,\n },\n },\n },\n ],\n ONE_CUSTOM_NAME_WITH_LAST_UPDATED_MOST_RECENT: [\n {\n address: '0x123',\n id: '1',\n type: EthAccountType.Eoa,\n metadata: {\n name: 'Internal account custom name with nameLastUpdatedAt',\n nameLastUpdatedAt: 9999,\n keyring: {\n type: KeyringTypes.hd,\n },\n },\n },\n ],\n ALL: [\n {\n address: '0x123',\n id: '1',\n type: EthAccountType.Eoa,\n metadata: {\n name: 'test',\n nameLastUpdatedAt: 1,\n keyring: {\n type: KeyringTypes.hd,\n },\n },\n },\n {\n address: '0x456',\n id: '2',\n type: EthAccountType.Eoa,\n metadata: {\n name: 'Account 2',\n nameLastUpdatedAt: 2,\n keyring: {\n type: KeyringTypes.hd,\n },\n },\n },\n {\n address: '0x789',\n id: '3',\n type: EthAccountType.Eoa,\n metadata: {\n name: 'Účet 2',\n nameLastUpdatedAt: 3,\n keyring: {\n type: KeyringTypes.hd,\n },\n },\n },\n {\n address: '0xabc',\n id: '4',\n type: EthAccountType.Eoa,\n metadata: {\n name: 'My Account 4',\n nameLastUpdatedAt: 4,\n keyring: {\n type: KeyringTypes.hd,\n },\n },\n },\n ],\n};\n\nexport const MOCK_USER_STORAGE_ACCOUNTS = {\n SAME_AS_INTERNAL_ALL: mapInternalAccountsListToUserStorageAccountsList(\n MOCK_INTERNAL_ACCOUNTS.ALL as InternalAccount[],\n ),\n ONE: mapInternalAccountsListToUserStorageAccountsList(\n MOCK_INTERNAL_ACCOUNTS.ONE as InternalAccount[],\n ),\n TWO_DEFAULT_NAMES_WITH_ONE_BOGUS:\n mapInternalAccountsListToUserStorageAccountsList([\n ...MOCK_INTERNAL_ACCOUNTS.ONE_DEFAULT_NAME,\n {\n ...MOCK_INTERNAL_ACCOUNTS.ONE_DEFAULT_NAME[0],\n address: '0x000000',\n metadata: {\n name: `${getMockRandomDefaultAccountName()} 1`,\n nameLastUpdatedAt: 2,\n },\n },\n ] as InternalAccount[]),\n ONE_DEFAULT_NAME: mapInternalAccountsListToUserStorageAccountsList(\n MOCK_INTERNAL_ACCOUNTS.ONE_DEFAULT_NAME as InternalAccount[],\n ),\n ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED:\n mapInternalAccountsListToUserStorageAccountsList([\n {\n ...MOCK_INTERNAL_ACCOUNTS.ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED[0],\n metadata: {\n name: 'User storage account custom name without nameLastUpdatedAt',\n },\n },\n ] as InternalAccount[]),\n ONE_CUSTOM_NAME_WITH_LAST_UPDATED:\n mapInternalAccountsListToUserStorageAccountsList([\n {\n ...MOCK_INTERNAL_ACCOUNTS.ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED[0],\n metadata: {\n name: 'User storage account custom name with nameLastUpdatedAt',\n nameLastUpdatedAt: 3,\n },\n },\n ] as InternalAccount[]),\n};\n"]}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { EthAccountType } from "@metamask/keyring-api";
|
|
2
|
-
import { KeyringTypes } from "@metamask/keyring-controller";
|
|
3
|
-
/**
|
|
4
|
-
* Get a random default account name from the list of localized default account names
|
|
5
|
-
*
|
|
6
|
-
* @returns A random default account name
|
|
7
|
-
*/
|
|
8
|
-
export declare const getMockRandomDefaultAccountName: () => "Account" | "መለያ" | "الحساب" | "Профил" | "অ্যাকাউন্ট" | "Compte" | "Účet" | "Konto" | "Λογαριασμός" | "Cuenta" | "حساب" | "Tili" | "એકાઉન્ટ" | "חשבון" | "अकाउंट" | "खाता" | "Račun" | "Kont" | "Fiók" | "Akun" | "アカウント" | "ಖಾತೆ" | "계정" | "Paskyra" | "Konts" | "അക്കൗണ്ട്" | "खाते" | "Akaun" | "Conta" | "Cont" | "Счет" | "налог" | "Akaunti" | "கணக்கு" | "ఖాతా" | "บัญชี" | "Hesap" | "Обліковий запис" | "Tài khoản" | "账户" | "帳戶";
|
|
9
|
-
export declare const MOCK_INTERNAL_ACCOUNTS: {
|
|
10
|
-
EMPTY: never[];
|
|
11
|
-
ONE: {
|
|
12
|
-
address: string;
|
|
13
|
-
id: string;
|
|
14
|
-
type: EthAccountType;
|
|
15
|
-
metadata: {
|
|
16
|
-
name: string;
|
|
17
|
-
nameLastUpdatedAt: number;
|
|
18
|
-
keyring: {
|
|
19
|
-
type: KeyringTypes;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}[];
|
|
23
|
-
ONE_DEFAULT_NAME: {
|
|
24
|
-
address: string;
|
|
25
|
-
id: string;
|
|
26
|
-
type: EthAccountType;
|
|
27
|
-
metadata: {
|
|
28
|
-
name: string;
|
|
29
|
-
nameLastUpdatedAt: number;
|
|
30
|
-
keyring: {
|
|
31
|
-
type: KeyringTypes;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
}[];
|
|
35
|
-
ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED: {
|
|
36
|
-
address: string;
|
|
37
|
-
id: string;
|
|
38
|
-
type: EthAccountType;
|
|
39
|
-
metadata: {
|
|
40
|
-
name: string;
|
|
41
|
-
keyring: {
|
|
42
|
-
type: KeyringTypes;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
}[];
|
|
46
|
-
ONE_CUSTOM_NAME_WITH_LAST_UPDATED: {
|
|
47
|
-
address: string;
|
|
48
|
-
id: string;
|
|
49
|
-
type: EthAccountType;
|
|
50
|
-
metadata: {
|
|
51
|
-
name: string;
|
|
52
|
-
nameLastUpdatedAt: number;
|
|
53
|
-
keyring: {
|
|
54
|
-
type: KeyringTypes;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
}[];
|
|
58
|
-
ONE_CUSTOM_NAME_WITH_LAST_UPDATED_MOST_RECENT: {
|
|
59
|
-
address: string;
|
|
60
|
-
id: string;
|
|
61
|
-
type: EthAccountType;
|
|
62
|
-
metadata: {
|
|
63
|
-
name: string;
|
|
64
|
-
nameLastUpdatedAt: number;
|
|
65
|
-
keyring: {
|
|
66
|
-
type: KeyringTypes;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
}[];
|
|
70
|
-
ALL: {
|
|
71
|
-
address: string;
|
|
72
|
-
id: string;
|
|
73
|
-
type: EthAccountType;
|
|
74
|
-
metadata: {
|
|
75
|
-
name: string;
|
|
76
|
-
nameLastUpdatedAt: number;
|
|
77
|
-
keyring: {
|
|
78
|
-
type: KeyringTypes;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
}[];
|
|
82
|
-
};
|
|
83
|
-
export declare const MOCK_USER_STORAGE_ACCOUNTS: {
|
|
84
|
-
SAME_AS_INTERNAL_ALL: import("../types.cjs").UserStorageAccount[];
|
|
85
|
-
ONE: import("../types.cjs").UserStorageAccount[];
|
|
86
|
-
TWO_DEFAULT_NAMES_WITH_ONE_BOGUS: import("../types.cjs").UserStorageAccount[];
|
|
87
|
-
ONE_DEFAULT_NAME: import("../types.cjs").UserStorageAccount[];
|
|
88
|
-
ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED: import("../types.cjs").UserStorageAccount[];
|
|
89
|
-
ONE_CUSTOM_NAME_WITH_LAST_UPDATED: import("../types.cjs").UserStorageAccount[];
|
|
90
|
-
};
|
|
91
|
-
//# sourceMappingURL=mockAccounts.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mockAccounts.d.cts","sourceRoot":"","sources":["../../../../../src/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,8BAA8B;AACvD,OAAO,EAAE,YAAY,EAAE,qCAAqC;AAiB5D;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,mbAGzC,CAAC;AAEJ,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyHlC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;CAyCtC,CAAC"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { EthAccountType } from "@metamask/keyring-api";
|
|
2
|
-
import { KeyringTypes } from "@metamask/keyring-controller";
|
|
3
|
-
/**
|
|
4
|
-
* Get a random default account name from the list of localized default account names
|
|
5
|
-
*
|
|
6
|
-
* @returns A random default account name
|
|
7
|
-
*/
|
|
8
|
-
export declare const getMockRandomDefaultAccountName: () => "Account" | "መለያ" | "الحساب" | "Профил" | "অ্যাকাউন্ট" | "Compte" | "Účet" | "Konto" | "Λογαριασμός" | "Cuenta" | "حساب" | "Tili" | "એકાઉન્ટ" | "חשבון" | "अकाउंट" | "खाता" | "Račun" | "Kont" | "Fiók" | "Akun" | "アカウント" | "ಖಾತೆ" | "계정" | "Paskyra" | "Konts" | "അക്കൗണ്ട്" | "खाते" | "Akaun" | "Conta" | "Cont" | "Счет" | "налог" | "Akaunti" | "கணக்கு" | "ఖాతా" | "บัญชี" | "Hesap" | "Обліковий запис" | "Tài khoản" | "账户" | "帳戶";
|
|
9
|
-
export declare const MOCK_INTERNAL_ACCOUNTS: {
|
|
10
|
-
EMPTY: never[];
|
|
11
|
-
ONE: {
|
|
12
|
-
address: string;
|
|
13
|
-
id: string;
|
|
14
|
-
type: EthAccountType;
|
|
15
|
-
metadata: {
|
|
16
|
-
name: string;
|
|
17
|
-
nameLastUpdatedAt: number;
|
|
18
|
-
keyring: {
|
|
19
|
-
type: KeyringTypes;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}[];
|
|
23
|
-
ONE_DEFAULT_NAME: {
|
|
24
|
-
address: string;
|
|
25
|
-
id: string;
|
|
26
|
-
type: EthAccountType;
|
|
27
|
-
metadata: {
|
|
28
|
-
name: string;
|
|
29
|
-
nameLastUpdatedAt: number;
|
|
30
|
-
keyring: {
|
|
31
|
-
type: KeyringTypes;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
}[];
|
|
35
|
-
ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED: {
|
|
36
|
-
address: string;
|
|
37
|
-
id: string;
|
|
38
|
-
type: EthAccountType;
|
|
39
|
-
metadata: {
|
|
40
|
-
name: string;
|
|
41
|
-
keyring: {
|
|
42
|
-
type: KeyringTypes;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
}[];
|
|
46
|
-
ONE_CUSTOM_NAME_WITH_LAST_UPDATED: {
|
|
47
|
-
address: string;
|
|
48
|
-
id: string;
|
|
49
|
-
type: EthAccountType;
|
|
50
|
-
metadata: {
|
|
51
|
-
name: string;
|
|
52
|
-
nameLastUpdatedAt: number;
|
|
53
|
-
keyring: {
|
|
54
|
-
type: KeyringTypes;
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
}[];
|
|
58
|
-
ONE_CUSTOM_NAME_WITH_LAST_UPDATED_MOST_RECENT: {
|
|
59
|
-
address: string;
|
|
60
|
-
id: string;
|
|
61
|
-
type: EthAccountType;
|
|
62
|
-
metadata: {
|
|
63
|
-
name: string;
|
|
64
|
-
nameLastUpdatedAt: number;
|
|
65
|
-
keyring: {
|
|
66
|
-
type: KeyringTypes;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
}[];
|
|
70
|
-
ALL: {
|
|
71
|
-
address: string;
|
|
72
|
-
id: string;
|
|
73
|
-
type: EthAccountType;
|
|
74
|
-
metadata: {
|
|
75
|
-
name: string;
|
|
76
|
-
nameLastUpdatedAt: number;
|
|
77
|
-
keyring: {
|
|
78
|
-
type: KeyringTypes;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
}[];
|
|
82
|
-
};
|
|
83
|
-
export declare const MOCK_USER_STORAGE_ACCOUNTS: {
|
|
84
|
-
SAME_AS_INTERNAL_ALL: import("../types.mjs").UserStorageAccount[];
|
|
85
|
-
ONE: import("../types.mjs").UserStorageAccount[];
|
|
86
|
-
TWO_DEFAULT_NAMES_WITH_ONE_BOGUS: import("../types.mjs").UserStorageAccount[];
|
|
87
|
-
ONE_DEFAULT_NAME: import("../types.mjs").UserStorageAccount[];
|
|
88
|
-
ONE_CUSTOM_NAME_WITHOUT_LAST_UPDATED: import("../types.mjs").UserStorageAccount[];
|
|
89
|
-
ONE_CUSTOM_NAME_WITH_LAST_UPDATED: import("../types.mjs").UserStorageAccount[];
|
|
90
|
-
};
|
|
91
|
-
//# sourceMappingURL=mockAccounts.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mockAccounts.d.mts","sourceRoot":"","sources":["../../../../../src/controllers/user-storage/account-syncing/__fixtures__/mockAccounts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,8BAA8B;AACvD,OAAO,EAAE,YAAY,EAAE,qCAAqC;AAiB5D;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,mbAGzC,CAAC;AAEJ,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyHlC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;CAyCtC,CAAC"}
|