Skip to content

Commit c625440

Browse files
committed
fix: bigint type
1 parent 348af60 commit c625440

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

web/src/hooks/useClassicAppealContext.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ const SelectedOptionContext = createContext<ISelectedOptionContext>({
2525

2626
interface IFundingContext {
2727
winningChoice: string | undefined;
28-
paidFees: BigInt[] | undefined;
29-
loserRequiredFunding: BigInt | undefined;
30-
winnerRequiredFunding: BigInt | undefined;
28+
paidFees: bigint[] | undefined;
29+
loserRequiredFunding: bigint | undefined;
30+
winnerRequiredFunding: bigint | undefined;
3131
fundedChoices: string[] | undefined;
3232
}
3333
const FundingContext = createContext<IFundingContext>({
@@ -109,12 +109,12 @@ const getWinningChoice = (dispute?: ClassicAppealQuery["dispute"]) => {
109109
return currentLocalRound?.winningChoice;
110110
};
111111

112-
const getLoserRequiredFunding = (appealCost: bigint, loser_stake_multiplier: bigint): BigInt =>
112+
const getLoserRequiredFunding = (appealCost: bigint, loser_stake_multiplier: bigint): bigint =>
113113
notUndefined([appealCost, loser_stake_multiplier])
114114
? appealCost + (loser_stake_multiplier * appealCost) / ONE_BASIS_POINT
115115
: BigInt(0);
116116

117-
const getWinnerRequiredFunding = (appealCost: bigint, winner_stake_multiplier: bigint): BigInt =>
117+
const getWinnerRequiredFunding = (appealCost: bigint, winner_stake_multiplier: bigint): bigint =>
118118
notUndefined([appealCost, winner_stake_multiplier])
119119
? appealCost + (winner_stake_multiplier * appealCost) / ONE_BASIS_POINT
120120
: BigInt(0);

web/src/hooks/useParsedAmount.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useMemo } from "react";
22
import { parseUnits } from "viem";
33

4-
export function useParsedAmount(amount: string): BigInt {
4+
export function useParsedAmount(amount: string): bigint {
55
return useMemo(() => (amount === "" ? BigInt(0) : parseUnits(`${parseInt(amount)}`, 18)), [amount]);
66
}

0 commit comments

Comments
 (0)