diff --git a/src/utils/number.ts b/src/utils/number.ts index 4cb448902..08f3b2e4e 100644 --- a/src/utils/number.ts +++ b/src/utils/number.ts @@ -10,6 +10,10 @@ export function isHex(hex: string): boolean { } export function toBN(number: BigNumberish, base?: number | 'hex') { + if (typeof number === 'string') { + // eslint-disable-next-line no-param-reassign + number = number.toLowerCase(); + } if (typeof number === 'string' && isHex(number) && !base) return new BN(removeHexPrefix(number), 'hex'); return new BN(number, base);