Skip to content

feat: filter and ping only current node stamps#117

Open
0xCardiE wants to merge 1 commit intomainfrom
filter_stamps_per_node
Open

feat: filter and ping only current node stamps#117
0xCardiE wants to merge 1 commit intomainfrom
filter_stamps_per_node

Conversation

@0xCardiE
Copy link
Collaborator

Fix: Filter stamps by node address

Problem

When viewing the stamp list, the app was pinging all stamps owned by the wallet regardless of which Swarm node they were created for. This caused:

  • 403/404 errors when querying stamp details from the Bee API for stamps belonging to different nodes
  • Confusion when users had stamps across multiple nodes (e.g., production vs test)

Root Cause

The getOwnerBatches() contract call returns all stamps for a wallet address, including the nodeAddress each stamp was created for. However, the stamp list was not filtering by this field before making API calls to the current Bee node.

Solution

Added filtering logic to StampListSection to only display stamps that match the currently connected node:

  1. Added nodeAddress prop to StampListSection component
  2. Filter batches from smart contract by comparing batch.nodeAddress with the current nodeAddress
  3. Only make Bee API calls for stamps that belong to the current node

Changes

  • src/app/components/StampListSection.tsx - Added node address filtering before API calls
  • src/app/components/SwapComponent.tsx - Pass nodeAddress prop to StampListSection

Result

  • ✅ Stamp list only shows stamps for the currently connected node
  • ✅ No more unnecessary API calls for stamps on other nodes
  • ✅ Eliminates 403/404 errors from querying wrong node
  • ✅ Console logging shows filtered stamps for debugging

@0xCardiE 0xCardiE changed the title filter and ping only current node stamps feat: filter and ping only current node stamps Feb 11, 2026
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.

1 participant