docs: fixed typos in comments (#2087).

This commit is contained in:
Richard Moore 2021-10-04 10:46:35 -04:00
parent 48c9e0bf39
commit ad87b718a9
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

View File

@ -94,12 +94,12 @@ export function parseFixed(value: string, decimals?: BigNumberish): BigNumber {
if (!whole) { whole = "0"; }
if (!fraction) { fraction = "0"; }
// Trim trialing zeros
// Trim trailing zeros
while (fraction[fraction.length - 1] === "0") {
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) {
throwFault("fractional component exceeds decimals", "underflow", "parseFixed");
}