| | |
| | | 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() |