Hi everyone.
Iām trying to follow along with the āCloning Rarible in 24hā tutorial on the Moralis YouTube. I have very little experience in programming though I know my way around some HTML.
I followed the first episode and when it came to loading up the website on localhost:8000 using Python, I see both the āConnect Walletā and āProfileā buttons. The buttons do not work in the Brave Browser to invoke the Ethereum wallet.
Iāve triple checked my code and my console in VS Code throws no errors. Am hoping someone can point me in the right direction? Maybe I didnāt install some prerequisite?
Hereās the code I have in my editor. Thanks in advance.
Moralis.initialize("-redacted-");
Moralis.serverURL = '-redacted-'
init = async () => {
window.web3 = await Moralis.Web3.enable();
initUser();
}
initUser = async () => {
if (await Moralis.User.current()){
hideElement(userConnectButton);
showElement(userProfileButton);
}else{
showElement(userConnectButton);
hideElement(userProfileButton);
}
}
login = async () => {
try {
await Moralis.Web3.authenticate();
initUser();
} catch (error) {
alert(error)
}
}
hideElement = (element) => element.style.display = "none";
showElement = (element) => element.style.display = "block";
const userConnectButton = document.getElementById("btnConnect");
userConnectButton.onclick = login;
const userProfileButton = document.getElementById("btnUserInfo");
init();