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

(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
请先 登录 后评论
  • 1 关注
  • 0 收藏,3142 浏览
  • 提出于 2022-04-15 23:13