-
I am using @wagmi/core V2 with Angular 16. I have used this code but not able to update my variable inside onChange method. How can I do it?
|
Beta Was this translation helpful? Give feedback.
Answered by
Rubanrubi
Jun 21, 2024
Replies: 1 comment 2 replies
-
@here IS there anyone can help me out? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Nilbristi
this.unwatch = watchAccount(wagmiConfig, {
onChange: (data) => {
console.log('Account changed!', data);
if (data.address != undefined) {
this.getUser(data.address);
}
const chains = wagmiConfig.chains
const chain = chains.find(chain => chain.id === data.chainId)