fix(asset-tagging): correct UTXO coins incorrectly tagged as Smart Chain#244
fix(asset-tagging): correct UTXO coins incorrectly tagged as Smart Chain#244
Conversation
- Updated CoinSubClass.parse() to prioritize exact enum name matches - Added separate phase for exact ticker matches to resolve ambiguity - Changed formatted getter for utxo to return 'Native' instead of 'UTXO' - This fixes UTXO coins (zcash, ltc, doge) being incorrectly categorized as Smart Chain Both utxo and smartChain had the same ticker 'UTXO', causing the parser to match smartChain first due to enum order. The new parsing logic ensures 'UTXO' from coins_config.json correctly maps to CoinSubClass.utxo.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes asset chain tagging for UTXO coins that were being incorrectly classified as Smart Chain. The changes improve the matching logic by prioritizing exact matches and updates the display name for UTXO coins from "UTXO" to "Native".
Key Changes:
- Implements a three-tier matching strategy: exact enum name match, exact ticker match, then partial contains match
- Changes the UTXO display name from "UTXO" to "Native"
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Visit the preview URL for this PR (updated for commit ec40963): https://komodo-playground--pr244-fix-asset-chain-tagg-qvyrj2b5.web.app (expires Sat, 25 Oct 2025 17:18:46 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 2bfedd77fdea45b25ba7c784416e81f177aa5c47 |
|
Visit the preview URL for this PR (updated for commit ec40963): https://kdf-sdk--pr244-fix-asset-chain-tagg-j7j75tx8.web.app (expires Sat, 25 Oct 2025 17:17:47 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 9c1b6e6c010cf0b965c455ba7a69c4aedafa8a1d |
- smartChain.ticker -> SMART_CHAIN\n- Sanitize ticker for exact/partial matches\n- Restore partial ticker matching\n- Prefer utxo on exact "UTXO"\n- Catch StateError and deduplicate enum name extraction





Fixes incorrect asset chain tagging for UTXO coins. Ensures proper classification to avoid Smart Chain mislabeling. No breaking API changes.
Note
Prioritizes exact enum/ticker matching in CoinSubClass.parse and fixes smartChain/utxo identifiers to prevent UTXO mislabeling.
coin_subclasses.dart):utxo._enumNameLowerhelper and refine partial-match checks (sanitized ticker).tryParseto catchStateErroronly; update docs to reflect precedence.smartChain.tickernow returnsSMART_CHAIN(wasUTXO).utxo.formattednow returnsNative(wasUTXO).Written by Cursor Bugbot for commit ec40963. This will update automatically on new commits. Configure here.