mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add backend fix for util in normalizeethstringtowei.
This commit is contained in:
parent
414f89668e
commit
3e562f1a1e
@ -193,6 +193,9 @@ function normalizeEthStringToWei (str) {
|
|||||||
while (decimal.length < 18) {
|
while (decimal.length < 18) {
|
||||||
decimal += '0'
|
decimal += '0'
|
||||||
}
|
}
|
||||||
|
if (decimal.length > 18) {
|
||||||
|
decimal = decimal.slice(0, 18)
|
||||||
|
}
|
||||||
const decimalBN = new ethUtil.BN(decimal, 10)
|
const decimalBN = new ethUtil.BN(decimal, 10)
|
||||||
eth = eth.add(decimalBN)
|
eth = eth.add(decimalBN)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user