fix(statics): correct Avalanche C-Chain entries in LEGACY_CHAIN_ID_MAP#8796
Open
sachinBitgo wants to merge 1 commit into
Open
fix(statics): correct Avalanche C-Chain entries in LEGACY_CHAIN_ID_MAP#8796sachinBitgo wants to merge 1 commit into
sachinBitgo wants to merge 1 commit into
Conversation
eca367b to
e8db837
Compare
Chain IDs 43114 and 43113 were mapped to 'avax' and 'tavax' respectively, but the registered coin names are 'avaxc' and 'tavaxc'. Any call to CoinMap.fromChainId() for these chain IDs would throw CoinNotDefinedError. Adds a unit test asserting that coinNameFromChainId(43114) returns 'avaxc' and coinNameFromChainId(43113) returns 'tavaxc', and that coins.get() succeeds for both. Ticket: CGD-726 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Session-Id: 6ec5a14f-c3aa-46ed-8177-39e4fc4263cd Task-Id: 1d9f9835-f70a-4605-9a03-d95971816e49
4704dc0 to
fdd06f5
Compare
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.
Summary
LEGACY_CHAIN_ID_MAPin@bitgo/staticswhere Avalanche C-Chain chain IDs43114and43113were mapped to'avax'and'tavax'— names that do not exist in the coin registry. Corrected to'avaxc'and'tavaxc'.CoinMap.coinNameFromChainId(43114)orcoinNameFromChainId(43113)previously returned a dangling name that causedCoinNotDefinedErrorwhen passed tocoins.get().LEGACY_CHAIN_ID_MAPand asserts the resolved coin name exists inCoinMap, preventing silent re-introduction of dangling references in future edits.Test plan
yarn unit-test --scope @bitgo/staticspasses, including the two newcoinNameFromChainIdtest casescoins.coinNameFromChainId(43114)returns'avaxc'andcoins.get('avaxc')succeedscoins.coinNameFromChainId(43113)returns'tavaxc'andcoins.get('tavaxc')succeedsTicket: CGD-726
🤖 Generated with Ralph