diff --git a/packages/math/HugeDecimal.ts b/packages/math/HugeDecimal.ts index 62487202c..e4c33d85f 100644 --- a/packages/math/HugeDecimal.ts +++ b/packages/math/HugeDecimal.ts @@ -63,7 +63,7 @@ export class HugeDecimal { * example: `1.000000 $NTRN`. * * This will convert the value to its raw integer representation by - * multiplying by 10^decimals and truncating any remaining decimal places. + * multiplying by 10^decimals. * * @param n the value * @param decimals the number of decimals @@ -71,7 +71,7 @@ export class HugeDecimal { */ static fromHumanReadable(n: HugeDecimal.Value, decimals: number) { // Multiply by 10^decimals to convert to the integer representation. - return HugeDecimal.from(n).times(BigNumber(10).pow(decimals)).trunc() + return HugeDecimal.from(n).times(BigNumber(10).pow(decimals)) } /** diff --git a/packages/stateless/components/dao/DaoRewardsDistributorClaimCard.tsx b/packages/stateless/components/dao/DaoRewardsDistributorClaimCard.tsx index 54e91ccd7..e9bf8330f 100644 --- a/packages/stateless/components/dao/DaoRewardsDistributorClaimCard.tsx +++ b/packages/stateless/components/dao/DaoRewardsDistributorClaimCard.tsx @@ -2,6 +2,7 @@ import { ArrowDropDown, Payments } from '@mui/icons-material' import clsx from 'clsx' import { useTranslation } from 'react-i18next' +import { HugeDecimal } from '@dao-dao/math' import { DaoRewardsDistributorClaimCardProps } from '@dao-dao/types' import { getFallbackImage } from '@dao-dao/utils' @@ -50,7 +51,11 @@ export const DaoRewardsDistributorClaimCard = ({ /> @@ -145,7 +150,7 @@ export const DaoRewardsDistributorClaimCard = ({ /> 0 @@ -155,7 +160,7 @@ export const DaoRewardsDistributorClaimCard = ({ dateFetched={timestamp} decimals={2} hideSymbol - minAmount={usdValue > 0 ? 0.01 : undefined} + minAmount={0.01} prefix="$" showAllDecimals />