Skip to content

Commit

Permalink
fix: fall back to 0x0 for undefined input in hexToBN
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Apr 19, 2023
1 parent 90bc86c commit 7814e36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/controller-utils/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export function getBuyURL(
* @returns A BN instance.
*/
export function hexToBN(inputHex: string) {
return new BN(stripHexPrefix(inputHex), 16);
return new BN(stripHexPrefix(inputHex || '0x0'), 16);
}

/**
Expand Down

0 comments on commit 7814e36

Please sign in to comment.