Skip to main content
Version: Next

Function: onAccountChange()

onAccountChange(swo, callback): void

Defined in: src/wallet/connect.ts:147

Attaches an event handler function to the "accountsChanged" event of a StarknetWindowObject. When the accounts are changed, the specified callback function will be called.

Parameters

swo

StarknetWindowObject

The StarknetWindowObject to attach the event handler to.

callback

AccountChangeEventHandler

The function to be called when the accounts are changed. It will receive the changed accounts as a parameter.

Returns

void