Skip to content

Fix for issue #1791: by pretty printing mangled platform_map codeblock in seed-canonical-heads.mjs#1792

Open
drQedwards wants to merge 2 commits intoMetaMask:masterfrom
drQedwards:master
Open

Fix for issue #1791: by pretty printing mangled platform_map codeblock in seed-canonical-heads.mjs#1792
drQedwards wants to merge 2 commits intoMetaMask:masterfrom
drQedwards:master

Conversation

@drQedwards
Copy link
Copy Markdown

@drQedwards drQedwards commented Apr 23, 2026

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

High Risk
Changes the seeding script’s platform-to-CAIP mapping structure and lookup logic, which can affect how CAIP-19 IDs are generated and written to label files. It also introduces TypeScript-style annotations in a .mjs script, which may break runtime execution if the script is run directly by Node without transpilation.

Overview
Refactors scripts/seed-canonical-heads.mjs to make the CoinGecko PLATFORM_MAP readable by converting it from an object lookup into an array and updating platformToCaip19 to use .find() (with a new warning when a platform has no mapping).

Adds type annotations and minor log/summary formatting tweaks while keeping the seeding behavior the same otherwise (creating/updating canonicalHead entries in label JSON files).

Reviewed by Cursor Bugbot for commit 2d65f8c. Bugbot is set up for automated code reviews on this repo. Configure here.

Mangled code block now looks readable.
@drQedwards drQedwards requested review from a team and MRabenda as code owners April 23, 2026 04:05
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread scripts/seed-canonical-heads.mjs Outdated
This resolves Cursor’s bug it caught while maintaining form .
@drQedwards
Copy link
Copy Markdown
Author

B
IMG_0607

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.

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.

1 participant