You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Medium Risk
Changes the JSON schema used to unmarshal DeFi positions (renamed fields and nested token objects), so incorrect mapping would silently affect displayed balances/values; adds strong unit coverage to mitigate but existing integration tests may need updates for renamed JSON keys.
Overview
Updates sim evm defi-positions to match the latest defi-positions API response schema by renaming value fields (e.g. usd_value/total_usd_value -> value_usd/total_value_usd), adding chain, and switching from flat token metadata fields to nested token objects (token, underlying_token, token0, token1) including new fields like lending_pool, pool_id, salt, and NFT per-token details.
Adjusts positionDetails formatting to read symbols from the nested token structs via a new tokenSymbol helper, and adds a comprehensive unit test that unmarshals a real API JSON payload to ensure all supported position types (Erc4626/Tokenized/UniswapV2/Nft/NftV4) decode correctly, including null logos and aggregation breakdowns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current implementation is assuming outdated response payload