Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.
Open
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
79 changes: 79 additions & 0 deletions frontend/src/@types/activity.entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
export enum ActivityType {
SUPPLY = 'supply',
BORROW = 'borrow',
REPAY = 'repay',
LIQUIDATION = 'liquidation',
WITHDRAWAL = 'withdrawal'
}

export interface PoolActivity {
id: string;
type: ActivityType;
user: string;
asset: string;
amount: string;
timestamp: Date;
transactionHash: string;
blockNumber?: number;
explorerUrl?: string;
usdValue?: number;
healthFactor?: number;
}

export interface ActivityFilters {
type?: ActivityType;
asset?: string;
user?: string;
dateFrom?: Date;
dateTo?: Date;
search?: string;
}

export interface ActivityPagination {
page: number;
limit: number;
total: number;
hasMore: boolean;
}

export interface ActivityFeedState {
activities: PoolActivity[];
loading: boolean;
error: string | null;
filters: ActivityFilters;
pagination: ActivityPagination;
realTimeEnabled: boolean;
}

export interface TransactionDetails {
hash: string;
blockNumber: number;
gasUsed: string;
gasPrice: string;
from: string;
to: string;
value: string;
status: 'pending' | 'confirmed' | 'failed';
confirmations: number;
}

export interface ActivityIconProps {
type: ActivityType;
size?: 'sm' | 'md' | 'lg';
className?: string;
}

export interface ActivityItemProps {
activity: PoolActivity;
showDetails?: boolean;
onExpand?: (activity: PoolActivity) => void;
onViewExplorer?: (hash: string) => void;
}

export interface ActivityFeedProps {
poolId?: string;
filters?: ActivityFilters;
autoRefresh?: boolean;
refreshInterval?: number;
onActivityClick?: (activity: PoolActivity) => void;
}
Loading