Skip to content
Merged

Tali #38

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions components/dashboard/recent-activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function RecentActivity({ activeTab }: DashboardProps) {
const { notifications } = useNotifications();

const filtered = notifications.filter((notif) => {
return notif.title === "Deposit Received" || notif.title === "Tokens Sent";
return notif.title === "Deposit Successful" || notif.title === "Tokens Sent";
});


Expand Down Expand Up @@ -43,7 +43,7 @@ export function RecentActivity({ activeTab }: DashboardProps) {
key={notification.id}
>
<div className="w-full flex gap-2 items-center">
{notification.title === "Deposit Received" && (
{notification.title === "Deposit Successful" && (
<div className="w-8 h-8 rounded-full bg-green-100/90 flex items-center justify-center">
<ArrowDownLeft size={16} color="green" />
</div>
Expand All @@ -63,9 +63,9 @@ export function RecentActivity({ activeTab }: DashboardProps) {
</div>
</div>
<div className="flex flex-col gap-1 w-full items-end">
{notification.title === "Deposit Received" && (
{notification.title === "Deposit Successful" && (
<div className="text-green-300 font-bold">
{notification.details.amount}
{notification.details.amount} {notification.details.chain}
</div>
)}

Expand All @@ -75,7 +75,7 @@ export function RecentActivity({ activeTab }: DashboardProps) {
</div>
)}

{notification.title === "Deposit Received" && (
{notification.title === "Deposit Successful" && (
<div>{shortenAddress(notification.details.address, 6)}</div>
)}

Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/stats-cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function StatsCards({
const balanceTrend = useBalanceTrend(totalBalance, !totalBalance);

const totalTransactions = notifications.filter((notification) => {
return notification.title === "Deposit Received" || notification.title === "Tokens Sent";
return notification.title === "Deposit Successful" || notification.title === "Tokens Sent";
});

const split = notifications.filter((notification) => {
Expand Down
2 changes: 1 addition & 1 deletion components/hooks/useNotifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const useNotifications = () => {
const [notifications, setNotifications] = useState<FrontendNotification[]>([]);
const [unreadCount, setUnreadCount] = useState<number>(0);

// console.log("XXXXXXXXXXXXXXXXXXXXXXXXXX",notifications)
console.log("XXXXXXXXXXXXXXXXXXXXXXXXXX",notifications)

// Use useRef to track shown notifications - persists across renders without causing re-renders
const shownNotificationIds = useRef<Set<string>>(new Set());
Expand Down
4 changes: 2 additions & 2 deletions lib/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class ApiClient {
"/wallet/addresses/mainnet",
{ method: "GET" },
{
ttl: 10 * 60 * 1000, // 10 minutes - addresses don't change often
ttl: 10 * 60 * 1000,
backgroundRefresh: true,
}
).then((data) => data.addresses || []);
Expand All @@ -278,7 +278,7 @@ class ApiClient {
"/wallet/balances/mainnet",
{ method: "GET" },
{
ttl: 2 * 60 * 1000, // 2 minutes - balances change more frequently
ttl: 2 * 60 * 1000,
backgroundRefresh: true,
}
).then((data) => data.balances || []);
Expand Down