1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Restore hex prefix to gas price

This commit is contained in:
Dan Finlay 2016-10-17 13:05:45 -07:00
parent 91f43fa213
commit 827d7553fc
2 changed files with 2 additions and 1 deletions

View File

@ -286,7 +286,7 @@ IdentityStore.prototype.addGasBuffer = function (gasHex) {
var gas = new BN(gasHex, 16) var gas = new BN(gasHex, 16)
var buffer = new BN('100000', 10) var buffer = new BN('100000', 10)
var result = gas.add(buffer) var result = gas.add(buffer)
return result.toString(16) return ethUtil.addHexPrefix(result.toString(16))
} }
// comes from metamask ui // comes from metamask ui

View File

@ -154,5 +154,6 @@ describe('IdentityStore', function() {
const bnResult = new BN(result, 16) const bnResult = new BN(result, 16)
assert.ok(bnResult.gt(gas), 'added more gas as buffer.') assert.ok(bnResult.gt(gas), 'added more gas as buffer.')
assert.equal(result.indexOf('0x'), 0, 'include hex prefix')
}) })
}) })