docs: fixed typos in comments (#2087).
This commit is contained in:
parent
48c9e0bf39
commit
ad87b718a9
@ -94,12 +94,12 @@ export function parseFixed(value: string, decimals?: BigNumberish): BigNumber {
|
|||||||
if (!whole) { whole = "0"; }
|
if (!whole) { whole = "0"; }
|
||||||
if (!fraction) { fraction = "0"; }
|
if (!fraction) { fraction = "0"; }
|
||||||
|
|
||||||
// Trim trialing zeros
|
// Trim trailing zeros
|
||||||
while (fraction[fraction.length - 1] === "0") {
|
while (fraction[fraction.length - 1] === "0") {
|
||||||
fraction = fraction.substring(0, fraction.length - 1);
|
fraction = fraction.substring(0, fraction.length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the fraction doesn't exceed our decimals
|
// Check the fraction doesn't exceed our decimals size
|
||||||
if (fraction.length > multiplier.length - 1) {
|
if (fraction.length > multiplier.length - 1) {
|
||||||
throwFault("fractional component exceeds decimals", "underflow", "parseFixed");
|
throwFault("fractional component exceeds decimals", "underflow", "parseFixed");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user