Skip to content

fix: add activity refresh error banner - #544

Open
Binali223 wants to merge 6 commits into
Axionvera:mainfrom
Binali223:feat/issue-100-add-activity-refresh-error-banner
Open

fix: add activity refresh error banner#544
Binali223 wants to merge 6 commits into
Axionvera:mainfrom
Binali223:feat/issue-100-add-activity-refresh-error-banner

Conversation

@Binali223

Copy link
Copy Markdown

Overview

This PR adds a non-blocking activity refresh error banner. When a refresh attempt fails but cached or previous activity data is still available, the history screen keeps showing the existing transactions and displays a clear banner with a retry action. Full-screen error handling is preserved for the case where no activity data exists at all.

Related Issue

Closes #

Changes

🔄 Activity State Handling

  • [MODIFY] src/store/walletStore.ts

    • Keeps existing transactions when a refresh error occurs; only clears data on a successful load or initial full-screen error.
    • Adds refreshError, isRefreshing, and retryRefresh to the activity state.
    • Exposes a retry action so the banner can trigger another refresh without losing visible data.
  • [MODIFY] src/features/transactions/types.ts

    • Adds refresh status and error state to the activity store types.
  • [MODIFY] src/features/transactions/helpers.ts

    • Distinguishes initial load failures from refresh failures so the UI can choose the correct presentation.

🧩 UI Components

  • [MODIFY] app/(tabs)/history.tsx

    • Renders NetworkStateBanner when a refresh error exists and activity data is already available.
    • Keeps full-screen ErrorState only when no activity data is available.
  • [MODIFY] src/components/ErrorState.tsx

    • Restricts full-screen error usage to initial load / no-data failures.
  • [MODIFY] src/components/NetworkStateBanner.tsx

    • Adds a non-blocking refresh failure banner with a clear, non-sensitive message and a Retry button.

Verification Results

Manual verification:
✅ Existing activity data remains visible after simulated refresh failure
✅ Refresh failure banner is shown without replacing content
✅ Retry refresh re-runs activity load and updates data
✅ Full-screen error is still used when no activity data is available
✅ Banner message is generic and non-sensitive for Testnet/network failures
Acceptance Criteria Status
Existing activity data remains visible after refresh failure ✅ Cached transactions are preserved and rendered
Refresh failure banner is shown ✅ Non-blocking banner appears with clear message
User can retry refresh ✅ Retry button triggers retryRefresh on wallet store
Full-screen error is still used when no activity data is available ✅ Initial load failure still uses full-screen error
Error message is clear and non-sensitive ✅ Generic network/Testnet message, no sensitive details

Closes #100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add activity refresh error banner

1 participant