Skip to content

attached: filter EVM chains with invalid native currency symbol#412

Open
Ryz0nd wants to merge 1 commit into
developfrom
attached-filter-invalid-eth-chains
Open

attached: filter EVM chains with invalid native currency symbol#412
Ryz0nd wants to merge 1 commit into
developfrom
attached-filter-invalid-eth-chains

Conversation

@Ryz0nd
Copy link
Copy Markdown
Member

@Ryz0nd Ryz0nd commented May 14, 2026

Summary

OkoEIP1193Provider validates every chain's nativeCurrency.symbol against a
1-8 character constraint (validateNativeCurrencySymbol in
sdk/oko_sdk_eth/src/utils/utils.ts). If a single chain fails, the constructor
throws and the entire EVM provider fails to initialize — breaking getAccounts
and downstream wallet flows for every integrator, even on chains they don't use.

The Keplr chain registry currently exposes two EVM entries whose coinDenom
exceeds 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() on
app.civitia.org, which surfaced as Oko "not loading" before Google sign-in.

This hotfix filters such chains out inside handleGetEthChain so they never
reach the SDK validator. Only attached.oko.app needs 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.

@Ryz0nd Ryz0nd force-pushed the attached-filter-invalid-eth-chains branch from 2915049 to 70a54d9 Compare May 14, 2026 09:10
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