Skip to content

Commit

Permalink
馃毟 RewardsModal: uncheck < 1 cent rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
sebipap committed May 21, 2024
1 parent fb4b36c commit 71ceb63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion components/RewardsModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ import { useModal } from 'contexts/ModalContext';
import { track } from 'utils/mixpanel';
import MainActionButton from 'components/common/MainActionButton';

const CENTS = 100n;

function PaperComponent(props: PaperProps | undefined) {
const ref = useRef<HTMLDivElement>(null);
return (
Expand Down Expand Up @@ -76,7 +78,9 @@ const RewardsModal: FC<RewardsModalProps> = ({ isOpen, close }) => {
const [input, setInput] = useState<string>('');
const [showInput, setShowInput] = useState<boolean>(false);
const [selected, setSelected] = useState<Record<string, boolean>>(() =>
Object.fromEntries(Object.keys(rs).map((k) => [k, true])),
Object.fromEntries(
Object.entries(rs).map(([key, { amount, usdPrice }]) => [key, (amount * usdPrice) / WAD > WAD / CENTS]),
),
);
const [loading, setLoading] = useState<boolean>(false);

Expand Down

0 comments on commit 71ceb63

Please sign in to comment.