aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/idStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/lib/idStore.js')
-rw-r--r--app/scripts/lib/idStore.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 46d53c4e1..1010a5789 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -287,11 +287,11 @@ IdentityStore.prototype.checkForDelegateCall = function (codeHex) {
}
}
-IdentityStore.prototype.addGasBuffer = function (gasHex) {
- var gas = new BN(gasHex, 16)
- var buffer = new BN('100000', 10)
- var result = gas.add(buffer)
- return ethUtil.addHexPrefix(result.toString(16))
+const gasBuffer = new BN('100000', 10)
+IdentityStore.prototype.addGasBuffer = function (gas) {
+ const bnGas = new BN(ethUtil.stripHexPrefix(gas), 16)
+ const correct = bnGas.add(gasBuffer)
+ return ethUtil.addHexPrefix(correct.toString(16))
}
// comes from metamask ui