You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
window.tronWeb.defaultAddress.base58 is giving false, and for new address tronlink extention is not opening to initiate a new connection and get default address data.
i am using tronweb 6.0 from cdn for javascript in php project.
// code function
let checkWalletInterval = setInterval(async () => {
if (window.tronWeb && window.tronWeb.defaultAddress.base58) {
tronWeb = window.tronWeb;
console.log("TronWeb is connected:", tronWeb.defaultAddress.base58);
// Set the wallet address to display on the UI
document.getElementById("txtwalletaddress").value = tronWeb.defaultAddress.base58;
clearInterval(checkWalletInterval);
} else {
console.log("Waiting for TronLink to be connected...");
}
}, 1000);
The text was updated successfully, but these errors were encountered:
You have to connect to tronlink extension before you can get the address. I recommend you to use TronWallet Adapter. That is convenient to connect with less code. If you don't want to use it, please use code below to connect:
window.tronWeb.defaultAddress.base58 is giving false, and for new address tronlink extention is not opening to initiate a new connection and get default address data.
i am using tronweb 6.0 from cdn for javascript in php project.
// code function
let checkWalletInterval = setInterval(async () => {
if (window.tronWeb && window.tronWeb.defaultAddress.base58) {
tronWeb = window.tronWeb;
The text was updated successfully, but these errors were encountered: