aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-10-18 04:05:45 +0800
committerDan Finlay <dan@danfinlay.com>2016-10-18 04:05:45 +0800
commit827d7553fc843a75b7a4306c7549505f799609d7 (patch)
tree1c14d688553014175c7fb4fe8c5e0f88048f0db5
parent91f43fa2130e84a32ebecf902696a0b897cdd095 (diff)
downloadtangerine-wallet-browser-827d7553fc843a75b7a4306c7549505f799609d7.tar
tangerine-wallet-browser-827d7553fc843a75b7a4306c7549505f799609d7.tar.gz
tangerine-wallet-browser-827d7553fc843a75b7a4306c7549505f799609d7.tar.bz2
tangerine-wallet-browser-827d7553fc843a75b7a4306c7549505f799609d7.tar.lz
tangerine-wallet-browser-827d7553fc843a75b7a4306c7549505f799609d7.tar.xz
tangerine-wallet-browser-827d7553fc843a75b7a4306c7549505f799609d7.tar.zst
tangerine-wallet-browser-827d7553fc843a75b7a4306c7549505f799609d7.zip
Restore hex prefix to gas price
-rw-r--r--app/scripts/lib/idStore.js2
-rw-r--r--test/unit/idStore-test.js1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js
index 9846c84f0..9d0ca7f19 100644
--- a/app/scripts/lib/idStore.js
+++ b/app/scripts/lib/idStore.js
@@ -286,7 +286,7 @@ IdentityStore.prototype.addGasBuffer = function (gasHex) {
var gas = new BN(gasHex, 16)
var buffer = new BN('100000', 10)
var result = gas.add(buffer)
- return result.toString(16)
+ return ethUtil.addHexPrefix(result.toString(16))
}
// comes from metamask ui
diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js
index 7f6324645..0a57d2121 100644
--- a/test/unit/idStore-test.js
+++ b/test/unit/idStore-test.js
@@ -154,5 +154,6 @@ describe('IdentityStore', function() {
const bnResult = new BN(result, 16)
assert.ok(bnResult.gt(gas), 'added more gas as buffer.')
+ assert.equal(result.indexOf('0x'), 0, 'include hex prefix')
})
})