Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connector onNetworkChanged function doesn't support text chainIds #552

Open
dhruv035 opened this issue Jan 9, 2025 · 1 comment
Open
Labels

Comments

@dhruv035
Copy link

dhruv035 commented Jan 9, 2025

The InjectedConnector onNetworkChanged handler throws an error if I have my wallet network chainId set as 'SN_SEPOLIA' instead of a bigint, it would make sense to parse said string on the connector if configured like so on the wallets

@fracek
Copy link
Contributor

fracek commented Jan 9, 2025

It used to do this, but AFAIK the new wallet spec specifies that the chainId argument should be an hex-encoded chain id.

https://github.com/starknet-io/types-js/blob/229373398097b9bd85c3d7a42443d1b7310f258b/src/wallet-api/events.ts#L4-L10

@fracek fracek added the bug label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@fracek @dhruv035 and others