non-vm networks shows in bs badge

pull/3094/head
Rob Stupay 6 years ago
parent 4f4cb2e9b0
commit ad4467e1cd
  1. 10
      src/app/tabs/runTab/settings.js

@ -7,12 +7,14 @@ const copyToClipboard = require('../../ui/copy-to-clipboard')
const modalDialogCustom = require('../../ui/modal-dialog-custom')
const addTooltip = require('../../ui/tooltip')
const helper = require('../../../lib/helper.js')
const globalRegistry = require('../../../global/registry')
class SettingsUI {
constructor (settings) {
this.settings = settings
this.event = new EventManager()
this._components = {}
this.settings.event.register('transactionExecuted', (error, from, to, data, lookupOnly, txResult) => {
if (error) return
@ -20,6 +22,11 @@ class SettingsUI {
this.updateAccountBalances()
})
this._components.registry = globalRegistry
this._deps = {
networkModule: this._components.registry.get('network').api
}
setInterval(() => {
this.updateAccountBalances()
}, 10 * 1000)
@ -239,7 +246,8 @@ class SettingsUI {
this.netUI.innerHTML = 'can\'t detect network '
return
}
this.netUI.innerHTML = `${name} (${id || '-'}) network`
let network = this._deps.networkModule.getNetworkProvider
this.netUI.innerHTML = (network() !== 'vm') ? `${name} (${id || '-'}) network` : ''
})
}

Loading…
Cancel
Save