watchSigner
Action for subscribing to Signer changes.
import { watchSigner } from '@wagmi/core'
Usage
By default, the callback will be invoked when Provider changes.
import { watchSigner } from '@wagmi/core'
const unwatch = watchSigner(
{
chainId: 1,
},
(provider) => console.log(provider),
)
Configuration
chainId (optional)
Force a specific chain id for the Signer.
import { watchSigner } from '@wagmi/core'
const unwatch = watchSigner(
{
chainId: 1,
},
(provider) => console.log(provider),
)