Skip to content

fix: improve token page handling for missing data and enhance error logging - #1833

Closed
samwel141 wants to merge 3 commits into
Greenstand:mainfrom
samwel141:fix/token-page-missing-data-logging
Closed

samwel141 wants to merge 3 commits into
Greenstand:mainfrom
samwel141:fix/token-page-missing-data-logging

Conversation

@samwel141

Copy link
Copy Markdown
Contributor

Description

Handle token detail pages more safely when the API returns partial token data.

This fixes the token page so it does not fail when a token has missing linked data such as:

  • tree_id: null
  • missing planter data

It also prevents broken navigation such as linking to /trees/null.

Related to Greenstand/treetracker-wallet-app#784

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

Not applicable.

How Has This Been Tested?

  • Cypress integration
  • Cypress component tests
  • Jest unit tests

Manual verification:

  • Ran the web map locally against local query-api and local web-map-api
  • Verified the token route now renders for a token with missing linked tree data:
    http://localhost:3002/wallets/0faf4970-ac66-4bbc-a68a-c1e1881211fc/tokens/dd3d75f0-4fa3-403c-9e2b-5c322aa18b45
  • Verified the page no longer requests /trees/null
  • Verified the page no longer renders a broken /trees/null link
  • Verified missing planter data now falls back gracefully instead of crashing the page

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@samwel141

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #1834, which is the clean upstream-based one-commit PR.

@samwel141 samwel141 closed this Jul 6, 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