From 0222e2f4187dfe682d563a8ab3ab75a7c20ead5e Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Wed, 15 May 2024 15:33:30 +0530 Subject: [PATCH] fix: ensure token address is lowercased --- .../src/features/round/ViewRoundSettings.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/round-manager/src/features/round/ViewRoundSettings.tsx b/packages/round-manager/src/features/round/ViewRoundSettings.tsx index 2a79d88159..04a57b5dd1 100644 --- a/packages/round-manager/src/features/round/ViewRoundSettings.tsx +++ b/packages/round-manager/src/features/round/ViewRoundSettings.tsx @@ -108,9 +108,13 @@ const generateUpdateRoundData = ( ) ) { const decimals = getPayoutTokenOptions(dNewRound.chainId).find( - (token) => token.address === dNewRound.token + (token) => token.address.toLowerCase() === dNewRound.token.toLowerCase() )?.decimal; + if (!decimals) { + throw new Error("Token decimals not found"); + } + const matchAmount = ethers.utils.parseUnits( dNewRound?.roundMetadata?.quadraticFundingConfig?.matchingFundsAvailable.toString(), decimals @@ -181,10 +185,11 @@ export default function ViewRoundSettings(props: { id?: string }) { /* All DG rounds have rolling applications enabled */ useEffect(() => { if ( - round && round.applicationsEndTime && + round && + round.applicationsEndTime && isInfiniteDate(round.applicationsEndTime) && isDirectRound(round) - ) { + ) { setRollingApplicationsEnabled(true); } else { setRollingApplicationsEnabled(false);