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: 2 additions & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"dotenv": "^17.4.2",
"express": "^5.2.1",
"express-rate-limit": "^8.6.1",
"graphql": "^16.14.2",
"helmet": "^8.3.0",
"pg": "^8.22.0",
"pino": "^10.3.1",
Expand All @@ -36,7 +37,7 @@
"@pact-foundation/pact": "^13.1.0",
"@types/cookie-parser": "^1.4.10",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/express": "^5.0.6",
"@types/joi": "^17.2.3",
"@types/js-yaml": "^4.0.9",
"@types/jsonwebtoken": "^9.0.10",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/__tests__/api-key-store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
function makePool(rows: object[][] = []) {
let call = 0;
return {
query: vi.fn(async () => {
query: vi.fn(async (_sql: string, _params: string[]) => {
const r = rows[call] ?? [];
call++;
return { rows: r, rowCount: r.length };
Expand Down
4 changes: 2 additions & 2 deletions backend/src/__tests__/audit-log-streaming.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ describe('Audit-log export streaming and load (Feature D)', () => {
`/api/admin/audit-log/export?from=${encodeURIComponent(from)}&to=${encodeURIComponent(to)}`
);

const clientCalls = mockClient.query.mock.calls.map(([sql]: [string]) =>
(sql as string).toUpperCase().slice(0, 10).trim()
const clientCalls = mockClient.query.mock.calls.map((call: any[]) =>
(call[0] as string).toUpperCase().slice(0, 10).trim()
);
expect(clientCalls).toContain('BEGIN');
expect(clientCalls).toContain('DECLARE');
Expand Down
4 changes: 2 additions & 2 deletions backend/src/__tests__/ramp-event-hooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ function makeEvent(status: RampOrderStatus): RampOrderEvent {
return {
orderId: 'ord-1',
provider: 'moonpay',
direction: 'on_ramp',
status,
fiatAmount: 100,
fiatCurrency: 'USD',
cryptoAmount: 50,
cryptoCurrency: 'USDC',
walletAddress: 'GABC',
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
timestamp: new Date(),
raw: {},
};
}
Expand Down
4 changes: 2 additions & 2 deletions backend/src/__tests__/ramp-webhook-handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ function makeEvent(status = 'completed'): RampOrderEvent {
return {
orderId: 'ord-1',
provider: 'moonpay',
direction: 'on_ramp',
status: status as any,
fiatAmount: 100,
fiatCurrency: 'USD',
cryptoAmount: 50,
cryptoCurrency: 'USDC',
walletAddress: 'GABC',
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
timestamp: new Date(),
raw: {},
};
}
Expand Down
7 changes: 4 additions & 3 deletions backend/src/__tests__/reconciler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

import { describe, it, expect, beforeEach, vi } from 'vitest';
import type { Pool } from 'pg';
import {
runReconciliationCycle,
reconcileLedgerGaps,
Expand Down Expand Up @@ -51,7 +52,7 @@ const {
// Mock get_remittance (on-chain call)
// ---------------------------------------------------------------------------
const { getRemittanceMock } = vi.hoisted(() => ({
getRemittanceMock: vi.fn<[number], Promise<{ id: number; status: string; amount: string; sender: string; agent: string } | null>>(),
getRemittanceMock: vi.fn<(id: number) => Promise<{ id: number; status: string; amount: string; sender: string; agent: string } | null>>(),
}));

vi.mock('../reconciler', async (importOriginal) => {
Expand Down Expand Up @@ -100,8 +101,8 @@ vi.mock('@stellar/stellar-sdk', async (importOriginal) => {
const actual = await importOriginal<typeof import('@stellar/stellar-sdk')>();
return {
...actual,
SorobanRpc: {
...actual.SorobanRpc,
rpc: {
...actual.rpc,
Server: vi.fn().mockImplementation(() => ({
getEvents: vi.fn().mockResolvedValue({ events: [] }),
simulateTransaction: vi.fn(),
Expand Down
2 changes: 1 addition & 1 deletion backend/src/__tests__/sanitizer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
createRemittanceSchema,
memoSchema,
validateRequest,
} from '../../api/src/schemas/requestValidation';
} from '../../../api/src/schemas/requestValidation';

import { redact, createLogger } from '../../../shared/src/logger';

Expand Down
1 change: 0 additions & 1 deletion backend/src/__tests__/secrets-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
SecretsManager,
getSecretsManager,
_setSecretsManagerInstance,
hashApiKey,
} from '../../../shared/src/secrets-manager';

// ── Helpers ────────────────────────────────────────────────────────────────────
Expand Down
6 changes: 3 additions & 3 deletions backend/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ fxRateCache.setMetricsObserver((from, to, stalenessSeconds) => {
});

getFailoverFxService().setMetricsObserver({
onProviderFailure: (provider: string) => metricsService.recordFxProviderFailure(provider),
onProviderFailure: (provider) => metricsService.recordFxProviderFailure(provider),
onFailover: () => metricsService.recordFxProviderFailover(),
onRateRejected: (_pair: string, reason: string) => metricsService.recordFxRateRejected(reason),
onRateRejected: (_pair, reason) => metricsService.recordFxRateRejected(reason),
});

// Publish the FX provider circuit-breaker state (SR-104). Seeded closed so the
Expand Down Expand Up @@ -402,7 +402,7 @@ app.delete('/api/developers/keys/:key_id', adminLimiter, async (req: Request, re

try {
const revoked = await apiKeyStore.revoke({
keyId: key_id,
keyId: key_id as string,
ownerId,
ipAddress: (req.headers['x-forwarded-for'] as string)?.split(',')[0].trim() ?? req.socket.remoteAddress ?? undefined,
});
Expand Down
1 change: 0 additions & 1 deletion backend/src/webhooks/dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ export class WebhookDispatcher {
delivery.attempt + 1,
delivery,
subscriber.content_type,
subscriber
);
}
} catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"i18next": "^26.3.4",
"jspdf": "^2.5.2",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-i18next": "^17.0.11"
},
"devDependencies": {
"@pact-foundation/pact": "^13.1.0",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import RemittanceList from './components/RemittanceList'
import AgentPanel from './components/AgentPanel'
import ErrorBoundary from './components/ErrorBoundary'
import CorridorAnalytics from './components/CorridorAnalytics'
import { LanguageSelector } from './components/LanguageSelector'

function App() {
const { t } = useTranslation()
Expand Down
71 changes: 0 additions & 71 deletions frontend/src/__tests__/AgentPanel.snap.test.tsx

This file was deleted.

75 changes: 0 additions & 75 deletions frontend/src/__tests__/CorridorAnalytics.snap.test.tsx

This file was deleted.

34 changes: 0 additions & 34 deletions frontend/src/__tests__/SendMoneyFlow.snap.test.tsx

This file was deleted.

Loading
Loading