From f4cd10c3462b4482958d8f6bb816de306434b97f Mon Sep 17 00:00:00 2001 From: queenwuli <942534046@qq.com> Date: Tue, 22 Mar 2022 16:47:45 +0800 Subject: [PATCH] gx --- src/pages/index/index.vue | 15 +++++---------- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index f9d6a38..81aa587 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -113,17 +113,12 @@ infuraId: '27e484dcd9e3efcfd25a83a78777cdf1', bridge: "https://bridge.walletconnect.org", })) + let walletAddress = ref(''); async function initWalletConnect() { - let tronWeb = window.tronWeb; - alert(tronWeb) - // const web3 = new Web3(provider); - // const accounts = await web3.eth.getAccounts(); - // console.log(accounts) - // web3.eth.getAccounts().then((res) => { - // alert(res) - // }).catch((err) => { - // alert(err) - // }); + if(window.tronWeb){ + walletAddress = window.tronWeb.defaultAddress.base58; + alert(walletAddress) + } } onMounted(() => { initWalletConnect() -- Gitblit v1.9.1