Skip to content

fix: correct DeBank portfolio asset type mappings - #285

Merged
Vinsho merged 1 commit into
masterfrom
fix/debank-asset-types
Sep 11, 2026
Merged

Vinsho merged 1 commit into
masterfrom
fix/debank-asset-types

Conversation

@Vinsho

@Vinsho Vinsho commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

📝 Summary

  • Map valid DeBank portfolio names to supported asset types instead of logging errors and falling back implicitly.
  • Classify leveraged-farming borrow legs as debt and NFT-staking rewards as rewards.
  • Preserve locked handling for NFT fractions, which are not modeled as NFTs by the current parser.

🔍 Review

Recommendation: 🟡 Focused review — the change is localized, but leveraged-farming debt classification affects portfolio value signs downstream.

⚠️ Review carefully:

  • blockapi/v2/api/debank.py:_get_borrow_asset_type — leveraged-farming borrow legs must remain debt rather than positive farming balances.
  • blockapi/v2/api/debank_maps.py:DEBANK_ASSET_TYPES — provider names must preserve the intended locked/reward grouping.

✅ Verification

Confidence: 🟢 Fully verified — parser-shape regressions cover leveraged farming and NFT staking; all non-integration DeBank tests and formatting hooks pass.

@Vinsho Vinsho changed the title Fix DeBank portfolio asset type mappings fix: correct DeBank portfolio asset type mappings Sep 10, 2026
@Vinsho
Vinsho requested a review from zbynekmasler September 10, 2026 15:00
@Vinsho Vinsho self-assigned this Sep 10, 2026
@zmaslerdev

Copy link
Copy Markdown
Contributor

Approved

@Vinsho
Vinsho merged commit 1ee1f99 into master Sep 11, 2026
5 of 6 checks passed
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