1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00

First attempt at fixing errors in confirmation screen.

This commit is contained in:
Kevin Serrano 2016-11-14 11:17:53 -08:00
parent 115fdc36fe
commit d891869eff
No known key found for this signature in database
GPG Key ID: 7CC862A58D2889B4
2 changed files with 3 additions and 4 deletions

View File

@ -248,7 +248,7 @@ IdentityStore.prototype.addUnconfirmedTransaction = function (txParams, onTxDone
function analyzeForDelegateCall(cb){
if (txParams.to) {
query.getCode(txParams.to, (err, result) => {
if (err) return cb(err)
if (err) return cb(err.message || err)
var containsDelegateCall = self.checkForDelegateCall(result)
txData.containsDelegateCall = containsDelegateCall
cb()
@ -264,7 +264,7 @@ IdentityStore.prototype.addUnconfirmedTransaction = function (txParams, onTxDone
var gasLimit = '0x3b9aca00'
estimationParams.gas = gasLimit
query.estimateGas(estimationParams, function(err, result){
if (err) return cb(err)
if (err) return cb(err.message || err)
if (result === estimationParams.gas) {
txData.simulationFails = true
query.getBlockByNumber('latest', true, function(err, block){
@ -282,7 +282,7 @@ IdentityStore.prototype.addUnconfirmedTransaction = function (txParams, onTxDone
}
function didComplete (err) {
if (err) return cb(err)
if (err) return cb(err.message || err)
configManager.addTx(txData)
// signal update
self._didUpdate()

View File

@ -212,7 +212,6 @@ module.exports = class MetamaskController {
newUnsignedTransaction (txParams, onTxDoneCb) {
const idStore = this.idStore
let err = this.enforceTxValidations(txParams)
if (err) return onTxDoneCb(err)
idStore.addUnconfirmedTransaction(txParams, onTxDoneCb, (err, txData) => {