Skip to content

[Backend] Replace duplicated isValidStellarAddress in remittanceService with shared util #1012

@ogazboiz

Description

@ogazboiz

Telegram: https://t.me/+DOylgFv1jyJlNzM0

Why this matters

backend/src/services/remittanceService.ts (around line 42) defines a private isValidStellarAddress that is a byte-for-byte duplicate of the canonical one already exported from backend/src/utils/stellar.ts. Duplicated validators drift over time (the util copy already disagrees on its regex), so a single source of truth prevents bugs and reduces maintenance.

Acceptance criteria

  • Import isValidStellarAddress from ../utils/stellar.js in remittanceService.ts
  • Delete the local copy
  • Run the existing remittanceService.test.ts suite to confirm no regression

Files to touch

  • backend/src/services/remittanceService.ts
  • backend/src/utils/stellar.ts (import only)

Out of scope

  • Sharing the validator across the frontend package (different package boundary)

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendIssues related to backend developmentgood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions