Skip to content

Commit

Permalink
fix: ensure token address is lowercased
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed May 15, 2024
1 parent 2c6651c commit 0222e2f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/round-manager/src/features/round/ViewRoundSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0222e2f

Please sign in to comment.