From e8a4c42dece67642251050bd4f655e8c2955667e Mon Sep 17 00:00:00 2001 From: Anubhav Singh <110191909+anumukul@users.noreply.github.com> Date: Thu, 22 Oct 2026 15:10:21 +0530 Subject: [PATCH] Store the real token contract ID on indexed transfers --- apps/backend/src/services/stellarListener.ts | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/apps/backend/src/services/stellarListener.ts b/apps/backend/src/services/stellarListener.ts index 086f12e..08f88be 100644 --- a/apps/backend/src/services/stellarListener.ts +++ b/apps/backend/src/services/stellarListener.ts @@ -1,20 +1,4 @@ -/** - * Stellar event listener for `token_transfer` (#46) and `group_treasury` multisig (#130). - * - * Subscribes to contract events emitted by the `token_transfer` and - * `group_treasury` Soroban contracts. The listener: - * - * - Polls Soroban RPC `getEvents` on a short interval (cursor-based). - * - Reconnects automatically after a transient failure with exponential - * backoff capped at 30 seconds. - * - Upserts on the unique `tx_hash` / `(contractId, proposalId)` so - * reconnects that re-read a page produce no duplicates. - * - After each treasury proposal DB update, emits a - * `treasury_proposal_updated` Socket.IO event to the relevant room. - * - Logs errors via the standard backend logger but never rethrows out - * of `runForever`, so the API server stays up even if the chain is - * unreachable. - */ + import { rpc } from '@stellar/stellar-sdk'; import { db } from '../db/index.js'; import { tokenTransfers, messages, conversations, users, treasuryProposals } from '../db/schema.js';