-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
update chain on network change #2497
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
packages/solana/src/client.ts
Outdated
@@ -244,11 +244,17 @@ export class Web3Modal extends Web3ModalScaffold { | |||
this.syncNetwork(chainImages) | |||
}) | |||
|
|||
NetworkController.subscribeKey('caipNetwork', () => { | |||
NetworkController.subscribeKey('caipNetwork', (newCaipChain: CaipNetwork | undefined) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for aligning naming, could we make it newCaipNetwork?
NetworkController.subscribeKey('caipNetwork', (newCaipChain: CaipNetwork | undefined) => { | |
NetworkController.subscribeKey('caipNetwork', (newCaipNetwork: CaipNetwork | undefined) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I guess you don't have to set type definitions since subscribeKey
should already been set the type of the parameter.
NetworkController.subscribeKey('caipNetwork', (newCaipChain: CaipNetwork | undefined) => { | |
NetworkController.subscribeKey('caipNetwork', (newCaipChain) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments @glitch-txs 🙏🏽
Breaking Changes
N/A
Changes
Associated Issues
closes #...