Skip to content

feat: add debug logging for Spark balance update flow#963

Merged
jbojcic1 merged 1 commit intomasterfrom
feat/spark-balance-debug-logging
Mar 30, 2026
Merged

feat: add debug logging for Spark balance update flow#963
jbojcic1 merged 1 commit intomasterfrom
feat/spark-balance-debug-logging

Conversation

@ditto-agent
Copy link
Copy Markdown
Contributor

Summary

  • Adds sparkDebugLog helper in spark.ts gated by DEBUG_LOGGING_SPARK feature flag
  • Logs the full balance update chain after a Spark receive: payment detection → quote completion → balance invalidation → SDK fetch → accounts cache update
  • Helps diagnose an issue where balance doesn't update on mobile after a receive (transaction shows but balance stays stale until hard refresh)

Files changed

  • app/features/shared/spark.tssparkDebugLog helper + logs in balance polling loop
  • app/features/accounts/account-hooks.ts — logs in updateSparkAccountIfBalanceOrWalletChanged (version check, balance diff, update decision)
  • app/features/receive/spark-receive-quote-hooks.ts — logs on payment detection, quote completion, and balance query invalidation

Test plan

  • Enable DEBUG_LOGGING_SPARK flag and receive a Spark payment on mobile
  • Verify [Spark Debug] logs appear in console tracing the full chain
  • Verify no logs appear when the flag is disabled

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agicash Ready Ready Preview, Comment Mar 30, 2026 9:24am

Request Review

@supabase
Copy link
Copy Markdown

supabase bot commented Mar 30, 2026

This pull request has been ignored for the connected project hrebgkfhjpkbxpztqqke because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@ditto-agent ditto-agent force-pushed the feat/spark-balance-debug-logging branch 2 times, most recently from 70de56b to ff54745 Compare March 30, 2026 09:21
Adds feature-flag-gated debug logs (DEBUG_LOGGING_SPARK) to trace the
full balance update chain after Spark sends and receives: payment
detection → quote completion → balance invalidation → SDK fetch →
cache update.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jbojcic1 jbojcic1 merged commit 94b465d into master Mar 30, 2026
6 checks passed
@jbojcic1 jbojcic1 deleted the feat/spark-balance-debug-logging branch March 30, 2026 09:29
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.

2 participants