EVMWatcherCallbacks
Defined in: satellite-evm/src/utils/createEVMConnectionsWatcher.ts:19
Store state and actions used by createEVMConnectionsWatcher. Pass the store’s disconnect and
updateActiveConnection and its getState, so the watcher always reads the current state. Instead of getState
you can pass the current activeConnection and connectionError; they are then read once, when the watcher is
created.
Properties
activeConnection?
optionalactiveConnection?:EVMConnection
Defined in: satellite-evm/src/utils/createEVMConnectionsWatcher.ts:21
The active connection when the watcher is created. Ignored when getState is passed.
connectionError?
optionalconnectionError?:string|TuwaErrorState
Defined in: satellite-evm/src/utils/createEVMConnectionsWatcher.ts:32
The store’s connectionError when the watcher is created. While it is set, wallet changes are not copied to the
store. Ignored when getState is passed.
disconnect
disconnect: (
connectorType) =>void
Defined in: satellite-evm/src/utils/createEVMConnectionsWatcher.ts:27
Disconnects a connection; the store’s disconnect.
Parameters
connectorType
ConnectorType
The connector to disconnect.
Returns
void
getState?
optionalgetState?: () =>object
Defined in: satellite-evm/src/utils/createEVMConnectionsWatcher.ts:45
Returns the current store state, for example the store’s getState. The watcher calls it when it starts and on
every wagmi event, so it does not have to be recreated when the active connection or the error changes.
Returns
The current activeConnection and connectionError.
activeConnection?
optionalactiveConnection?:EVMConnection
The active connection.
connectionError?
optionalconnectionError?:string|TuwaErrorState
The connection error.
updateActiveConnection
updateActiveConnection: (
connection) =>void
Defined in: satellite-evm/src/utils/createEVMConnectionsWatcher.ts:38
Merges fields into the active connection; the store’s updateActiveConnection.
Parameters
connection
Partial<EVMConnection>
Fields to merge.
Returns
void