Created
December 25, 2019 23:37
-
-
Save vlzhr/1d919020bf5ff02b447858caf97f8bd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelector(".js-login").addEventListener("click", async function(event) { | |
try { | |
const userData = await waves.login(); // calling Waves Signer | |
event.target.classList.add("clicked"); | |
event.target.innerHTML = ` | |
authorized as <br> | |
${userData.address}`; // getting account address | |
} catch (e) { | |
console.error('login rejected') // handling user auth reject | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment