From 2a444dd4db67da461686f3038841e5f620ce70c4 Mon Sep 17 00:00:00 2001 From: TTNguyenDev Date: Fri, 1 Mar 2024 20:21:02 +0700 Subject: [PATCH] fix: default value --- packages/web-app/hooks/useConstants.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/web-app/hooks/useConstants.tsx b/packages/web-app/hooks/useConstants.tsx index a45e519f..17ed2611 100644 --- a/packages/web-app/hooks/useConstants.tsx +++ b/packages/web-app/hooks/useConstants.tsx @@ -3,11 +3,11 @@ import { useNetwork } from "wagmi"; import getConstants, { Constants } from "../lib/constants"; export const useConstants = (): Constants => { - const { chain } = useNetwork(); + const { chain } = useNetwork(); - const constants = useMemo(() => { - return getConstants(chain?.id || 1); - }, [chain]); + const constants = useMemo(() => { + return getConstants(chain?.id ?? 1); + }, [chain]); - return constants; + return constants; };