Skip to content

Commit

Permalink
[hotfix] fix name leaderboard (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-rock authored Dec 17, 2024
1 parent 5a71b6a commit 1d1aea5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@compolabs/spark-orderbook-ts-sdk",
"version": "1.14.3",
"version": "1.14.4",
"type": "module",
"main": "./dist/index.сjs",
"module": "./dist/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/SparkOrderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
FulfillOrderManyParams,
FulfillOrderManyWithDepositParams,
GetActiveOrdersParams,
GetLeaderBoardQueryParams,
GetLeaderboardQueryParams,
GetOrdersParams,
GetTradeEventQueryParams,
GetTradeOrderEventsParams,
Expand Down Expand Up @@ -359,8 +359,8 @@ export class SparkOrderbook {
return this.activeSentioApi?.getTradeEvent(params);
}

async getLeaderBoard(params: GetLeaderBoardQueryParams) {
return this.activeSentioApi?.getLeaderBoard(params);
async getLeaderboard(params: GetLeaderboardQueryParams) {
return this.activeSentioApi?.getLeaderboard(params);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export interface GetTradeEventQueryParams {
fromTimestamp: number;
}

export interface GetLeaderBoardQueryParams {
export interface GetLeaderboardQueryParams {
page: number;
search?: string;
currentTimestamp: number;
Expand Down Expand Up @@ -283,7 +283,7 @@ export interface RowTradeEvent {
export interface TraderVolumeResponse {
walletId: string;
traderVolume: number;
id: number;
id: number | "N/A";
totalCount: number;
isYour: boolean;
}
Expand Down
12 changes: 6 additions & 6 deletions src/query/sentioQuery.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
GetLeaderBoardQueryParams,
GetLeaderboardQueryParams,
GetSentioResponse,
GetTradeEventQueryParams,
GetUserScoreSnapshotParams,
Expand All @@ -25,12 +25,12 @@ export class SentioQuery extends Fetch {
this.apiKey = apiKey;
}

async getLeaderBoardQuery({
async getLeaderboardQuery({
page,
search = "",
currentTimestamp,
interval,
}: GetLeaderBoardQueryParams): Promise<
}: GetLeaderboardQueryParams): Promise<
GetSentioResponse<TraderVolumeResponse>
> {
const limit = 10;
Expand Down Expand Up @@ -170,18 +170,18 @@ export const getTradeEventQuery = async ({
});
};

export const getLeaderBoardQuery = async ({
export const getLeaderboardQuery = async ({
page,
search,
url,
apiKey,
currentTimestamp,
interval,
}: GetLeaderBoardQueryParams & SentioApiParams): Promise<
}: GetLeaderboardQueryParams & SentioApiParams): Promise<
GetSentioResponse<TraderVolumeResponse>
> => {
const sentioQuery = new SentioQuery({ url, apiKey });
return await sentioQuery.getLeaderBoardQuery({
return await sentioQuery.getLeaderboardQuery({
page,
search,
currentTimestamp,
Expand Down
8 changes: 4 additions & 4 deletions src/sentioApi.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {
getLeaderBoardQuery,
getLeaderboardQuery,
getTradeEventQuery,
getUserScoreSnapshotQuery,
} from "./query/sentioQuery";
import {
GetLeaderBoardQueryParams,
GetLeaderboardQueryParams,
GetTradeEventQueryParams,
GetUserScoreSnapshotParams,
SentioApiParams,
Expand Down Expand Up @@ -38,8 +38,8 @@ export class SentioApi {
});
};

getLeaderBoard = (params: GetLeaderBoardQueryParams) => {
return getLeaderBoardQuery({
getLeaderboard = (params: GetLeaderboardQueryParams) => {
return getLeaderboardQuery({
page: params.page,
search: params.search,
currentTimestamp: params.currentTimestamp,
Expand Down

0 comments on commit 1d1aea5

Please sign in to comment.