Skip to content

Conversation

@eho-send
Copy link
Contributor

No description provided.

@eho-send eho-send changed the title imscared Add support for all ERC20 for balances Sep 30, 2025
@github-actions
Copy link

Vercel Unique URL: https://sendapp-gm0lk9njj-0xsend.vercel.app
Vercel Preview URL: sendapp-erc20-indexer-0xsend.vercel.app
Last Commit: 121c6f6

- Created token-enrichment-worker (K8s) to replace Vercel cron
- Created balance-reconciliation-worker (K8s) for drift detection
- Removed all Vercel cronjobs from vercel.json
- Deleted unused API endpoints (enrich-token-data, discover-tokens, bootstrap-balances)
- Removed SQL functions: get_undiscovered_tokens, recalculate_erc20_balances
- Removed drift thresholds - now reconciles ANY discrepancy
- Updated documentation for K8s-first architecture

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
coingeckoApiKey: process.env.COINGECKO_API_KEY,
}

logger.info({ config }, 'Starting token enrichment worker')

Check failure

Code scanning / CodeQL

Clear-text logging of sensitive information High

This logs sensitive data returned by
an access to COINGECKO_API_KEY
as clear text.
This logs sensitive data returned by
an access to coingeckoApiKey
as clear text.

Copilot Autofix

AI about 2 months ago

To fix the issue, we must prevent the sensitive value (COINGECKO_API_KEY) from being logged in clear text when outputting the config object with logger.info({ config }, ...).
The best fix is to output a sanitized version of the config object, omitting or redacting the sensitive value.
Therefore:

  • Before line 40, create a new object from config for logging, with the value of coingeckoApiKey omitted or replaced by a static string such as '<REDACTED>'.
  • Log the sanitized object in place of config.
    No extra dependencies are needed; this can be achieved with simple object spread/destructuring.

Suggested changeset 1
apps/token-enrichment-worker/src/index.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/apps/token-enrichment-worker/src/index.ts b/apps/token-enrichment-worker/src/index.ts
--- a/apps/token-enrichment-worker/src/index.ts
+++ b/apps/token-enrichment-worker/src/index.ts
@@ -37,7 +37,8 @@
   coingeckoApiKey: process.env.COINGECKO_API_KEY,
 }
 
-logger.info({ config }, 'Starting token enrichment worker')
+const redactedConfig = { ...config, coingeckoApiKey: config.coingeckoApiKey ? '<REDACTED>' : undefined }
+logger.info({ config: redactedConfig }, 'Starting token enrichment worker')
 
 // Initialize clients
 const supabase = createClient(
EOF
@@ -37,7 +37,8 @@
coingeckoApiKey: process.env.COINGECKO_API_KEY,
}

logger.info({ config }, 'Starting token enrichment worker')
const redactedConfig = { ...config, coingeckoApiKey: config.coingeckoApiKey ? '<REDACTED>' : undefined }
logger.info({ config: redactedConfig }, 'Starting token enrichment worker')

// Initialize clients
const supabase = createClient(
Copilot is powered by AI and may make mistakes. Always verify output.
erick-kolwaii and others added 2 commits October 1, 2025 13:27
Simplified reconciliation system by removing snapshot table:
- Removed erc20_balance_snapshots table and view from migration
- Removed store_balance_snapshot function
- Removed snapshot storage from reconciliation worker
- Updated get_balances_to_reconcile to use last reconciliation time
- Updated documentation to reflect simpler architecture

Rationale: Reconciliation records already capture all necessary
data (drift, RPC balance, timestamp). Snapshots for "no drift"
cases add storage cost with minimal debugging value.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants