From 988741ea65d473b123a9912c2b1359ffe210d37b Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 6 Feb 2023 16:23:58 +0000 Subject: [PATCH] fix: remove ethers --- src/components/common/ConnectButton.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/common/ConnectButton.tsx b/src/components/common/ConnectButton.tsx index 65f22247..3caa98b8 100644 --- a/src/components/common/ConnectButton.tsx +++ b/src/components/common/ConnectButton.tsx @@ -17,7 +17,6 @@ import { BellIcon, } from "@heroicons/react/24/outline" import { BellAlertIcon } from "@heroicons/react/24/solid" -import { BigNumber } from "ethers" import { SITE_URL } from "~/lib/env" import { useRefCallback } from "@crossbell/util-hooks" import { @@ -90,9 +89,8 @@ export const ConnectButton: React.FC<{ useEffect(() => { if (balance) { if ( - BigNumber.from(balance.value).gt( - BigNumber.from("1" + "0".repeat(balance.decimals - 2)), - ) + BigInt(balance.value.toString()) > + BigInt("1" + "0".repeat(balance.decimals - 2)) ) { setInsufficientBalance(false) } else {