Skip to content

Commit 0a53259

Browse files
committed
refactor: change bigint syntax to n
1 parent ae586e2 commit 0a53259

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

web/src/pages/Cases/CaseDetails/Appeal/Classic/Options/StageOne.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const StageOne: React.FC = () => {
2828
text={answer}
2929
selected={i === selectedOption}
3030
winner={i.toString() === winningChoice}
31-
funding={paidFees[i] ? BigInt(paidFees[i]) : BigInt(0)}
31+
funding={paidFees[i] ? BigInt(paidFees[i]) : 0n}
3232
required={i.toString() === winningChoice ? winnerRequiredFunding : loserRequiredFunding}
3333
onClick={() => setSelectedOption(i)}
3434
/>

web/src/pages/Cases/CaseDetails/Appeal/Classic/Options/StageTwo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const StageOne: React.FC = () => {
2323
text={options![winningChoice!]}
2424
selected={winningChoice === selectedOption}
2525
winner={true}
26-
funding={paidFees![winningChoice!] ? BigInt(paidFees![winningChoice!]) : BigInt(0)}
26+
funding={paidFees![winningChoice!] ? BigInt(paidFees![winningChoice!]) : 0n}
2727
required={winnerRequiredFunding!}
2828
canBeSelected={false}
2929
onClick={() => setSelectedOption(parseInt(winningChoice!, 10))}

web/src/pages/Cases/CaseDetails/Appeal/OptionCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const OptionCard: React.FC<IOptionCard> = ({
4343
: formatEther(funding) + " out of " + formatEther(required) + "ETH required"}
4444
</label>
4545
</LabelContainer>
46-
<LinearProgress progress={Number((funding * BigInt(100)) / required)} width={width} />
46+
<LinearProgress progress={Number((funding * 100n) / required)} width={width} />
4747
</StyledCard>
4848
);
4949
};

web/src/pages/Cases/CaseDetails/Voting/Binary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const Binary: React.FC<{ arbitrable?: string; voteIDs: string[] }> = ({ arbitrab
4747
address: disputeKitClassicAddress[421613],
4848
functionName: "castVote",
4949
account: address,
50-
args: [parsedDisputeID, parsedVoteIDs, BigInt(i + 1), BigInt(0), justification],
50+
args: [parsedDisputeID, parsedVoteIDs, BigInt(i + 1), 0n, justification],
5151
});
5252
setIsSending(true);
5353
setChosenOption(i + 1);
@@ -79,7 +79,7 @@ const Binary: React.FC<{ arbitrable?: string; voteIDs: string[] }> = ({ arbitrab
7979
address: disputeKitClassicAddress[421613],
8080
functionName: "castVote",
8181
account: address,
82-
args: [parsedDisputeID, parsedVoteIDs, BigInt(0), BigInt(0), justification],
82+
args: [parsedDisputeID, parsedVoteIDs, 0n, 0n, justification],
8383
})
8484
).finally(() => {
8585
setChosenOption(-1);

web/src/pages/Courts/CourtDetails/StakePanel/InputDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const InputDisplay: React.FC<IInputDisplay> = ({ action, isSending, setIsSending
2828
const { data: balance } = usePNKBalance(address);
2929
const parsedBalance = formatEther(balance!);
3030
const { data: jurorBalance } = useJurorBalance(address, id);
31-
const parsedStake = formatEther(jurorBalance?.[0] || BigInt(0));
31+
const parsedStake = formatEther(jurorBalance?.[0] || 0n);
3232
const isStaking = action === ActionType.stake;
3333

3434
return (

web/src/pages/Courts/CourtDetails/StakePanel/StakeWithdrawButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const StakeWithdrawButton: React.FC<IActionButton> = ({ parsedAmount, action, se
107107
<Button
108108
text={text}
109109
isLoading={isSending}
110-
disabled={isSending || parsedAmount == BigInt(0) || !notUndefined(targetStake) || checkDisabled()}
110+
disabled={isSending || parsedAmount == 0n || !notUndefined(targetStake) || checkDisabled()}
111111
onClick={onClick}
112112
/>
113113
);

web/src/pages/Home/CourtOverview/Stats.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const StyledCard = styled(Card)`
2222
`;
2323

2424
const getLastOrZero = (src: HomePageQuery["counters"], stat: HomePageQueryDataPoints) =>
25-
src.length > 0 ? src.at(-1)?.[stat] : BigInt(0).toString();
25+
src.length > 0 ? src.at(-1)?.[stat] : 0n.toString();
2626

2727
interface IStat {
2828
title: string;

0 commit comments

Comments
 (0)