diff options
author | frankiebee <frankie.diamond@gmail.com> | 2017-08-02 23:35:35 +0800 |
---|---|---|
committer | frankiebee <frankie.diamond@gmail.com> | 2017-08-02 23:35:35 +0800 |
commit | 3a4726018e43157909f8c04e03f33cee2584795a (patch) | |
tree | 08f1a7256939fe6e29c77d8b918bf5a8a425bacf | |
parent | 21e76484d628d7861b09f013116121101e67334c (diff) | |
download | tangerine-wallet-browser-3a4726018e43157909f8c04e03f33cee2584795a.tar tangerine-wallet-browser-3a4726018e43157909f8c04e03f33cee2584795a.tar.gz tangerine-wallet-browser-3a4726018e43157909f8c04e03f33cee2584795a.tar.bz2 tangerine-wallet-browser-3a4726018e43157909f8c04e03f33cee2584795a.tar.lz tangerine-wallet-browser-3a4726018e43157909f8c04e03f33cee2584795a.tar.xz tangerine-wallet-browser-3a4726018e43157909f8c04e03f33cee2584795a.tar.zst tangerine-wallet-browser-3a4726018e43157909f8c04e03f33cee2584795a.zip |
fix addTxDefaults
-rw-r--r-- | app/scripts/controllers/transactions.js | 2 | ||||
-rw-r--r-- | app/scripts/lib/tx-utils.js | 3 |
2 files changed, 3 insertions, 2 deletions
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) { |