Skip to content

Consolidate query routing in EnhancedNostrProvider #nip29 #410

@rabble

Description

@rabble

Problem

The query function in EnhancedNostrProvider has bifurcated logic - it uses the custom pool for NIP-29 queries but falls back to the baseNostr provider for NIP-72 queries. This adds complexity and creates inconsistent data-fetching paths.

Current Issues

  • Two different query paths (custom pool vs baseNostr)
  • Increased complexity in debugging
  • Potential for inconsistent behavior
  • Makes the codebase harder to maintain

Proposed Solution

Route all queries through the enhanced pool to have a single, consistent data-fetching path while maintaining the smart routing logic.

Benefits

  • Simplified architecture
  • Consistent query behavior
  • Easier debugging and maintenance
  • Single source of truth for query logic

Implementation

  • Modify the enhanced pool to handle both NIP-29 and NIP-72 queries
  • Remove the fallback to baseNostr provider
  • Ensure backward compatibility
  • Test thoroughly to ensure no regressions

Files Affected

  • src/components/EnhancedNostrProvider.tsx

Tags: #nip29

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingNIP 29

    Type

    No type
    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