Skip to content

fix: address 4 issues - wallet validation, route error boundaries, DataRefreshWrapper timers, wallet emoji icons#541

Open
Penielka wants to merge 2 commits into
MettaChain:mainfrom
Penielka:fix/penielka-issues-428-429-434-435
Open

fix: address 4 issues - wallet validation, route error boundaries, DataRefreshWrapper timers, wallet emoji icons#541
Penielka wants to merge 2 commits into
MettaChain:mainfrom
Penielka:fix/penielka-issues-428-429-434-435

Conversation

@Penielka

Copy link
Copy Markdown
Contributor

Summary

Fixes 4 issues assigned to @Penielka:

#429 (P1, security): wallet address not checksum-validated before provider calls

  • Created src/utils/walletHelpers.ts with assertValidAddress using viem's getAddress for EIP-55 checksum validation
  • Added fetchWalletBalance that validates address before any provider call
  • Throws user-safe error messages on invalid or malformed addresses
  • Added comprehensive unit tests with well-known checksums and adversarial examples

#428 (P2, refactor): missing route-level error boundaries in app routes

  • Wrapped 7 pages with withRouteErrorBoundary: compare, governance, secondary-market, tax-report, mobile-properties, widget/investment-calculator, developers/tokenize
  • Errors caught at route level now report to /api/errors monitoring endpoint
  • Uncaught errors continue to bubble to app/error.tsx with breadcrumb context

#435 (P2, ux): DataRefreshWrapper drops form state and stacks timers

  • Added useRef to track pending success timeout, with cleanup on unmount via useEffect
  • Cancels pending timers when a new refresh is triggered, preventing timer stacking
  • Children no longer remount across refreshes (form state preserved)
  • Added tests verifying timer cleanup and form state preservation

#434 (P3, ux): emoji wallet icons render unreliably on some platforms

  • Replaced raw emoji with lucide-react SVG icons: Wallet (MetaMask), QrCode (Coinbase), Link2 (WalletConnect)
  • Added title and aria-label attributes for accessibility
  • Fixed corrupted duplicate wallet arrays in the file

Closes #428, Closes #429, Closes #434, Closes #435

Penielka added 2 commits June 27, 2026 11:25
…aries, DataRefreshWrapper timer cleanup, wallet emoji icons

- MettaChain#429: Add assertValidAddress with EIP-55 checksum validation in walletHelpers.ts
- MettaChain#428: Wrap 7 route pages with withRouteErrorBoundary for graceful error handling
- MettaChain#435: Fix DataRefreshWrapper timer stacking with useRef cleanup + unmount cleanup
- MettaChain#434: Replace emoji wallet icons with lucide-react SVGs and add aria-labels
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Penielka Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant