Skip to content

fix: replace raw console.error with logger utility (closes #848)#872

Merged
Ejirowebfi merged 4 commits into
Favourorg:mainfrom
zeekman:fix/replace-console-error-with-logger
Jun 25, 2026
Merged

fix: replace raw console.error with logger utility (closes #848)#872
Ejirowebfi merged 4 commits into
Favourorg:mainfrom
zeekman:fix/replace-console-error-with-logger

Conversation

@zeekman

@zeekman zeekman commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Created frontend/src/utils/logger.ts — a thin wrapper that calls console.error in dev and silences output in production (ready to forward to Sentry when integrated)
  • Replaced console.error in TokenCreateForm.tsx (deployment errors) and WalletContext.tsx (balance fetch + connection check) with logger.error

Closes #848

Test plan

  • Token deployment error path still logs in dev
  • Wallet balance/connection errors still log in dev
  • No console output in production builds

@zeekman zeekman force-pushed the fix/replace-console-error-with-logger branch from c5a3947 to 285c5ee Compare June 25, 2026 15:49
…adataUploadForm

Closes Favourorg#848 — adds a thin logger utility (utils/logger.ts) that
suppresses errors in production and is ready to forward to Sentry when
integrated. Replaces the three ad-hoc console.error calls cited in the
issue with logger.error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@zeekman zeekman force-pushed the fix/replace-console-error-with-logger branch from baa19eb to 24805af Compare June 25, 2026 15:56
zeekman and others added 3 commits June 25, 2026 16:33
- Add 'standalone' to Network type and NETWORK_CONFIGS (localhost:8000)
  so the app no longer crashes when VITE_NETWORK=standalone (CI setting)
- Update NetworkContext, WalletService.getBalance/signTransaction to accept
  the new network variant
- Add standalone entries to NetworkBadge color/label maps
- Fix wallet-mock.ts to intercept @stellar/freighter-api postMessage protocol
  (REQUEST_PUBLIC_KEY, REQUEST_CONNECTION_STATUS, etc.) so connect() succeeds
  in E2E tests; also pre-accept ToS to prevent modal blocking the flow
- Fix e2e-setup.ts to use local Friendbot (localhost:8000) instead of the
  public testnet Friendbot, matching the CI docker-compose setup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ETWORK_DETAILS

WatchWalletChanges.fetchInfo() calls REQUEST_PUBLIC_KEY then REQUEST_NETWORK_DETAILS
sequentially. Responding to both immediately caused the watcher callback to fire on
mount (address changed from "" → mockAddress), auto-connecting the wallet before the
test could click "Connect Wallet".

By not responding to REQUEST_NETWORK_DETAILS the watcher hangs at the second await
and never fires its callback. Explicit connect() only sends REQUEST_PUBLIC_KEY so
it is unaffected. All beforeEach setups can now find and click the button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…chars

- TokenDashboard: add token-list-container class to outer div so the
  E2E dashboard test can locate the element via CSS selector
- WalletButton: truncate with end=6 so the last 6 chars of the connected
  address are visible, matching what auth.spec.ts expects via substring(48)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Ejirowebfi Ejirowebfi merged commit b34bfd8 into Favourorg:main Jun 25, 2026
8 of 9 checks passed
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.

tech-debt: components use raw console.error instead of the Sentry monitoring layer

2 participants