Skip to content

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

Merged
dadiorchen merged 1 commit into
Greenstand:mainfrom
samwel141:fix/token-page-missing-data-clean
Jul 14, 2026
Merged

dadiorchen merged 1 commit into
Greenstand:mainfrom
samwel141:fix/token-page-missing-data-clean

Conversation

@samwel141

@samwel141 samwel141 commented Jul 6, 2026 •

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

@dadiorchen dadiorchen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@samwel141
samwel141 marked this pull request as ready for review July 14, 2026 10:00
@samwel141
samwel141 requested a review from dadiorchen July 14, 2026 10:00
@samwel141

Copy link
Copy Markdown
Contributor Author

Looks good to me

Okay, thanks. I converted it to ready to merge PR so we can proceed to our main issue

@dadiorchen
dadiorchen merged commit 215bbbb into Greenstand:main Jul 14, 2026
3 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.9.11 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@samwel141
samwel141 deleted the fix/token-page-missing-data-clean branch July 15, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants