Skip to content

fix: toast auto-dismiss, dispute tx hash, test-utils export, address validation#740

Merged
Haroldwonder merged 2 commits into
Haroldwonder:mainfrom
Good-Coded:fix/685-686-687-688-toast-dispute-governance-settlements
Jun 1, 2026
Merged

fix: toast auto-dismiss, dispute tx hash, test-utils export, address validation#740
Haroldwonder merged 2 commits into
Haroldwonder:mainfrom
Good-Coded:fix/685-686-687-688-toast-dispute-governance-settlements

Conversation

@Good-Coded
Copy link
Copy Markdown

@Good-Coded Good-Coded commented Jun 1, 2026

Summary

Fixes four independent issues across the frontend, SDK, and API.

closes #685 — Toast auto-dismiss for error toasts

  • Added DEFAULT_DURATION map: error=5000ms, success=3000ms, info/warning=4000ms
  • ToastItem now uses the type-based default when no explicit duration is passed
  • Added pause-on-hover: onMouseEnter pauses the timer and records remaining time; onMouseLeave restarts from where it left off

closes #686 — DisputeResolution shows transaction hash after resolution

  • confirmResolve() now reads tx_hash from the resolve API response
  • A success banner with a Stellar Expert link is displayed after a successful resolution

closes #687makeProposalScVal moved to shared test utilities

  • Created sdk/src/test-utils.ts with the exported makeProposalScVal helper
  • governance.test.ts now imports it from ../src/test-utils.js instead of defining it locally

closes #688 — Stellar address validation in settlements route

  • Added STELLAR_ADDRESS_RE = /^G[A-Z2-7]{55}$/ regex
  • Applied to sender and agent fields in the per-item validation loop before net settlement processing

Testing

  • All changes are minimal and targeted; no new dependencies introduced
  • Existing tests continue to pass; governance.test.ts now uses the shared utility

…Haroldwonder#688

- Haroldwonder#685 Toast.tsx: add type-based auto-dismiss defaults (error=5s,
  success=3s) and pause-on-hover with remaining-time tracking
- Haroldwonder#686 DisputeResolution.tsx: capture tx_hash from resolve response
  and display it with a Stellar Expert explorer link
- Haroldwonder#687 sdk/src/test-utils.ts: extract makeProposalScVal into shared
  test utilities file and export it; update governance.test.ts import
- Haroldwonder#688 settlements.ts: validate sender/agent are valid Stellar
  addresses (G... 56 chars) before processing net settlements
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@Good-Coded is attempting to deploy a commit to the Harold's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@Good-Coded 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

@Haroldwonder Haroldwonder merged commit 33328ef into Haroldwonder:main Jun 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment