Fixed typo in error description when converting values to arrays (#4427, #4446).

This commit is contained in:
Richard Moore 2023-11-01 16:04:27 -04:00
parent 73adb393e8
commit 8fed2f8476

@ -191,7 +191,7 @@ export function toBeHex(_value: BigNumberish, _width?: Numeric): string {
if (result.length % 2) { result = "0" + result; } if (result.length % 2) { result = "0" + result; }
} else { } else {
const width = getNumber(_width, "width"); const width = getNumber(_width, "width");
assert(width * 2 >= result.length, `value exceeds width (${ width } bits)`, "NUMERIC_FAULT", { assert(width * 2 >= result.length, `value exceeds width (${ width } bytes)`, "NUMERIC_FAULT", {
operation: "toBeHex", operation: "toBeHex",
fault: "overflow", fault: "overflow",
value: _value value: _value