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
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"lint:fix": "eslint . --fix",
"lint:npm": "npmPkgJsonLint . --fix",
"lint:npm:check": "npmPkgJsonLint .",
"localnet:quickstart": "bash ./bin/canton-localnet setup",
"localnet:logs": "bash ./bin/canton-localnet logs",
"localnet:quickstart": "bash ./bin/canton-localnet setup",
"localnet:setup": "bash ./bin/canton-localnet setup",
"localnet:smoke": "bash ./bin/canton-localnet smoke",
"localnet:start": "bash ./bin/canton-localnet start",
Expand All @@ -71,7 +71,7 @@
"@hardlydifficult/rest-client": "1.0.65",
"@hardlydifficult/websocket": "1.0.73",
"@stellar/stellar-base": "15.0.0",
"axios": "1.18.0",
"axios": "1.18.1",
"dotenv": "17.4.2",
"glob": "13.0.6",
"openapi-fetch": "0.17.0",
Expand All @@ -82,25 +82,25 @@
},
"devDependencies": {
"@types/jest": "30.0.0",
"@types/node": "25.9.3",
"@types/node": "26.1.0",
"@types/ws": "8.18.1",
"@typescript-eslint/eslint-plugin": "8.61.0",
"@typescript-eslint/parser": "8.61.0",
"@typescript-eslint/eslint-plugin": "8.62.1",
"@typescript-eslint/parser": "8.62.1",
"eslint": "9.39.2",
"eslint-config-prettier": "10.1.8",
"eslint-import-resolver-typescript": "4.4.5",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-markdown": "5.1.0",
"eslint-plugin-unused-imports": "4.4.1",
"jest": "30.4.2",
"markdownlint-cli": "0.48.0",
"npm-package-json-lint": "10.4.0",
"markdownlint-cli": "0.49.0",
"npm-package-json-lint": "10.4.1",
"prettier": "3.8.4",
"prettier-plugin-jsdoc": "1.8.1",
"prettier-plugin-organize-imports": "4.3.0",
"prettier-plugin-packagejson": "3.0.2",
"ts-jest": "29.4.11",
"tsx": "4.22.4",
"tsx": "4.23.0",
"typescript": "5.9.3",
"typescript-7": "npm:typescript@7.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion src/core/logging/ConsoleLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class ConsoleLogger implements Logger {

console.log(`${prefix} ${methodLabel} ${urlLabel}`);

if (sanitizedRequest && Object.keys(sanitizedRequest as object).length > 0) {
if (sanitizedRequest !== null && typeof sanitizedRequest === 'object' && Object.keys(sanitizedRequest).length > 0) {
console.log(`${this.colorize(' Request:', 'gray')} ${this.formatJson(sanitizedRequest)}`);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

import { CantonRuntime, ValidatorApiClient } from '../../../../src';
import { waitForCompletionWithMetadata } from '../../../../src/clients/ledger-json-api';
import { CompletionStreamResponseSchema } from '../../../../src/clients/ledger-json-api/schemas/api/completions';
import { EnvLoader } from '../../../../src/core/config/EnvLoader';
import { ConfigurationError } from '../../../../src/core/errors';
import { CompletionStreamResponseSchema } from '../../../../src/clients/ledger-json-api/schemas/api/completions';
import { getPaidTrafficCostFromCompletion } from '../../../../src/utils/traffic/paid-traffic-cost';
import { buildIntegrationTestClientConfig } from '../../../utils/testConfig';
import { getClient } from './setup';
Expand Down Expand Up @@ -53,10 +53,7 @@ async function resolveWalletAppInstallContext(
* Participant user id for completions. Falls back to validator `user_name` (same as `scripts/grant-user-rights.ts`)
* when the ledger authenticated-user endpoint is unavailable.
*/
async function resolveLedgerUserId(
client: ReturnType<typeof getClient>,
validatorUserName: string
): Promise<string> {
async function resolveLedgerUserId(client: ReturnType<typeof getClient>, validatorUserName: string): Promise<string> {
const configured = client.getUserId();
if (configured) {
return configured;
Expand Down Expand Up @@ -170,7 +167,7 @@ describe('LedgerJsonApiClient / paidTrafficCost on completions', () => {
limit: 50,
});

const row = findCompletionForSubmission(blocking as unknown[], submissionId);
const row = findCompletionForSubmission(blocking, submissionId);
if (!row) {
throw new Error(
`Blocking completions did not include submissionId=${submissionId} (check limit=${50} or timing)`
Expand Down
3 changes: 1 addition & 2 deletions test/integration/localnet/ledger-api/parties.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ describe('LedgerJsonApiClient / Parties', () => {

test('getParticipantId returns participant identifier', async () => {
const client = getClient();
// Cast to handle void parameter type
const response = await (client.getParticipantId as () => Promise<{ participantId: string }>)();
const response = await client.getParticipantId();

expect(response).toBeDefined();
expect(typeof response.participantId).toBe('string');
Expand Down
16 changes: 8 additions & 8 deletions test/typecheck/scan-registry-metadata.typecheck.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { z } from 'zod';
import type { z } from 'zod';
import type { ScanApiClient } from '../../src/clients/scan-api';
import {
import type {
GetInstrumentParams,
GetInstrumentParamsSchema,
type GetInstrumentParams,
type GetInstrumentResponse,
GetInstrumentResponse,
} from '../../src/clients/scan-api/operations/v0/registry/metadata/v1/get-instrument';
Comment thread
HardlyDifficult marked this conversation as resolved.
import { type GetRegistryInfoResponse } from '../../src/clients/scan-api/operations/v0/registry/metadata/v1/get-registry-info';
import {
import type { GetRegistryInfoResponse } from '../../src/clients/scan-api/operations/v0/registry/metadata/v1/get-registry-info';
import type {
ListInstrumentsParams,
ListInstrumentsParamsSchema,
type ListInstrumentsParams,
type ListInstrumentsResponse,
ListInstrumentsResponse,
} from '../../src/clients/scan-api/operations/v0/registry/metadata/v1/list-instruments';
Comment thread
HardlyDifficult marked this conversation as resolved.
import type { paths } from '../../src/generated/token-standard/splice-api-token-metadata-v1/openapi/token-metadata-v1';

Expand Down
Loading