Skip to content

Conversation

janek26
Copy link
Contributor

@janek26 janek26 commented Oct 9, 2025

Adds Platform API integration for asset balances

Fixes BX-2026
Fixes BX-2027

What changed (plus any additional context for devs)

  • Added a new Platform API integration for fetching asset balances
  • Created a new HTTP client for the Platform API with proper authentication
  • Implemented conversion utilities to transform Platform API responses to our existing format
  • Updated the user assets query function to use the new Platform API
  • Added TypeScript types for the Platform API responses
  • Added environment variable for Platform API key

What to test

  • Verify that asset balances are correctly fetched and displayed using the new Platform API
  • Check that stale balances are properly handled with the new implementation
  • Ensure that error handling works correctly when the Platform API fails
  • Confirm that the conversion from Platform API response format to our existing format preserves all necessary data
  • Test that chain-specific asset queries work properly with the new implementation

PR-Codex overview

This PR introduces support for a new platformValue feature in the asset management system, allowing for additional asset pricing information from a new API. It updates various components, types, and utilities to integrate this feature seamlessly.

Detailed summary

  • Added PLATFORM_API_KEY to .env.example and .env.d.ts.
  • Introduced platformHttp in src/core/network/platform.ts.
  • Updated ParsedUserAsset interface to include platformValue.
  • Enhanced asset parsing functions to handle platformValue.
  • Modified asset-related tests to validate platformValue.
  • Updated UI components to display platformValue prominently.
  • Created utility functions for comparing platform and calculated values.
  • Integrated API calls to fetch asset updates from the new platform API.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@janek26
Copy link
Contributor Author

janek26 commented Oct 9, 2025

Copy link

sentry-io bot commented Oct 9, 2025

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: src/core/resources/assets/userAssets.ts

Function Unhandled Issue
userAssetsQueryFunction Error: HTTP Client Error with status code: 502 /p...
Event Count: 1 Affected Users: 14
userAssetsQueryFunction Error: HTTP Client Error with status code: 504 /p...
Event Count: 1 Affected Users: 1

@janek26 janek26 marked this pull request as ready for review October 9, 2025 13:06
Copy link

linear bot commented Oct 9, 2025

@janek26 janek26 force-pushed the feature/plattform-assets branch 2 times, most recently from b35cbe2 to c0f357c Compare October 10, 2025 12:45
@@ -0,0 +1,110 @@
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
Copy link
Collaborator

Choose a reason for hiding this comment

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

directory name mismatch

Copy link
Collaborator

@DanielSinclair DanielSinclair left a comment

Choose a reason for hiding this comment

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

Seeing a few errors (tested up to the transaction migration in the stack):

Image Image

Token data doesn't look prod ready; think we need to hold-off on this until the backend endpoint is more usable

Token values/filtering and frontend handling:
Image
Image

Chart smoothing looks like there is an issue (I think this explains the SVG error):
Image
Image

@janek26 janek26 force-pushed the feature/plattform-assets branch 2 times, most recently from cf6a6f8 to 867257a Compare October 15, 2025 13:47
@janek26 janek26 force-pushed the feature/plattform-assets branch from 867257a to e5c0258 Compare October 15, 2025 14:39
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.

2 participants