aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/keyring-controller.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-08 04:00:14 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-08 04:00:14 +0800
commit553a6da0117d94a6a3be3707266bdc09e67f9103 (patch)
treecc3558d3aa1cfbfaf394a8b5e17b153464d944d2 /app/scripts/keyring-controller.js
parentfc26a0a8991759a54409096d0c7896da86cea4b7 (diff)
downloadtangerine-wallet-browser-553a6da0117d94a6a3be3707266bdc09e67f9103.tar
tangerine-wallet-browser-553a6da0117d94a6a3be3707266bdc09e67f9103.tar.gz
tangerine-wallet-browser-553a6da0117d94a6a3be3707266bdc09e67f9103.tar.bz2
tangerine-wallet-browser-553a6da0117d94a6a3be3707266bdc09e67f9103.tar.lz
tangerine-wallet-browser-553a6da0117d94a6a3be3707266bdc09e67f9103.tar.xz
tangerine-wallet-browser-553a6da0117d94a6a3be3707266bdc09e67f9103.tar.zst
tangerine-wallet-browser-553a6da0117d94a6a3be3707266bdc09e67f9103.zip
Fix 787 gas buffer bug
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r--app/scripts/keyring-controller.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js
index fb3091143..3ebf02c44 100644
--- a/app/scripts/keyring-controller.js
+++ b/app/scripts/keyring-controller.js
@@ -533,11 +533,11 @@ module.exports = class KeyringController extends EventEmitter {
}
}
- addGasBuffer(gasHex) {
- var gas = new BN(gasHex, 16)
- var buffer = new BN('100000', 10)
- var result = gas.add(buffer)
- return normalize(result.toString(16))
+ addGasBuffer(gas) {
+ const gasBuffer = new BN('100000', 10)
+ const bnGas = new BN(ethUtil.stripHexPrefix(gas), 16)
+ const correct = bnGas.add(gasBuffer)
+ return ethUtil.addHexPrefix(correct.toString(16))
}
clearSeedWordCache(cb) {