pull/3951/head
Oleksii Kosynskyi 1 year ago
parent 28ca150d1c
commit 2b2fd77be3
No known key found for this signature in database
GPG Key ID: B4A8D3CCE22EA65E
  1. 8
      apps/remix-ide/src/blockchain/providers/vm.ts

@ -14,6 +14,7 @@ export class VMProvider {
newAccountCallback: {[stamp: number]: (error: Error, address: string) => void}
constructor (executionContext: ExecutionContext) {
this.executionContext = executionContext
this.worker = null
this.provider = null
@ -23,7 +24,10 @@ export class VMProvider {
getAccounts (cb) {
this.web3.eth.getAccounts()
.then(accounts => cb(null, accounts))
.catch(err => cb('No accounts?'))
.catch(err => {
console.log('err',err)
cb('No accounts?')
})
}
async resetEnvironment () {
@ -42,6 +46,8 @@ export class VMProvider {
if (!msg.data.error) {
this.provider = {
sendAsync: (query, callback) => {
console.log('query',query)
console.log('callback',callback)
const stamp = Date.now() + incr
incr++
stamps[stamp] = callback

Loading…
Cancel
Save