From 7814e36e6018c842767ff2fb2d859c682d230128 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 19 Apr 2023 03:30:01 +0000 Subject: [PATCH] fix: fall back to 0x0 for undefined input in hexToBN --- packages/controller-utils/src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/controller-utils/src/util.ts b/packages/controller-utils/src/util.ts index 36db9c32000..876bdfafe32 100644 --- a/packages/controller-utils/src/util.ts +++ b/packages/controller-utils/src/util.ts @@ -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); } /**