|
|
|
@ -68,9 +68,6 @@ TxRunner.prototype.execute = function (args, callback) { |
|
|
|
|
}) |
|
|
|
|
}}) |
|
|
|
|
} else { |
|
|
|
|
modalDialog('Confirm transaction', remixdDialog(tx), |
|
|
|
|
{ label: 'Confirm', |
|
|
|
|
fn: () => { |
|
|
|
|
executionContext.web3().eth.estimateGas(tx, function (err, gasEstimation) { |
|
|
|
|
if (err) { |
|
|
|
|
return callback(err, gasEstimation) |
|
|
|
@ -88,6 +85,9 @@ TxRunner.prototype.execute = function (args, callback) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
tx.gas = gasEstimation |
|
|
|
|
modalDialog('Confirm transaction', remixdDialog(tx), |
|
|
|
|
{ label: 'Confirm', |
|
|
|
|
fn: () => { |
|
|
|
|
var sendTransaction = self.personalMode ? executionContext.web3().personal.sendTransaction : executionContext.web3().eth.sendTransaction |
|
|
|
|
try { |
|
|
|
|
sendTransaction(tx, function (err, resp) { |
|
|
|
@ -100,8 +100,8 @@ TxRunner.prototype.execute = function (args, callback) { |
|
|
|
|
} catch (e) { |
|
|
|
|
return callback(`Send transaction failed: ${e.message} . if you use an injected provider, please check it is properly unlocked. `) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
try { |
|
|
|
@ -188,13 +188,12 @@ function run (self, tx, stamp, callback) { |
|
|
|
|
function remixdDialog (tx) { |
|
|
|
|
return yo` |
|
|
|
|
<div> |
|
|
|
|
<div>You are trying to execute transaction on the main network. Please, click confirm to continue!</div> |
|
|
|
|
<div>You are trying to execute transaction on the main network. Click confirm if you want to continue!</div> |
|
|
|
|
<div class=${css.txInfoBox}> |
|
|
|
|
<div>from: ${tx.from}</div> |
|
|
|
|
<div>to: ${tx.from}</div> |
|
|
|
|
<div>tx value: ${tx.value}</div> |
|
|
|
|
<div>gas limit: ${tx.gasLimit}</div> |
|
|
|
|
<div>gas price: ${tx.gasEstimation}</div> |
|
|
|
|
<div>gas limit: ${tx.gas}</div> |
|
|
|
|
<div>data: ${helper.shortenHexData(tx.data)}</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|