fix(coins): correct EIP-55 checksum of USDT0 on Rootstock - #283
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: f503760 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Merged
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.
Problem
The USDT0 entry for Rootstock (
ChainId.RSK, chain 30) carries an address whose mixed-casecasing is not a valid EIP-55 checksum:
The same token on
ChainId.STA(a few lines below,src/coins/coins.ts) already uses thecorrect casing, so this is a one-off typo rather than an upstream address difference.
Consumers that pass the value straight through to a service comparing addresses verbatim get
a hard failure instead of a silent normalisation. Against the LI.FI API:
findDefaultToken(CoinKey.USDT0, ChainId.RSK)is also whatSTABLECOIN_COIN_KEYS-style resolution lands on for Rootstock, since the chain has nocanonical USDC/USDCe/BUSD/USDG/USDB/USDe entry — so every quote built against the default
Rootstock stablecoin 404s today.
Change
casing differs.
src/coins/coins.unit.spec.ts, an offline spec asserting every EVM token address indefaultCoinsandwrappedTokenspassesviem'sisAddress(…, { strict: true }).All-lowercase addresses carry no checksum and stay valid, so the existing data is
unaffected — only mis-cased addresses fail.
I audited the whole
src/tree: this was the only address of 722 with a broken checksum.Verification
The new spec fails before the data fix and passes after:
Changeset:
patch(data fix).