Skip to content

Commit

Permalink
fix: portfolio stats + toast icon color (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
YohanTz authored Sep 25, 2024
1 parent ce603ef commit 70234c3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const CancelOffer = ({
useEffect(() => {
if (status === "error") {
toast({
variant: "success",
variant: "canceled",
title: "The offer could not be canceled",
additionalContent: (
<ToastRejectedTransactionContent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function PortfolioValue({ address }: PortfolioValueProps) {
const { data } = usePortfolioStats({ address });
const { convertInUsd, isLoading } = usePrices();

const totalValue = formatUnits(data.total_value, 18);
const totalValue = formatUnits(data.total_value ?? "0", 18);

const totalValueInUsd = convertInUsd({
amount: parseEther(totalValue),
Expand Down
2 changes: 1 addition & 1 deletion apps/arkmarket/src/hooks/usePortfolioStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function usePortfolioStats({ address }: UsePortfolioStatsProps) {
queryFn: () => getPortfolioStats({ address }),
refetchInterval: REFETCH_INTERVAL,
initialData: {
total_value: "0.00",
total_value: null,
},
enabled: !!address,
});
Expand Down
2 changes: 1 addition & 1 deletion apps/arkmarket/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export interface OwnersTokensApiResponse {
}

export interface PortfolioStats {
total_value: string;
total_value: string | null;
}

export interface TokenMarketData {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/toaster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function Toaster() {
<ActivityDelist className="size-6 text-[#EF4444]" />
)}
{variant === "success" && (
<Congratulations className="size-6 text-[#1DD76C]" />
<Congratulations className="size-6 text-foreground" />
)}
{title && <ToastTitle>{title}</ToastTitle>}
</div>
Expand Down

0 comments on commit 70234c3

Please sign in to comment.