Merge pull request #424 from ethereum/updateBalance

Update balance only if necessary
pull/427/head
yann300 4 years ago committed by GitHub
commit e14e5f8edd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      apps/remix-ide/src/app/tabs/runTab/settings.js

@ -46,7 +46,10 @@ class SettingsUI {
accounts.each((index, account) => { accounts.each((index, account) => {
this.blockchain.getBalanceInEther(account.value, (err, balance) => { this.blockchain.getBalanceInEther(account.value, (err, balance) => {
if (err) return if (err) return
account.innerText = helper.shortenAddress(account.value, balance) const updated = helper.shortenAddress(account.value, balance)
if (updated !== account.innerText) { // check if the balance has been updated and update UI accordingly.
account.innerText = updated
}
}) })
}) })
} }

Loading…
Cancel
Save