Skip to content

Add error handling for token selection #135

Description

@utgarda

Problem

Token selection lacks error handling for corrupted sessionStorage data.

Current state

TokenProvider silently ignores JSON parsing errors when loading stored token from sessionStorage.

Solution

  1. Handle parsing errors - Clear invalid storage data
  2. Add loading state during token initialization
  3. Show error messages if token operations fail

Files to modify

  • tokenContext.tsx - Add try/catch and error states
  • ChainAndTokenSheetPanel.tsx - Show errors in UI

Acceptance criteria

  • Handle corrupted sessionStorage gracefully
  • Show loading state during initialization
  • Display user-friendly error messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions