updated with new API of web3.js

pull/1543/head
lianahus 3 years ago committed by yann300
parent 5c08cdd58f
commit 39d8ef77f5
  1. 2
      apps/remix-ide/src/blockchain/providers/injected.js
  2. 4
      apps/remix-ide/src/blockchain/providers/node.js

@ -12,7 +12,7 @@ class InjectedProvider {
newAccount (passwordPromptCb, cb) { newAccount (passwordPromptCb, cb) {
passwordPromptCb((passphrase) => { passwordPromptCb((passphrase) => {
this.executionContext.web3().personal.newAccount(passphrase, cb) this.executionContext.web3().eth.personal.newAccount(passphrase, cb)
}) })
} }

@ -10,7 +10,7 @@ class NodeProvider {
getAccounts (cb) { getAccounts (cb) {
if (this.config.get('settings/personal-mode')) { if (this.config.get('settings/personal-mode')) {
return this.executionContext.web3().personal.getListAccounts(cb) return this.executionContext.web3().eth.personal.getAccounts(cb)
} }
return this.executionContext.web3().eth.getAccounts(cb) return this.executionContext.web3().eth.getAccounts(cb)
} }
@ -20,7 +20,7 @@ class NodeProvider {
return cb('Not running in personal mode') return cb('Not running in personal mode')
} }
passwordPromptCb((passphrase) => { passwordPromptCb((passphrase) => {
this.executionContext.web3().personal.newAccount(passphrase, cb) this.executionContext.web3().eth.personal.newAccount(passphrase, cb)
}) })
} }

Loading…
Cancel
Save