aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/tx-utils.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-04-28 05:50:19 +0800
committerDan Finlay <dan@danfinlay.com>2017-04-28 05:50:19 +0800
commitd1a10691802fc7eef65f13126c684b6cdf13d461 (patch)
tree9143b42107d8aeb75fa58f8de45c5730bb8621dd /app/scripts/lib/tx-utils.js
parentb0919ba7296553200161913ab413f214aa58e741 (diff)
parenta90b010de891f7936bc17c09c5fd27c61fc0610d (diff)
downloadtangerine-wallet-browser-d1a10691802fc7eef65f13126c684b6cdf13d461.tar.gz
tangerine-wallet-browser-d1a10691802fc7eef65f13126c684b6cdf13d461.tar.zst
tangerine-wallet-browser-d1a10691802fc7eef65f13126c684b6cdf13d461.zip
Merge branch 'master' into rinkeby
Diffstat (limited to 'app/scripts/lib/tx-utils.js')
-rw-r--r--app/scripts/lib/tx-utils.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js
index e8e23f8b5..084ca3721 100644
--- a/app/scripts/lib/tx-utils.js
+++ b/app/scripts/lib/tx-utils.js
@@ -75,14 +75,14 @@ module.exports = class txProviderUtils {
}
fillInTxParams (txParams, cb) {
- let fromAddress = txParams.from
- let reqs = {}
+ const fromAddress = txParams.from
+ const reqs = {}
if (isUndef(txParams.gas)) reqs.gas = (cb) => this.query.estimateGas(txParams, cb)
if (isUndef(txParams.gasPrice)) reqs.gasPrice = (cb) => this.query.gasPrice(cb)
if (isUndef(txParams.nonce)) reqs.nonce = (cb) => this.query.getTransactionCount(fromAddress, 'pending', cb)
- async.parallel(reqs, function(err, result) {
+ async.parallel(reqs, function (err, result) {
if (err) return cb(err)
// write results to txParams obj
Object.assign(txParams, result)
@@ -123,14 +123,14 @@ module.exports = class txProviderUtils {
// util
-function isUndef(value) {
+function isUndef (value) {
return value === undefined
}
-function bnToHex(inputBn) {
+function bnToHex (inputBn) {
return ethUtil.addHexPrefix(inputBn.toString(16))
}
-function hexToBn(inputHex) {
+function hexToBn (inputHex) {
return new BN(ethUtil.stripHexPrefix(inputHex), 16)
}