Commit 682f0709 authored by yann300's avatar yann300

typo

parent 49a15510
...@@ -61,6 +61,7 @@ function Renderer (appAPI, compilerEvent) { ...@@ -61,6 +61,7 @@ function Renderer (appAPI, compilerEvent) {
}) })
} }
}) })
setInterval(() => { updateAccountBalances(appAPI) }, 1000)
} }
Renderer.prototype.clear = function () { Renderer.prototype.clear = function () {
...@@ -344,4 +345,17 @@ Renderer.prototype.contracts = function (data, source) { ...@@ -344,4 +345,17 @@ Renderer.prototype.contracts = function (data, source) {
$('.' + css.col2 + ' input,textarea').click(function () { this.select() }) $('.' + css.col2 + ' input,textarea').click(function () { this.select() })
} }
function updateAccountBalances (appAPI) {
var accounts = $('#txorigin').children('option')
accounts.each(function (index, value) {
(function (acc) {
appAPI.getBalance(accounts[acc].value, function (err, res) {
if (!err) {
accounts[acc].innerText = accounts[acc].value.substring(0, 8) + '... (' + res.toString() + ' ether)'
}
})
})(index)
})
}
module.exports = Renderer module.exports = Renderer
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment