NewWalletConnected

The event will fire when the user connects the wallet using the getAccount function

The event return following parameters:

// JavaScript

detail: {
    id: 'NewWalletConnected', // event name
    wallet: 'MetaMask', // 
    chainId: '', // 
    account: [], // 
}

Using:

// JavaScript

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

Last updated