Created
May 18, 2021 05:58
-
-
Save tpmccallum/29d2db0765f273075c0de183bb0a170c to your computer and use it in GitHub Desktop.
Javascript for simple_dapp_001
This file contains hidden or 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
function getBalance() { | |
var address, wei, balance | |
address = document.getElementById("account_address_input").value; | |
console.log(address); | |
try { | |
web3.ss.getBalance(address, function(error, wei) { | |
if (!error) { | |
document.getElementById("account_address_output_wei").innerHTML = wei + " Wei"; | |
} | |
}); | |
} catch (err) { | |
console.log(err); | |
document.getElementById("account_address_output").innerHTML = err; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment