Skip to content

Commit

Permalink
fix: change event to logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammedpatla committed Nov 4, 2024
1 parent 437872f commit 5977ce3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { PaginatedPublicEvent } from '~/types/contracts/moneyMarket';
import { PaginatedPublicLogs } from '~/types/contracts/moneyMarket';

const queryMoneyMarketPublicLogsParsedMock: PaginatedPublicEvent = {
const queryMoneyMarketPublicLogsParsedMock: PaginatedPublicLogs = {
page: 0,
pageSize: 10,
totalPages: 1,
Expand Down
10 changes: 5 additions & 5 deletions src/types/contracts/moneyMarket/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,17 @@ type ParsedUserPositionResponse = {
}

// New types for public events
type PublicEvent = {
type PublicLog = {
timestamp: Date,
action: Record<string, any>
}

type PaginatedPublicEvent = {
type PaginatedPublicLogs = {
page: number,
pageSize: number,
totalPages: number,
totalItems: number,
data: PublicEvent[],
data: PublicLog[],
}

export type {
Expand All @@ -177,6 +177,6 @@ export type {
ParsedUserPositionResponse,
BatchMoneyMarketGetMarkets,
BatchMoneyMarketGetCollaterals,
PublicEvent,
PaginatedPublicEvent,
PublicLog,
PaginatedPublicLogs,
};
8 changes: 4 additions & 4 deletions src/types/contracts/moneyMarket/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ type UserPositionResponse = {
}

// Flexible type for actions, leaving it as a JSON object (blob)
type PublicEventResponse = {
type PublicLogResponse = {
timestamp: number,
action: Record<string, any>, // Flexible JSON blob for action
}

// Paginated response type for public events
type GetPublicEventsResponse = PaginatedResponse<PublicEventResponse>;
type GetPublicLogsResponse = PaginatedResponse<PublicLogResponse>;

export type {
ConfigResponse,
GetMarketsResponse,
GetCollateralResponse,
UserPositionResponse,
PublicEventResponse,
GetPublicEventsResponse,
PublicLogResponse,
GetPublicLogsResponse,
};

0 comments on commit 5977ce3

Please sign in to comment.