aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-09 00:39:41 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-09 00:39:41 +0800
commit7068d2e71c6d1ddb68095916dc16f3ff1f283590 (patch)
tree4bbd6d42cddb5c3fafc32dbbb2024d60408473ec /app/scripts/lib
parent6f39924e60545ca8ac19995a799c16d0dea11b04 (diff)
downloadtangerine-wallet-browser-7068d2e71c6d1ddb68095916dc16f3ff1f283590.tar
tangerine-wallet-browser-7068d2e71c6d1ddb68095916dc16f3ff1f283590.tar.gz
tangerine-wallet-browser-7068d2e71c6d1ddb68095916dc16f3ff1f283590.tar.bz2
tangerine-wallet-browser-7068d2e71c6d1ddb68095916dc16f3ff1f283590.tar.lz
tangerine-wallet-browser-7068d2e71c6d1ddb68095916dc16f3ff1f283590.tar.xz
tangerine-wallet-browser-7068d2e71c6d1ddb68095916dc16f3ff1f283590.tar.zst
tangerine-wallet-browser-7068d2e71c6d1ddb68095916dc16f3ff1f283590.zip
Adjust gas buffer to be 20% over estimate
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/idStore.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 8c811a614..0ce91f471 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -287,9 +287,10 @@ IdentityStore.prototype.checkForDelegateCall = function (codeHex) {
}
}
-const gasBuffer = new BN('200000', 10)
IdentityStore.prototype.addGasBuffer = function (gas) {
const bnGas = new BN(ethUtil.stripHexPrefix(gas), 16)
+ const five = new BN('5', 10)
+ const gasBuffer = bnGas.div(five)
const correct = bnGas.add(gasBuffer)
return ethUtil.addHexPrefix(correct.toString(16))
}