diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-02 02:01:21 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-02 02:01:21 +0800 |
commit | 0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66 (patch) | |
tree | cb569b1419363928282cd9ae0b4862d436c8fa58 /app/scripts/lib/tx-utils.js | |
parent | 930dafc4b0648353f847c529cdc19e2d762553ad (diff) | |
parent | f162a11585392df5e593018a02549f8b03018d22 (diff) | |
download | tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.tar.gz tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.tar.zst tangerine-wallet-browser-0a3849ec8477b4a61c50d715bd72b3e8f1ea8b66.zip |
Fix merge conflicts.
Diffstat (limited to 'app/scripts/lib/tx-utils.js')
-rw-r--r-- | app/scripts/lib/tx-utils.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js index 5116cb93b..19a2d430e 100644 --- a/app/scripts/lib/tx-utils.js +++ b/app/scripts/lib/tx-utils.js @@ -2,7 +2,7 @@ const async = require('async') const EthQuery = require('eth-query') const ethUtil = require('ethereumjs-util') const Transaction = require('ethereumjs-tx') -const normalize = require('./sig-util').normalize +const normalize = require('eth-sig-util').normalize const BN = ethUtil.BN /* @@ -92,11 +92,10 @@ module.exports = class txProviderUtils { } // builds ethTx from txParams object - buildEthTxFromParams (txParams, gasMultiplier = 1) { + buildEthTxFromParams (txParams) { // apply gas multiplyer let gasPrice = new BN(ethUtil.stripHexPrefix(txParams.gasPrice), 16) // multiply and divide by 100 so as to add percision to integer mul - gasPrice = gasPrice.mul(new BN(gasMultiplier * 100, 10)).div(new BN(100, 10)) txParams.gasPrice = ethUtil.intToHex(gasPrice.toNumber()) // normalize values txParams.to = normalize(txParams.to) @@ -106,6 +105,7 @@ module.exports = class txProviderUtils { txParams.gasLimit = normalize(txParams.gasLimit || txParams.gas) txParams.nonce = normalize(txParams.nonce) // build ethTx + log.info(`Prepared tx for signing: ${JSON.stringify(txParams)}`) const ethTx = new Transaction(txParams) return ethTx } |