Commit da206579 authored by Iuri Matias's avatar Iuri Matias

use current provider for gas price

parent a3c926c7
......@@ -132,7 +132,7 @@ class Blockchain {
}
determineGasPrice (cb) {
this.executionContext.web3().eth.getGasPrice((error, gasPrice) => {
this.getCurrentProvider().getGasPrice((error, gasPrice) => {
const warnMessage = ' Please fix this issue before sending any transaction. '
if (error) {
return cb('Unable to retrieve the current network gas price.' + warnMessage + error)
......
......@@ -30,6 +30,10 @@ class InjectedProvider {
})
}
getGasPrice (cb) {
this.executionContext.web3().eth.getGasPrice(cb)
}
signMessage (message, account, _passphrase, cb) {
const hashedMsg = Web3.utils.sha3(message)
try {
......
......@@ -38,6 +38,10 @@ class NodeProvider {
})
}
getGasPrice (cb) {
this.executionContext.web3().eth.getGasPrice(cb)
}
signMessage (message, account, passphrase, cb) {
const hashedMsg = Web3.utils.sha3(message)
try {
......
......@@ -72,6 +72,10 @@ class VMProvider {
})
}
getGasPrice (cb) {
this.executionContext.web3().eth.getGasPrice(cb)
}
signMessage (message, account, _passphrase, cb) {
const personalMsg = ethJSUtil.hashPersonalMessage(Buffer.from(message))
const privKey = this.providers.vm.accounts[account].privateKey
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment