Skip to content

Fix/price candles webhook dispatch readme env#462

Merged
Mimah97 merged 4 commits into
Vatix-Protocol:mainfrom
levi0005:fix/price-candles-webhook-dispatch-readme-env
Jun 30, 2026
Merged

Fix/price candles webhook dispatch readme env#462
Mimah97 merged 4 commits into
Vatix-Protocol:mainfrom
levi0005:fix/price-candles-webhook-dispatch-readme-env

Conversation

@levi0005

Copy link
Copy Markdown
Contributor

Summary

Related issue

Closes #365
closes #366
closes #367
closes #368
FILES CHANGED:

  • apps/api/src/price/price.controller.spec.ts
  • apps/api/src/webhooks/webhook.processor.spec.ts (new)
  • README.md
  • apps/web/.env.example

What was implemented:

  1. Price controller spec against real candles (price.controller.spec.ts): The mockCandle fixture was misaligned with the actual PriceCandle interface exported by price.service.ts. It used timestamp (wrong field name) and string OHLCV values — but the real interface uses time: number and numeric open/high/low/close/volume. Fixed to match exactly: { time: 1700000000, open: 0.09, high: 0.11, low: 0.08, close: 0.1, volume: 50000 }.

  2. Webhooks dispatch integration test (webhook.processor.spec.ts): Created a new spec covering the full WebhookWorker dispatch pipeline — both the queue-enqueue layer (dispatch()) and the HTTP-delivery layer (deliver()). Tests cover: correct job options (3 attempts, exponential backoff), HMAC-SHA256 signature attachment when a secret is set, delivery log recording, consecutiveFails increment/reset logic, auto-disable after 10 consecutive failures, and graceful handling of network errors (ECONNREFUSED → undefined status). Worker is instantiated directly (bypassing onModuleInit) to avoid real Redis/BullMQ connections in CI.

  3. Fix README org links to vatix-protocol (README.md): Two GitHub URLs in the README pointed at the old Valreb001 org. Both updated to vatix-protocol: the git clone command and the "good first issue" label filter link.

  4. Add STELLAR_RPC_URL to web .env.example (apps/web/.env.example): The API's .env.example already had STELLAR_RPC_URL, but the web app's .env.example was missing it. Added NEXT_PUBLIC_STELLAR_RPC_URL=https://soroban-testnet.stellar.org so the SDK can reach Soroban RPC directly from the browser.

Type of change

  • Bug fix
  • New feature
  • Docs update
  • Chore / refactor

Checklist

  • CI passes (lint + tests + build)
  • Self-reviewed the diff
  • Added or updated tests where relevant
  • Docs updated if needed

@Mimah97 Mimah97 merged commit f9c8963 into Vatix-Protocol:main Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants