update account balance less often

pull/3094/head
yann300 7 years ago
parent 12c4cf6b7d
commit 728a5cfc56
  1. 7
      src/app/tabs/run-tab.js

@ -215,7 +215,7 @@ function runTab (container, appAPI, appEvents, opts) {
var el = yo`
<div class="${css.runTabView}" id="runTabView">
${settings(appAPI, appEvents)}
${settings(container, appAPI, appEvents)}
${contractDropdown(events, appAPI, appEvents, instanceContainer)}
${pendingTxsContainer}
${instanceContainer}
@ -244,7 +244,7 @@ function runTab (container, appAPI, appEvents, opts) {
setInterval(() => {
updateAccountBalances(container, appAPI)
updatePendingTxs(container, appAPI)
}, 500)
}, 10000)
events.register('clearInstance', () => {
instanceContainer.innerHTML = '' // clear the instances list
@ -497,7 +497,7 @@ function contractDropdown (events, appAPI, appEvents, instanceContainer) {
/* ------------------------------------------------
section SETTINGS: Environment, Account, Gas, Value
------------------------------------------------ */
function settings (appAPI, appEvents) {
function settings (container, appAPI, appEvents) {
// SETTINGS HTML
var net = yo`<span class=${css.network}></span>`
const updateNetwork = () => {
@ -573,6 +573,7 @@ function settings (appAPI, appEvents) {
appEvents.udapp.register('transactionExecuted', (error, from, to, data, lookupOnly, txResult) => {
if (error) return
if (!lookupOnly) el.querySelector('#value').value = '0'
updateAccountBalances(container, appAPI)
})
return el

Loading…
Cancel
Save