钱包怎么连接到波场dapp并监听到他的交易事件

匿名用户 提出于 2022-04-15 23:13 4734 浏览
(function() {
            if (window.tronLink) {
                    console.log(window.tronLink,'tronLink初始化')
                  handleTronLink();
                } else {
                  window.addEventListener('tronLink#initialized', handleTronLink, {
                    once: true,
                  });
                
                  // If the event is not dispatched by the end of the timeout,
                  // the user probably doesn't have TronLink installed.
                  setTimeout(handleTronLink, 3000); // 3 seconds
                }
                
                function handleTronLink() {
                  const { tronLink } = window;
                  if (tronLink) {
                    console.log('tronLink successfully detected!');
                    // Access the decentralized web!
                  } else {
                    console.log('Please install TronLink-Extension!');
                  }
                }
           
        
        })();
        """

用了tronlink插件试了下,一直注入错误,Please install TronLink-Extension 有老哥做过吗,有偿请教

1 个回答

joy 2022-04-15 23:14

写回答

你需要登录后才可以回答问题,登录