Skip to content

UI #22 — Build named accounts address book with save, load, and copy #170

@Tinna23

Description

@Tinna23

Description

Users who regularly track the same Stellar accounts should be able to save those addresses with a human-readable label. Saved accounts can be loaded directly into the search or copied in one tap.

What To Build

src/hooks/useAddressBook.ts

  • localStorage key: stellar-explain-address-book
  • Each entry: { id, label: string, address: string, savedAt: ISO string }
  • Maximum 50 saved accounts

src/components/addressbook/AddressBook.tsx

  • Lists saved accounts: label (bold), truncated address, Copy, Load, Delete buttons
  • Copy → copies full address with toast feedback
  • Load → fills search bar and navigates to results

src/components/addressbook/SaveAddressButton.tsx

  • Shown on the account result — a 'Save address' button
  • Opens inline popover with address pre-filled and editable Label field (max 30 chars)
  • On save: validates label non-empty, saves, shows toast: 'Saved as [label]'
  • If already saved: button shows 'Saved ✓' with rename/delete option

Key Files

  • src/hooks/useAddressBook.ts
  • src/components/addressbook/AddressBook.tsx
  • src/components/addressbook/SaveAddressButton.tsx

Acceptance Criteria

  • Accounts can be saved with a label from the result view
  • Saved accounts appear in the address book panel
  • Load navigates and displays results
  • Copy shows toast feedback
  • Already-saved addresses show 'Saved ✓' state
  • Label validation enforced

Complexity: Medium · 150 pts
Stage: S7 — Persistence (Wave 2)
Depends on: UI #7

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendcreate high-quality web applications with the power of React components.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions