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 · 4 comments
Open

Connector onNetworkChanged function doesn't support text chainIds #552

dhruv035 opened this issue Jan 9, 2025 · 4 comments
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
@ShantelPeters
Copy link

Please can I work on this @fracek

@fracek
Copy link
Contributor

fracek commented Jan 13, 2025

Hey @dhruv035 what wallet is emitting the old chain id? So that I can test it.

@dhruv035
Copy link
Author

dhruv035 commented Jan 16, 2025

Hey sorry I missed this comment, I was using Argent wallet, it may have been an older version admittedly but I think backwards support for it would make sense still. Sorry for the late response kinda lost this comment in mail among the so many others on the other issue

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

4 participants
@fracek @dhruv035 @ShantelPeters and others