Remove builtin tokens#1034
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable autofix in the Cursor dashboard.
| const enabledTokens = settings.enabledTokens[pluginId] ?? [] | ||
|
|
||
| for (const tokenId of Object.keys(builtinTokens)) { | ||
| const token = builtinTokens[tokenId] |
There was a problem hiding this comment.
Custom tokens listed twice in CLI command
Medium Severity
Both for loops now iterate over customTokens, causing every custom token to be printed twice — once without the "(custom)" label and once with it. The first loop was originally for builtinTokens and the second for customTokens, but after the removal the first loop wasn't deleted, it was just retargeted to customTokens.
| "clipanion": "^4.0.0-rc.2", | ||
| "crypto-browserify": "^3.12.0", | ||
| "edge-core-js": "^2.42.0", | ||
| "edge-core-js": "file:../edge-core-js", |
There was a problem hiding this comment.
Local file path for edge-core-js dependency committed
High Severity
The edge-core-js dependency was changed from "^2.42.0" to "file:../edge-core-js", which is a local filesystem path. This will break builds for anyone who doesn't have the edge-core-js repo checked out as a sibling directory, including CI and other developers.
| networkLocation: { | ||
| contractAddress: 'eosio.token' | ||
| } | ||
| } |
There was a problem hiding this comment.
EOS native token entry lost on custom token changes
High Severity
The eosio.token entry is added to allTokensMap in the constructor, but allTokensMap is reassigned to a fresh object whenever changeCustomTokensSync runs. Since the EOS engine doesn't override that method, any runtime custom token update will discard the eosio.token entry, breaking native currency transaction processing (it won't find the contract address).
| async function getBuiltinTokens(): Promise<EdgeTokenMap> { | ||
| return builtinTokens | ||
| } | ||
| function updateBuiltinTokens(payload: JsonObject = {}): void {} |
There was a problem hiding this comment.
Empty updateBuiltinTokens function is dead code
Low Severity
updateBuiltinTokens is now an empty function body but is still called in two places (on initial plugin creation and after updateInfoPayload). This dead code adds unnecessary noise and confusion about whether builtin token processing still occurs.
Consumers can no longer rely on the presence of builtinTokens to determine token support
b32b302 to
0132641
Compare


CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
noneDescription
noneNote
Medium Risk
Touches shared token-resolution and URI/denomination logic across many currency plugins; regressions could cause token codes/amounts to fail to resolve or parse correctly, especially for previously built-in tokens.
Overview
Removes
builtinTokenssupport end-to-end. The plugin framework (makeOuterPlugin/PluginEnvironment) no longer carries or exposes builtin token maps, and token utilities (makeMetaTokens, token-id helpers, info-server token ingestion) are deleted.Currency tools/engines are updated to stop referencing builtin tokens when parsing/encoding URIs and resolving denominations (including
getLegacyDenominationnow checking only primary currency + provided legacy/custom tokens). Numerous*Info.tsfiles drop hardcoded token lists andmetaTokenswiring; CLI commands (get-balance,list-tokens) now operate only onsettings.customTokens.Written by Cursor Bugbot for commit b32b302. This will update automatically on new commits. Configure here.