Skip to content

Map stellar simulationErrors to localized tx failure messages #721

Description

@king-aj-the-first

GitHub labels: Stellar Wave

Drips complexity: Medium (100 points)

Area: Transactions

Description

lib/stellar/simulationErrors.ts parses Soroban failures, but TxSimulationPreview and transaction toasts often show raw error codes.

Requirements and Context

Investors need actionable copy for insufficient balance, wrong network, and contract revert reasons.

Suggested Execution

git checkout -b feat/simulation-errors-i18n
  1. Create branch feat/simulation-errors-i18n
  2. Add messages for known simulation error codes
  3. Map errors in TxSimulationPreview and useTransaction
  4. Fall back to generic message for unknown codes
  5. Add unit tests for mapping table

Example commit message

feat(transactions): map simulationErrors to localized messages

File Paths

  • lib/stellar/simulationErrors.ts
  • components/invoice/TxSimulationPreview.tsx
  • hooks/useTransaction.ts
  • messages/en.json

Guidelines

  • Assignment required before starting
  • PR description must include: Closes #<issue_number>
  • Run npm run lint, npm run type-check, npm run test, and npm run build before opening PR
  • Add screenshots or recordings for UI changes
  • Complexity: Medium (100 points) — focused feature work in an existing surface

Acceptance Criteria

  • Known codes show translated messages
  • Unknown codes use safe generic copy
  • Preview dialog shows mapped message
  • All four locales include keys
  • Unit tests cover mapping branches

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions