pull/5370/head
lianahus 4 years ago committed by Liana Husikyan
parent 507a4763f2
commit c8a3cafbe1
  1. 11
      apps/remix-ide/src/app/tabs/runTab/settings.js

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

Loading…
Cancel
Save