pull/1086/head^2
lianahus 4 years ago committed by Liana Husikyan
parent 101feb4eb7
commit f47657dbba
  1. 11
      apps/remix-ide/src/app/tabs/runTab/settings.js

@ -394,11 +394,15 @@ class SettingsUI {
this.accountListCallId++ this.accountListCallId++
const callid = this.accountListCallId const callid = this.accountListCallId
const txOrigin = this.el.querySelector('#txorigin') const txOrigin = this.el.querySelector('#txorigin')
let accounts = []
try { try {
let accounts = await this.blockchain.getAccounts() accounts = await this.blockchain.getAccounts()
} catch (e) {
addTooltip(`Cannot get account list: ${e}`)
}
if (!accounts) accounts = []
if (this.accountListCallId > callid) return if (this.accountListCallId > callid) return
this.accountListCallId++ this.accountListCallId++
if (!accounts) accounts = []
for (var loadedaddress in this.loadedAccounts) { for (var loadedaddress in this.loadedAccounts) {
if (accounts.indexOf(loadedaddress) === -1) { if (accounts.indexOf(loadedaddress) === -1) {
txOrigin.removeChild(txOrigin.querySelector('option[value="' + loadedaddress + '"]')) txOrigin.removeChild(txOrigin.querySelector('option[value="' + loadedaddress + '"]'))
@ -413,9 +417,6 @@ class SettingsUI {
} }
} }
txOrigin.setAttribute('value', accounts[0]) txOrigin.setAttribute('value', accounts[0])
} catch (e) {
addTooltip(`Cannot get account list: ${e}`)
}
} }
} }

Loading…
Cancel
Save