mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Modfiy test to ether standards.
This commit is contained in:
parent
10ca3b6467
commit
5e19a4a833
@ -13,7 +13,7 @@ describe('BnInput', function () {
|
|||||||
const renderer = ReactTestUtils.createRenderer()
|
const renderer = ReactTestUtils.createRenderer()
|
||||||
|
|
||||||
let valueStr = '20'
|
let valueStr = '20'
|
||||||
while (valueStr.length < 15) {
|
while (valueStr.length < 20) {
|
||||||
valueStr += '0'
|
valueStr += '0'
|
||||||
}
|
}
|
||||||
const value = new BN(valueStr, 10)
|
const value = new BN(valueStr, 10)
|
||||||
@ -21,13 +21,13 @@ describe('BnInput', function () {
|
|||||||
let inputStr = '2.3'
|
let inputStr = '2.3'
|
||||||
|
|
||||||
let targetStr = '23'
|
let targetStr = '23'
|
||||||
while (targetStr.length < 14) {
|
while (targetStr.length < 19) {
|
||||||
targetStr += '0'
|
targetStr += '0'
|
||||||
}
|
}
|
||||||
const target = new BN(targetStr, 10)
|
const target = new BN(targetStr, 10)
|
||||||
|
|
||||||
const precision = 13 // ether precision
|
const precision = 18 // ether precision
|
||||||
const scale = 13
|
const scale = 18
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
value,
|
value,
|
||||||
|
Loading…
Reference in New Issue
Block a user