From 3a4726018e43157909f8c04e03f33cee2584795a Mon Sep 17 00:00:00 2001 From: frankiebee Date: Wed, 2 Aug 2017 11:35:35 -0400 Subject: fix addTxDefaults --- app/scripts/controllers/transactions.js | 2 +- app/scripts/lib/tx-utils.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'app/scripts') diff --git a/app/scripts/controllers/transactions.js b/app/scripts/controllers/transactions.js index d3e852ef9..43dfb9360 100644 --- a/app/scripts/controllers/transactions.js +++ b/app/scripts/controllers/transactions.js @@ -172,7 +172,7 @@ module.exports = class TransactionController extends EventEmitter { // ensure value txParams.value = txParams.value || '0x0' if (!txParams.gasPrice) { - gassPrice = await this.query.gasPrice() + const gasPrice = await this.query.gasPrice() txParams.gasPrice = gasPrice } // set gasLimit diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js index 43928feaf..5b9fe0167 100644 --- a/app/scripts/lib/tx-utils.js +++ b/app/scripts/lib/tx-utils.js @@ -19,6 +19,7 @@ module.exports = class txProvideUtils { const block = await this.query.getBlockByNumber('latest', true) const estimatedGasHex = await this.estimateTxGas(txMeta, block.gasLimit) this.setTxGas(txMeta, block.gasLimit, estimatedGasHex) + return txMeta } async estimateTxGas (txMeta, blockGasLimitHex) { @@ -32,7 +33,7 @@ module.exports = class txProvideUtils { txParams.gas = bnToHex(saferGasLimitBN) } // run tx, see if it will OOG - return await this.query.estimateGas(txParams) + return this.query.estimateGas(txParams) } setTxGas (txMeta, blockGasLimitHex, estimatedGasHex) { -- cgit v1.2.3