Skip to content

Commit

Permalink
Fixed left-padding in arrayify (ethers-io#2833).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Mar 25, 2022
1 parent 9d9b14b commit e192903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bytes/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export function arrayify(value: BytesLike | Hexable | number, options?: DataOpti
let hex = (<string>value).substring(2);
if (hex.length % 2) {
if (options.hexPad === "left") {
hex = "0x0" + hex.substring(2);
hex = "0" + hex;
} else if (options.hexPad === "right") {
hex += "0";
} else {
Expand Down

0 comments on commit e192903

Please sign in to comment.