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:
parent
91f43fa213
commit
827d7553fc
@ -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
|
||||||
|
@ -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')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user