1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00

Add additional test to ui utils to account for exact wei values.

This commit is contained in:
Kevin Serrano 2017-12-27 17:33:28 -08:00
parent 3e562f1a1e
commit adf4b89804
No known key found for this signature in database
GPG Key ID: BF999DEFC7371BA1

View File

@ -207,6 +207,12 @@ describe('util', function () {
var output = util.normalizeEthStringToWei(input) var output = util.normalizeEthStringToWei(input)
assert.equal(output.toString(10), '1111111111111111111') assert.equal(output.toString(10), '1111111111111111111')
}) })
it('should not truncate very exact wei values that do not have extra precision.', function () {
var input = '1.100000000000000001'
var output = util.normalizeEthStringToWei(input)
assert.equal(output.toString(10), '1100000000000000001')
})
}) })
describe('#normalizeNumberToWei', function () { describe('#normalizeNumberToWei', function () {