Fix for issue #1791: by pretty printing mangled platform_map codeblock in seed-canonical-heads.mjs - #1792
Open
drQedwards wants to merge 3 commits into
Open
Fix for issue #1791: by pretty printing mangled platform_map codeblock in seed-canonical-heads.mjs#1792drQedwards wants to merge 3 commits into
drQedwards wants to merge 3 commits into
Conversation
Mangled code block now looks readable.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 036802d. Configure here.
This resolves Cursor’s bug it caught while maintaining form .
Author
|
See? The bug is resolved. As I mentioned, issue #1792 only gets resolved and closed after merging this PR . Only then can the bigger issue of the mismatch error in the metadata and labeling directories for bip122 Bitcoin can be fixed and addressed. |
Author
|
It is Bip122 not bip110 🙄 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Mangled platform_map code block now looks readable with its canonical constants to align and look like the constants for the canonical_head_group code block.
this closes and resolves issue #1791 only after this PR gets merged.
Only then can we begin fixing the issues we the mismatch errors in CAIP-2 in the metadata and labels directory when it comes to bip122, aka bitcoin having a mismatch where it is labeled in the metadata directory coherently, but not coded in the labels.
Note
Medium Risk
TypeScript syntax (
as const, type annotations) in a.mjsfile may break running the seed script with plain Node unless another runner is used; platform lookup behavior is equivalent for existing entries but warns on misses.Overview
Reformats
PLATFORM_MAPinscripts/seed-canonical-heads.mjsfrom a compact object keyed by CoinGecko platform names to an explicit array of{ platform, caip2, assetNamespace }entries, styled likeCANONICAL_HEAD_GROUPS.platformToCaip19is moved above the canonical-head constants and now resolves platforms viaPLATFORM_MAP.find()instead of bracket lookup; unknown platforms still returnnullbut alsoconsole.warn. The same chain/namespace values are preserved.The diff also adds TypeScript-style annotations (
as const, parameter/return types, typedsummaryarray) and minor formatting tweaks inseed(); there is no change to canonical-head groups or label read/write logic.Reviewed by Cursor Bugbot for commit 4c9f9b5. Bugbot is set up for automated code reviews on this repo. Configure here.