diff options
author | Frankie <frankie.diamond@gmail.com> | 2017-01-15 05:32:35 +0800 |
---|---|---|
committer | Frankie <frankie.diamond@gmail.com> | 2017-01-15 05:32:35 +0800 |
commit | fdcf03f57d0516731799266c8279c0caa5ffcbed (patch) | |
tree | 48568dd3cc3e7a34af3403a323c442b434a8f57f | |
parent | 87505e1742ee56e78fed7f17645f58bf169c4ef7 (diff) | |
download | tangerine-wallet-browser-fdcf03f57d0516731799266c8279c0caa5ffcbed.tar tangerine-wallet-browser-fdcf03f57d0516731799266c8279c0caa5ffcbed.tar.gz tangerine-wallet-browser-fdcf03f57d0516731799266c8279c0caa5ffcbed.tar.bz2 tangerine-wallet-browser-fdcf03f57d0516731799266c8279c0caa5ffcbed.tar.lz tangerine-wallet-browser-fdcf03f57d0516731799266c8279c0caa5ffcbed.tar.xz tangerine-wallet-browser-fdcf03f57d0516731799266c8279c0caa5ffcbed.tar.zst tangerine-wallet-browser-fdcf03f57d0516731799266c8279c0caa5ffcbed.zip |
Fix the inclusion of the txFee in the meta tx object
-rw-r--r-- | app/scripts/transaction-manager.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/scripts/transaction-manager.js b/app/scripts/transaction-manager.js index c33c4ed16..7dbfc0dbc 100644 --- a/app/scripts/transaction-manager.js +++ b/app/scripts/transaction-manager.js @@ -125,7 +125,6 @@ module.exports = class TransactionManager extends EventEmitter { setMaxTxCostAndFee (txMeta) { var txParams = txMeta.txParams - var gasMultiplier = txMeta.gasMultiplier var gasCost = new BN(ethUtil.stripHexPrefix(txParams.gas || txMeta.estimatedGas), 16) var gasPrice = new BN(ethUtil.stripHexPrefix(txParams.gasPrice || '0x4a817c800'), 16) @@ -133,6 +132,7 @@ module.exports = class TransactionManager extends EventEmitter { var txFee = gasCost.mul(gasPrice) var txValue = new BN(ethUtil.stripHexPrefix(txParams.value || '0x0'), 16) var maxCost = txValue.add(txFee) + txMeta.txFee = txFee txMeta.txValue = txValue txMeta.maxCost = maxCost this.updateTx(txMeta) @@ -160,8 +160,10 @@ module.exports = class TransactionManager extends EventEmitter { (rawTx, cb) => self.publishTransaction(txId, rawTx, cb), ], (err) => { self.nonceLock.leave() - this.setTxStatusFailed(txId) - if (err) return cb(err) + if (err) { + this.setTxStatusFailed(txId) + return cb(err) + } cb() }) }) |