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 55e256b
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 inputHex ? new BN(stripHexPrefix(inputHex), 16) : new BN(0);
}

/**
Expand Down

0 comments on commit 55e256b

Please sign in to comment.