attached: filter EVM chains with invalid native currency symbol#412
Open
Ryz0nd wants to merge 1 commit into
Open
attached: filter EVM chains with invalid native currency symbol#412Ryz0nd wants to merge 1 commit into
Ryz0nd wants to merge 1 commit into
Conversation
2915049 to
70a54d9
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
OkoEIP1193Providervalidates every chain'snativeCurrency.symbolagainst a1-8 character constraint (
validateNativeCurrencySymbolinsdk/oko_sdk_eth/src/utils/utils.ts). If a single chain fails, the constructorthrows and the entire EVM provider fails to initialize — breaking
getAccountsand downstream wallet flows for every integrator, even on chains they don't use.
The Keplr chain registry currently exposes two EVM entries whose
coinDenomexceeds the limit:
eip155:1611— NVNM Mainnet EVM (MANTRAUSD, 9 chars)eip155:787111— NVNM Testnet EVM (MANTRAUSD, 9 chars)These were enough to crash
OkoEthWallet.getEthereumProvider()onapp.civitia.org, which surfaced as Oko "not loading" before Google sign-in.This hotfix filters such chains out inside
handleGetEthChainso they neverreach the SDK validator. Only
attached.oko.appneeds to be redeployed —integrators do not need to ship a new SDK build. A follow-up that hardens the
SDK itself (skipping invalid chains rather than rejecting the whole provider)
can land separately.