-
- monitoring localStorage
-
- listening for web3.js actions: "accountsChanged" !returns only the first connection
-
- waiting for global variables
-
- use one (or all) of the global variables
window.mrZLab630.ethWalletConnectTracking.localStorage()
window.mrZLab630.ethWalletConnectTracking.eth()
window.mrZLab630.ethWalletConnectTracking.interval()
-
- the result will be in
window.mrZLab630.ethWalletConnectTracking.wallet
-
- example of result tracking:
let getWallet = window.setInterval(() =>{
const wallet = window.mrZLab630.ethWalletConnectTracking.wallet
if(wallet?.value){
console.log('gotcha!', wallet)
if (getW !== undefined) {
clearInterval(getWallet)
}
}
}, 1000)