WalletDisconnected

The event will fire when the user disconnect the wallet

The event return following parameters

// JavaScript

detail: {
    id: 'WalletDisconnected', // event name
    wallet: 'MetaMask'
}

Using

// JavaScript

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

Last updated