Skip to content

feat(AccountScreen): Refresh button no loading state, no last-refreshed timestamp, no Friendbot link on testnet empty balance #197

Description

@k-deejah

Problem

Three issues affect the AccountScreen refresh UX, loading coordination, and empty state design.

1. AccountScreen "Refresh" button has no loading indicator while refreshing

After refreshAccount() is called, the button shows no spinner or disabled state. Users click it repeatedly not knowing if the refresh started. The button should show a loading state using the existing Button loading prop while isLoadingAccount is true.

2. AccountScreen does not show a last-refreshed timestamp

After a manual refresh, there is no indication of when the data was last fetched. Users who want to confirm data is up-to-date have no feedback. A "Last updated: just now" label below the refresh button would provide this.

3. AccountScreen "No assets found" empty state has no action

BalanceList shows "No assets found" when connected but has zero balances. There is no call-to-action — e.g. a link to the Stellar Friendbot (on testnet) to fund the account with test XLM.

Solution

  1. Disable the Refresh button and show a spinner (loading={isLoadingAccount}) while refreshing.
  2. Store lastRefreshed: Date | null in AccountScreen state, update it after refreshAccount resolves, and render a relative timestamp.
  3. When network.name === "testnet" and balances.length === 0, render a "Fund with Friendbot" link.

Acceptance Criteria

  • Refresh button shows loading spinner while isLoadingAccount is true
  • "Last updated" timestamp renders after a refresh
  • Testnet empty balance state links to Friendbot
  • npm run build passes

Note for Contributors: Write a clear PR description. Include screenshots of the loading button state and the Friendbot link on testnet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

    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