WalletAccountsChanged

This event is triggered when the address in the wallet is changed

The event return following parameters

// JavaScript

detail: {
    id: 'WalletAccountsChanged', // event name
    wallet: 'MetaMask',
    accounts: []
}

Using

// JavaScript

window.addEventListener("WalletAccountsChanged", (event) => {
    console.log(event.detail.id, event.detail.wallet, event.detail.accounts)
})

Last updated