📜  元掩码事件断开连接 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:15.593000             🧑  作者: Mango

代码示例1
web3.ethereum.on("accountsChanged", accounts => {
  if (accounts.length > 0)
    console.log(`Account connected: ${accounts[0]}`);
  else
    console.log("Account disconnected");
});