diff options
author | obscuren <geffobscura@gmail.com> | 2015-06-20 20:37:00 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-06-20 20:37:00 +0800 |
commit | 42a14b8a09d812dbd7d1b05f145e6881376f320b (patch) | |
tree | c3e2ca55a7b67bce4558cdae3ac395568538d76a /cmd/mist/assets/examples/balance.html | |
parent | e4f9ec886b498c5744633a4db1c735eec11dc71b (diff) | |
download | go-tangerine-42a14b8a09d812dbd7d1b05f145e6881376f320b.tar go-tangerine-42a14b8a09d812dbd7d1b05f145e6881376f320b.tar.gz go-tangerine-42a14b8a09d812dbd7d1b05f145e6881376f320b.tar.bz2 go-tangerine-42a14b8a09d812dbd7d1b05f145e6881376f320b.tar.lz go-tangerine-42a14b8a09d812dbd7d1b05f145e6881376f320b.tar.xz go-tangerine-42a14b8a09d812dbd7d1b05f145e6881376f320b.tar.zst go-tangerine-42a14b8a09d812dbd7d1b05f145e6881376f320b.zip |
mist: R.I.P.
/"""""/""""""".
/ / \ __
/ / \ ||
/____ / \ ||
| | In Loving | ||
| | Memory | ||
| | | ||
| | 2014-2015 | ||
| | * * * * | _||_
| | *\/* *\/* | | TT |
| | *_\_ / ...""""""| || |.""...."""""""".""
| | \/.."""""..."""\ || /.""".......""""...
| |...."""""""........""""""^^^^"......."""""""".."
|......"""""""""""""""........"""""...."""""..""-Jeff W.
Diffstat (limited to 'cmd/mist/assets/examples/balance.html')
-rw-r--r-- | cmd/mist/assets/examples/balance.html | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/cmd/mist/assets/examples/balance.html b/cmd/mist/assets/examples/balance.html deleted file mode 100644 index bc483a879..000000000 --- a/cmd/mist/assets/examples/balance.html +++ /dev/null @@ -1,40 +0,0 @@ -<!doctype> -<html> - -<head> -<script src="../ext/bignumber.min.js"></script> -<script src="../ext/ethereum.js/dist/ethereum.js"></script> -<script type="text/javascript"> - - var web3 = require('web3'); - web3.setProvider(new web3.providers.HttpSyncProvider('http://localhost:8080')); - - function watchBalance() { - var coinbase = web3.eth.coinbase; - var originalBalance = 0; - - var balance = web3.eth.balanceAt(coinbase); - var originalBalance = web3.toDecimal(balance); - document.getElementById('original').innerText = 'original balance: ' + originalBalance + ' watching...'; - - web3.eth.watch({altered: coinbase}).changed(function() { - balance = web3.eth.balanceAt(coinbase) - 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> - - |