Skip to content
Merged
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
3 changes: 1 addition & 2 deletions packages/kyc-controller/src/KycController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,6 @@ describe('KycController', () => {
},
},
async ({ controller, handlers }) => {
// @ts-expect-error T&C2 flags are required
await controller.acceptTermsAndStartSession();

expect(controller.state.phase).toBe('error');
Expand Down Expand Up @@ -4950,7 +4949,7 @@ function withController<ReturnValue>(
parent: rootMessenger,
});
rootMessenger.delegate({
actions: SERVICE_ACTIONS,
actions: [...SERVICE_ACTIONS],
events: [],
messenger,
});
Expand Down
7 changes: 3 additions & 4 deletions packages/kyc-controller/src/KycService.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Messenger, MOCK_ANY_NAMESPACE } from '@metamask/messenger';
import type {
MockAnyNamespace,
MessengerActions,
MessengerEvents,
MockAnyNamespace,
} from '@metamask/messenger';
import nock, { cleanAll } from 'nock';

Expand Down Expand Up @@ -53,8 +53,7 @@ describe('KycService', () => {
expect(
() =>
new KycService({
messenger:
messenger as unknown as MockAnyNamespace<KycServiceMessenger>,
messenger,
baseUrl: MOCK_API_URL,
}),
).toThrow(
Expand Down Expand Up @@ -558,7 +557,7 @@ describe('KycService', () => {
});

it('falls back to status-only HttpError when the body is not an object', async () => {
nock(MOCK_API_URL).get('/sessions/sid/status').reply(409, null);
nock(MOCK_API_URL).get('/sessions/sid/status').reply(409, 'null');
const { service } = getService();

await expect(
Expand Down
3 changes: 2 additions & 1 deletion packages/kyc-controller/src/ukyc/testToken.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
UKYC_KWIL_AUDIENCE,
} from './constants.js';
import { canonicalizeJson } from './storageAccessToken.js';
import type { UkycStorageAccessTokenPayload } from './storageAccessToken.js';
import { mintUkycTestToken } from './testToken.js';

// A fixed 32-byte secret (all 0x42), as hex, so storage_id and keys are stable.
Expand All @@ -23,7 +24,7 @@ const EXPIRES_AT = new Date('2026-07-07T04:00:00Z');
* @returns The decoded token envelope.
*/
function decodeHeader(header: string): {
payload: Record<string, unknown>;
payload: UkycStorageAccessTokenPayload;
signature: string;
} {
const [scheme, creds] = header.split(' ');
Expand Down
6 changes: 6 additions & 0 deletions tsconfig.packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
"@metamask/json-rpc-engine/v2": [
"${configDir}/../json-rpc-engine/src/v2/index.ts"
],
"@metamask/profile-sync-controller/auth": [
"${configDir}/../profile-sync-controller/src/controllers/authentication/index.ts"
],
"@metamask/profile-sync-controller/user-storage": [
"${configDir}../profile-sync-controller/src/controllers/user-storage/index.ts"
],
"@metamask/*": ["${configDir}/../*/src/index.ts"]
}
}
Expand Down