This commit is contained in:
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
|
||||||
|
Loading…
Reference in New Issue
Block a user