fix passing blockchain param

pull/5370/head
yann300 5 years ago
parent 02915fbadf
commit de25fc8304
  1. 6
      src/app/ui/sendTxCallbacks.js
  2. 2
      src/app/ui/universal-dapp-ui.js

@ -7,13 +7,13 @@ const typeConversion = remixLib.execution.typeConversion
const Web3 = require('web3')
module.exports = {
getCallBacksWithContext: (udappUI, executionContext) => {
getCallBacksWithContext: (udappUI, blockchain) => {
let callbacks = {}
callbacks.confirmationCb = confirmationCb
callbacks.continueCb = continueCb
callbacks.promptCb = promptCb
callbacks.udappUI = udappUI
callbacks.executionContext = executionContext
callbacks.blockchain = blockchain
return callbacks
}
}
@ -67,7 +67,7 @@ const confirmationCb = function (network, tx, gasEstimation, continueTxExecution
cb(txFeeText, priceStatus)
},
(cb) => {
self.executionContext.web3().eth.getGasPrice((error, gasPrice) => {
self.blockchain.web3().eth.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)

@ -233,7 +233,7 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
const functionName = args.funABI.type === 'function' ? args.funABI.name : `(${args.funABI.type})`
const logMsg = `${lookupOnly ? 'call' : 'transact'} to ${args.contractName}.${functionName}`
const callbacksInContext = txCallBacks.getCallBacksWithContext(this, this.executionContext)
const callbacksInContext = txCallBacks.getCallBacksWithContext(this, this.blockchain)
const outputCb = (returnValue) => {
if (outputOverride) {

Loading…
Cancel
Save