Skip to content

Commit

Permalink
fix(web): fix raise dispute button
Browse files Browse the repository at this point in the history
  • Loading branch information
ShubhamParkhi committed Oct 2, 2024
1 parent d603393 commit 7278c84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const RaiseDisputeButton: React.FC<IRaiseDisputeButton> = ({ toggleModal, button
});

const insufficientBalance = useMemo(() => {
return BigInt(arbitrationCost.toString()) > BigInt(balanceData.value.toString());
return balanceData && parseFloat(arbitrationCost.toString()) > parseFloat(balanceData.value.toString());
},[arbitrationCost, balanceData]);

const { data: payArbitrationFeeByBuyerConfig, isLoading: isLoadingBuyerConfig, isError: isErrorBuyerConfig } = useSimulateEscrowUniversalPayArbitrationFeeByBuyer({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const TokenAndAmount: React.FC<ITokenAndAmount> = ({ quantity, setQuantity }) =>
setError("");
setHasSufficientNativeBalance(true);
}
}, [quantity, setHasSufficientNativeBalance, sendingToken]);
}, [quantity, balanceAmount, setHasSufficientNativeBalance]);

const formattedBalance = useMemo(() => {
const balance = isNativeTransaction ? nativeBalance : tokenBalance;
Expand Down

0 comments on commit 7278c84

Please sign in to comment.