aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-07-12 03:52:56 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-07-12 03:52:56 +0800
commit231ad48564758895bace7b0e750cdfa5577128f8 (patch)
treed2a74d3665cfce4a4960d952814ad60c865ef3ba /app/scripts
parent971d25a8ab9fecbad041e3df1696bf67245bd858 (diff)
downloadtangerine-wallet-browser-231ad48564758895bace7b0e750cdfa5577128f8.tar
tangerine-wallet-browser-231ad48564758895bace7b0e750cdfa5577128f8.tar.gz
tangerine-wallet-browser-231ad48564758895bace7b0e750cdfa5577128f8.tar.bz2
tangerine-wallet-browser-231ad48564758895bace7b0e750cdfa5577128f8.tar.lz
tangerine-wallet-browser-231ad48564758895bace7b0e750cdfa5577128f8.tar.xz
tangerine-wallet-browser-231ad48564758895bace7b0e750cdfa5577128f8.tar.zst
tangerine-wallet-browser-231ad48564758895bace7b0e750cdfa5577128f8.zip
Use txParams
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/lib/tx-utils.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js
index 4e780fcc0..aa0cb624f 100644
--- a/app/scripts/lib/tx-utils.js
+++ b/app/scripts/lib/tx-utils.js
@@ -118,11 +118,11 @@ module.exports = class txProviderUtils {
}
}
- sufficientBalance (tx, hexBalance) {
+ sufficientBalance (txParams, hexBalance) {
const balance = hexToBn(hexBalance)
- const value = hexToBn(tx.value)
- const gasLimit = hexToBn(tx.gas)
- const gasPrice = hexToBn(tx.gasPrice)
+ const value = hexToBn(txParams.value)
+ const gasLimit = hexToBn(txParams.gas)
+ const gasPrice = hexToBn(txParams.gasPrice)
const maxCost = value.add(gasLimit.mul(gasPrice))
return balance.gte(maxCost)