Skip to content

Commit

Permalink
Feat: Adjust reward to ethersParseEther()
Browse files Browse the repository at this point in the history
  • Loading branch information
heronlancellot committed Oct 15, 2023
1 parent 3af4f28 commit 5ed9396
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/Task/CardMultiTasks.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Grid, CardMedia, CardContent, Typography, Card } from "@mui/material";
import { styled } from "@mui/material/styles";
import { ethers } from "ethers";
import { TaskFront } from "src/models/task";

const CardAddAction = styled(Card)<{ $loading: boolean }>(
Expand Down Expand Up @@ -90,7 +91,7 @@ export const CardMultiTasks = ({ multiTasksData, loading, page }) => {
{!loading && item?.title}
</Typography>
<Typography gutterBottom variant="h5" component="div">
{!loading && `${item?.reward} MATIC`}
{!loading && `${ethers.utils.formatEther(item?.reward)} MATIC`}
</Typography>
<Typography
gutterBottom
Expand Down
3 changes: 2 additions & 1 deletion src/components/Task/CardTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useWeb3Utils } from 'src/hooks/Web3UtilsHook';
import { useTheme } from '@mui/system';
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
import { useSnackBar } from 'src/contexts/SnackBarContext';
import { ethers } from 'ethers';

/**
* CardTasks Component
Expand Down Expand Up @@ -153,7 +154,7 @@ export const CardTask = ({ taskId, taskData, loading }: any) => {
marginLeft: isSmallScreen ? 'auto' : 'unset',
}}
>
Reward {taskData.reward} USD
Reward {ethers.utils.formatEther(taskData.reward)} USD
</Typography>
</CardContent>
</Card>
Expand Down

0 comments on commit 5ed9396

Please sign in to comment.