diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-04 21:20:16 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-04 21:20:16 +0800 |
commit | 09841b1c9b2553a4572590128580df37c8fa83ad (patch) | |
tree | 42a846801bde7d8f7edc5ec07ccbba7806261128 /cmd/ethtest/example/index.html | |
parent | bd0c267cbe9db805b5a272d29ef8860c62ddafe5 (diff) | |
download | go-tangerine-09841b1c9b2553a4572590128580df37c8fa83ad.tar go-tangerine-09841b1c9b2553a4572590128580df37c8fa83ad.tar.gz go-tangerine-09841b1c9b2553a4572590128580df37c8fa83ad.tar.bz2 go-tangerine-09841b1c9b2553a4572590128580df37c8fa83ad.tar.lz go-tangerine-09841b1c9b2553a4572590128580df37c8fa83ad.tar.xz go-tangerine-09841b1c9b2553a4572590128580df37c8fa83ad.tar.zst go-tangerine-09841b1c9b2553a4572590128580df37c8fa83ad.zip |
Cleaned up some of that util
Diffstat (limited to 'cmd/ethtest/example/index.html')
-rw-r--r-- | cmd/ethtest/example/index.html | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/cmd/ethtest/example/index.html b/cmd/ethtest/example/index.html deleted file mode 100644 index d0bf094ef..000000000 --- a/cmd/ethtest/example/index.html +++ /dev/null @@ -1,41 +0,0 @@ -<!doctype> -<html> - -<head> -<script type="text/javascript" src="js/es6-promise/promise.min.js"></script> -<script type="text/javascript" src="../dist/ethereum.js"></script> -<script type="text/javascript"> - - var web3 = require('web3'); - web3.setProvider(new web3.providers.AutoProvider()); - - function watchBalance() { - var coinbase = web3.eth.coinbase; - var originalBalance = 0; - - web3.eth.balanceAt(coinbase).then(function (balance) { - originalBalance = web3.toDecimal(balance); - document.getElementById('original').innerText = 'original balance: ' + originalBalance + ' watching...'; - }); - - web3.eth.watch({altered: coinbase}).changed(function() { - web3.eth.balanceAt(coinbase).then(function (balance) { - var currentBalance = web3.toDecimal(balance); - document.getElementById("current").innerText = 'current: ' + currentBalance; - document.getElementById("diff").innerText = 'diff: ' + (currentBalance - originalBalance); - }); - }); - } - -</script> -</head> -<body> - <h1>coinbase balance</h1> - <button type="button" onClick="watchBalance();">watch balance</button> - <div></div> - <div id="original"></div> - <div id="current"></div> - <div id="diff"></div> -</body> -</html> - |