Skip to content

feat(SorobanScreen): pre-fill last contract ID from localStorage, saved contracts picker, Stellar Expert link per contract #362

Description

@k-deejah

Problem

1. SorobanScreen has no persistent contract ID between sessions — closing the browser clears the last-used contract ID. With the localStorage history from issue b38 (contracts list), the most recently used contract ID should be pre-filled on mount.

2. SorobanScreen has no way to switch between multiple saved contracts — the localStorage history stores up to 5 contract IDs but the only way to use them is via the datalist suggestion in the input. A "Saved Contracts" sidebar panel or dropdown that directly sets the active contract ID would be more convenient.

3. SorobanScreen has no "Open in Stellar Expert" link for the current contract — after entering a contract ID, users have no one-click path to view the contract on the block explorer.

Solution

  1. On mount, pre-fill contractId from localStorage["sorokit-recent-contracts"][0] if available.
  2. Add a "Saved Contracts" dropdown below the Contract ID input listing the 5 recent IDs; clicking one sets it as the current contract.
  3. Add an "Open in Stellar Expert" icon link next to the Contract ID input when contractId.trim() is non-empty.

Acceptance Criteria

  • Last-used contract ID is pre-filled on mount
  • "Saved Contracts" dropdown lists and applies saved contract IDs
  • "Open in Stellar Expert" link appears for non-empty contract IDs
  • npm run build passes

Note for Contributors: Write a clear PR description. Include a screenshot of the saved contracts dropdown and the Stellar Expert link.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions