Skip to content

Add helper for formatting wallet address as shortened display string #423

Description

@Chucks1093

Summary

Full Stellar wallet addresses are too long to display in the UI. A shared helper that shows the first 4 and last 4 characters separated by ellipsis (e.g. GABC...XY12) should be used consistently across all address displays.

Scope

  • Add shortenAddress(address: string): string utility
  • Return first 4 + ... + last 4 characters
  • Return the full address unchanged if it is shorter than 10 characters
  • Add unit tests for: standard length, short address, empty string guard

Acceptance Criteria

  • Standard Stellar address returns correctly shortened form
  • Addresses shorter than 10 characters are returned as-is
  • Unit tests cover all cases

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Fields

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