From 328a61d59d08cbcccefe4dcc072bf3fae976e6d9 Mon Sep 17 00:00:00 2001 From: Salah-Eddine Saakoun Date: Mon, 26 Feb 2024 13:19:20 +0100 Subject: [PATCH] refactor(controller-utils): replace with types for type safety --- packages/controller-utils/src/util.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/controller-utils/src/util.ts b/packages/controller-utils/src/util.ts index 2721befb3d5..fea7619386b 100644 --- a/packages/controller-utils/src/util.ts +++ b/packages/controller-utils/src/util.ts @@ -44,9 +44,7 @@ export function isSafeChainId(chainId: Hex): boolean { * @param inputBn - BN instance to convert to a hex string. * @returns A '0x'-prefixed hex string. */ -// TODO: Replace `any` with type -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export function BNToHex(inputBn: any) { +export function BNToHex(inputBn: BN) { return add0x(inputBn.toString(16)); } @@ -59,9 +57,7 @@ export function BNToHex(inputBn: any) { * @returns Product of the multiplication. */ export function fractionBN( - // TODO: Replace `any` with type - // eslint-disable-next-line @typescript-eslint/no-explicit-any - targetBN: any, + targetBN: BN, numerator: number | string, denominator: number | string, ) {